Used macro GET_TEXT() where it where not used before.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 23 Mar 2013 23:08:37 +0000 (00:08 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 23 Mar 2013 23:08:37 +0000 (00:08 +0100)
src/completion.c
src/hints.c
src/history.c
src/main.c
src/main.h
src/setting.c

index ae16674..6d5797e 100644 (file)
@@ -41,7 +41,7 @@ static void completion_free(Completion* completion);
 
 gboolean completion_complete(gboolean back)
 {
-    const char* input = gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox));
+    const char* input = GET_TEXT();
     GList* source = NULL;
 
     if (vb.comps.completions
index 7118c31..173da0e 100644 (file)
@@ -181,7 +181,7 @@ static void hints_observe_input(gboolean observe)
 
 static gboolean hints_changed_callback(GtkEditable *entry)
 {
-    const char* text = gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox));
+    const char* text = GET_TEXT();
 
     /* skip hinting prefixes like '.', ',', ';y' ... */
     hints_create(text + vb.hints.prefixLength, vb.hints.mode, vb.hints.prefixLength);
index 43eeb6c..e97f30b 100644 (file)
@@ -45,7 +45,7 @@ const char* history_get(const int step)
 
     /* get the search prefix only on start of history search */
     if (!vb.state.history_active) {
-        OVERWRITE_STRING(vb.state.history_prefix, gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox)));
+        OVERWRITE_STRING(vb.state.history_prefix, GET_TEXT());
 
         /* generate new history list with the matching items */
         for (GList* l = vb.behave.history; l; l = l->next) {
index f76dd71..1ac51b7 100644 (file)
@@ -446,7 +446,7 @@ static void vb_inputbox_activate_cb(GtkEntry *entry)
     }
 
     /* do not free or modify text */
-    text = gtk_entry_get_text(entry);
+    text = GET_TEXT();
 
     /* duplicate the content because this may change for example if
      * :set varName? is used the text is changed to the new printed
index 7f22567..5631c5e 100644 (file)
@@ -51,7 +51,7 @@
 #define TIMER_END
 #endif
 
-#define GET_TEXT() (gtk_entry_get_text(GTK_ENTRY(vp.gui.inputbox)))
+#define GET_TEXT() (gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox)))
 #define CLEAN_MODE(mode) ((mode) & ~(VB_MODE_COMPLETE))
 #define CLEAR_INPUT() (vb_echo(VB_MSG_NORMAL, ""))
 #define PRIMARY_CLIPBOARD() gtk_clipboard_get(GDK_SELECTION_PRIMARY)
index 790b49d..ac7ccc7 100644 (file)
@@ -449,7 +449,7 @@ static gboolean setting_input_style(const Setting* s, const SettingType type)
     }
     if (type != SETTING_GET) {
         /* vb_update_input_style seems to take no immediatly effect */
-        vb_echo(VB_MSG_NORMAL, FALSE, gtk_entry_get_text(GTK_ENTRY(vb.gui.inputbox)));
+        vb_echo(VB_MSG_NORMAL, FALSE, GET_TEXT());
     }
 
     return TRUE;