[gedit/wip/previous-search-behavior: 2/2] commands-search: connect_after the "response" dialog signal



commit 52131d047592ec7489a3317dfe0fc428f239d774
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Sep 17 17:48:13 2013 +0200

    commands-search: connect_after the "response" dialog signal
    
    The object method handler gedit_replace_dialog_response() creates the
    SearchContext if it is not already created.
    
    In commands-search.c, replace_dialog_response_cb() must be called after
    the SearchContext creation, to execute the actual find or replace.
    
    If replace_dialog_response_cb() is called before, the SearchContext may
    not be already created, and the find or replace doesn't work.

 gedit/gedit-commands-search.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-commands-search.c b/gedit/gedit-commands-search.c
index 64fb417..23e45de 100644
--- a/gedit/gedit-commands-search.c
+++ b/gedit/gedit-commands-search.c
@@ -546,10 +546,10 @@ create_dialog (GeditWindow *window)
 {
        GtkWidget *dialog = gedit_replace_dialog_new (window);
 
-       g_signal_connect (dialog,
-                         "response",
-                         G_CALLBACK (replace_dialog_response_cb),
-                         window);
+       g_signal_connect_after (dialog,
+                               "response",
+                               G_CALLBACK (replace_dialog_response_cb),
+                               window);
 
        g_object_set_data (G_OBJECT (window),
                           GEDIT_REPLACE_DIALOG_KEY,


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