summaryrefslogtreecommitdiff
path: root/gtk/gtksearchentry.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <william.jon.mccann@gmail.com>2013-03-02 07:50:50 -0500
committerWilliam Jon McCann <william.jon.mccann@gmail.com>2013-03-03 11:16:09 -0500
commitcb27c4b08c278ac7e8a882b638dbf30acd1436cf (patch)
tree3df2b2bdd3b623335253c59839947193f046f2d3 /gtk/gtksearchentry.c
parent7667d16626cd5c1dc3f09e8e9032a8275e256edc (diff)
downloadgtk+-cb27c4b08c278ac7e8a882b638dbf30acd1436cf.tar.gz
Place the search icon in the primary slot of the entry
Instead of using the secondary slot for both clear and search. This Makes it possible to use the search icon for actions regardless of whether text has been entered, makes it possible to use the primary icon to indicate search status, allows us to indicate the purpose of the entry even if text has been already entered. https://bugzilla.gnome.org/show_bug.cgi?id=694990
Diffstat (limited to 'gtk/gtksearchentry.c')
-rw-r--r--gtk/gtksearchentry.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtksearchentry.c b/gtk/gtksearchentry.c
index b729993b3c..b28406a5b4 100644
--- a/gtk/gtksearchentry.c
+++ b/gtk/gtksearchentry.c
@@ -74,7 +74,7 @@ search_entry_changed_cb (GtkEntry *entry,
if (str == NULL || *str == '\0')
{
- icon_name = "edit-find-symbolic";
+ icon_name = NULL;
active = FALSE;
}
else
@@ -101,6 +101,12 @@ gtk_search_entry_init (GtkSearchEntry *entry)
g_signal_connect (entry, "icon-release",
G_CALLBACK (search_entry_clear_cb), NULL);
+ g_object_set (entry,
+ "primary-icon-name", "edit-find-symbolic",
+ "primary-icon-activatable", FALSE,
+ "primary-icon-sensitive", FALSE,
+ NULL);
+
search_entry_changed_cb (GTK_ENTRY (entry), NULL);
}