[devhelp/wip/swilmet/various-code-improvements: 9/12] sidebar: fix function name for insert-text callback



commit 2527d65c7db0dd06231036060a494431fc0b1a54
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Oct 10 10:43:21 2015 +0200

    sidebar: fix function name for insert-text callback
    
    The GtkEditable::insert-text signal is a Run Last signal, so when the
    signal handler is called, the text is not yet inserted. So the name
    "text_inserted" was wrong. It's anyway clearer to have the function
    callback the same name as the signal.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756341

 src/dh-sidebar.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index dddb4c8..cadc2ac 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -318,11 +318,11 @@ sidebar_complete_idle_cb (DhSidebar *sidebar)
 }
 
 static void
-sidebar_entry_text_inserted_cb (GtkEntry    *entry,
-                                const gchar *text,
-                                gint         length,
-                                gint        *position,
-                                DhSidebar   *sidebar)
+sidebar_entry_insert_text_cb (GtkEntry    *entry,
+                              const gchar *text,
+                              gint         length,
+                              gint        *position,
+                              DhSidebar   *sidebar)
 {
         DhSidebarPrivate *priv = dh_sidebar_get_instance_private (sidebar);
 
@@ -502,7 +502,7 @@ dh_sidebar_init (DhSidebar *sidebar)
                           G_CALLBACK (sidebar_entry_changed_cb),
                           sidebar);
         g_signal_connect (priv->entry, "insert-text",
-                          G_CALLBACK (sidebar_entry_text_inserted_cb),
+                          G_CALLBACK (sidebar_entry_insert_text_cb),
                           sidebar);
 
         /* Setup hitlist */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]