[anjuta] document-manager: connect to toplevel SearchBox keypress to handle closing



commit 973f1b6020791df62274052acaf54c101981cd4d
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Thu Jan 31 19:00:58 2013 +0100

    document-manager: connect to toplevel SearchBox keypress to handle closing

 plugins/document-manager/search-box.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/plugins/document-manager/search-box.c b/plugins/document-manager/search-box.c
index e36040d..59d2639 100644
--- a/plugins/document-manager/search-box.c
+++ b/plugins/document-manager/search-box.c
@@ -199,7 +199,7 @@ on_goto_key_pressed (GtkWidget* entry, GdkEventKey* event, SearchBox* search_box
 }
 
 static gboolean
-on_entry_key_pressed (GtkWidget* entry, GdkEventKey* event, SearchBox* search_box)
+on_search_box_key_pressed (GtkWidget* widget, GdkEventKey* event, SearchBox* search_box)
 {
 	switch (event->keyval)
 	{
@@ -917,8 +917,8 @@ search_box_init (SearchBox *search_box)
 	g_signal_connect_swapped (G_OBJECT (search_box->priv->search_entry), "activate", 
 	                          G_CALLBACK (search_box_forward_search),
 	                          search_box);
-	g_signal_connect (G_OBJECT (search_box->priv->search_entry), "key-press-event",
-					  G_CALLBACK (on_entry_key_pressed),
+	g_signal_connect (G_OBJECT (search_box), "key-press-event",
+					  G_CALLBACK (on_search_box_key_pressed),
 					  search_box);
 	g_signal_connect (G_OBJECT (search_box->priv->search_entry), "changed",
 					  G_CALLBACK (on_search_box_entry_changed),
@@ -970,9 +970,6 @@ search_box_init (SearchBox *search_box)
 					  search_box);
 	/* Replace */
 	search_box->priv->replace_entry = gtk_entry_new();
-	g_signal_connect (G_OBJECT (search_box->priv->replace_entry), 
-					"key-press-event", G_CALLBACK (on_entry_key_pressed),
- 					search_box);
 	g_signal_connect (G_OBJECT (search_box->priv->replace_entry), "activate", 
 					  G_CALLBACK (on_replace_activated),
 					  search_box);



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