]> spindle.queued.net Git - midori/commitdiff
Use same clear icon handling in findbar and panels
authorChristian Dywan <christian@twotoasts.de>
Fri, 13 Jan 2012 23:45:01 +0000 (00:45 +0100)
committerChristian Dywan <christian@twotoasts.de>
Fri, 13 Jan 2012 23:45:01 +0000 (00:45 +0100)
panels/midori-bookmarks.c
panels/midori-history.c
toolbars/midori-findbar.c

index dd5291f5408955abcc4761e5dad4fb4d36962e59..8c9714701a5a1cf102e523038ec355f5709efb7f 100644 (file)
@@ -925,11 +925,7 @@ midori_bookmarks_init (MidoriBookmarks* bookmarks)
     gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
                                         GTK_ICON_ENTRY_PRIMARY,
                                         GTK_STOCK_FIND);
-    gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
-                                        GTK_ICON_ENTRY_SECONDARY,
-                                        GTK_STOCK_CLEAR);
-    gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry),
-        GTK_ICON_ENTRY_SECONDARY, TRUE);
+    sokoke_entry_set_clear_button_visible (GTK_ENTRY (entry), TRUE);
     g_signal_connect (entry, "icon-release",
         G_CALLBACK (midori_bookmarks_filter_entry_clear_cb), bookmarks);
     g_signal_connect (entry, "changed",
index 712dc70cb490cefdc60292ecb03fdf30a2fdbd1e..ce635f6fd2df1b45966ffba086a3ed62a2db4e7a 100644 (file)
@@ -945,12 +945,7 @@ midori_history_init (MidoriHistory* history)
     gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
                                         GTK_ICON_ENTRY_PRIMARY,
                                         GTK_STOCK_FIND);
-    gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
-                                        GTK_ICON_ENTRY_SECONDARY,
-                                        GTK_STOCK_CLEAR);
-    gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (entry),
-                                       GTK_ICON_ENTRY_SECONDARY,
-                                       TRUE);
+    sokoke_entry_set_clear_button_visible (GTK_ENTRY (entry), TRUE);
     g_signal_connect (entry, "icon-release",
         G_CALLBACK (midori_history_filter_entry_clear_cb), history);
     g_signal_connect (entry, "changed",
index 548b546da1b70fafb3b6b5981870f2ce676b2a73..122489dcb2e096401e19a3e5a5979cf07b081cd6 100644 (file)
@@ -112,7 +112,6 @@ midori_findbar_entry_clear_icon_released_cb (GtkIconEntry* entry,
 {
     if (icon_pos == GTK_ICON_ENTRY_SECONDARY)
     {
-        gtk_entry_set_text (GTK_ENTRY (entry), "");
         midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, "edit-find");
     }
 }
@@ -265,8 +264,7 @@ midori_findbar_init (MidoriFindbar* findbar)
     gtk_toolbar_insert (GTK_TOOLBAR (findbar), toolitem, -1);
     findbar->find_text = gtk_icon_entry_new ();
     midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, "edit-find");
-    gtk_icon_entry_set_icon_highlight (GTK_ICON_ENTRY (findbar->find_text),
-                                       GTK_ICON_ENTRY_SECONDARY, TRUE);
+    sokoke_entry_set_clear_button_visible (GTK_ENTRY (findbar->find_text), TRUE);
     g_signal_connect (findbar->find_text, "icon-release",
         G_CALLBACK (midori_findbar_entry_clear_icon_released_cb), findbar);
     g_signal_connect (findbar->find_text, "activate",