summaryrefslogtreecommitdiff
path: root/gtk/gtksearchentry.c
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2013-07-13 21:07:08 +0200
committerSébastien Wilmet <swilmet@gnome.org>2013-07-15 12:27:21 +0200
commit68f44c4e90f8fdd65a9d1f7c47b4637411628a91 (patch)
tree3f432743c41661f3377835b7e6fb9eba2dcd9724 /gtk/gtksearchentry.c
parentc246cc7e2814939ef34aa82e4449b946f1c3690b (diff)
downloadgtk+-68f44c4e90f8fdd65a9d1f7c47b4637411628a91.tar.gz
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
Diffstat (limited to 'gtk/gtksearchentry.c')
-rw-r--r--gtk/gtksearchentry.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index 6179dc04d9..c785a08446 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