[gtk+] GtkSearchEntry: fix search_entry_clear_cb()



commit 68f44c4e90f8fdd65a9d1f7c47b4637411628a91
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jul 13 21:07:08 2013 +0200

    GtkSearchEntry: fix search_entry_clear_cb()
    
    When the icon-release signal is emitted on a GtkSearchEntry, the
    contents is now cleared only if it's for the secondary icon. The primary
    icon can be used for another purpose.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704164

 gtk/gtksearchentry.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index 6179dc0..c785a08 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -83,10 +83,12 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
 }
 
 static void
-search_entry_clear_cb (GtkEntry *entry,
-                       gpointer  user_data)
+search_entry_clear_cb (GtkEntry             *entry,
+                       GtkEntryIconPosition  icon_pos,
+                       gpointer              user_data)
 {
-  gtk_entry_set_text (entry, "");
+  if (icon_pos == GTK_ENTRY_ICON_SECONDARY)
+    gtk_entry_set_text (entry, "");
 }
 
 static gboolean


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