[gnome-packagekit] Sensitize the app's 'Find' button when pasting into the GtkEntry



commit 3cdd18590a7f5ea0aa4d96991a45705fc4a55cab
Author: Christopher Aillon <caillon redhat com>
Date:   Sat Feb 19 21:21:53 2011 -0800

    Sensitize the app's 'Find' button when pasting into the GtkEntry
    
    Sensitivity should be updated whenever user-visible changes occur,
    so connect to GtkEditable::changed instead of key events.  Should
    also fix the case where the user cuts all of the GtkEntry's text
    but the button didn't get de-sensitized.
    
    GNOME Bug 639457
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gpk-application.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 390e4c9..83d3ab0 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -3967,9 +3967,7 @@ gpk_application_startup_cb (GtkApplication *application, gpointer user_data)
 			  G_CALLBACK (gpk_application_entry_text_icon_press_cb), NULL);
 
 	widget = GTK_WIDGET (gtk_builder_get_object (builder, "entry_text"));
-	g_signal_connect (widget, "key-press-event",
-			  G_CALLBACK (gpk_application_text_changed_cb), NULL);
-	g_signal_connect (widget, "key-release-event",
+	g_signal_connect (GTK_EDITABLE (widget), "changed",
 			  G_CALLBACK (gpk_application_text_changed_cb), NULL);
 
 	/* mark find button insensitive */



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