[Xfce4-commits] <midori:master> Use same clear icon handling in findbar and panels

Christian Dywan noreply at xfce.org
Sat Jan 14 07:02:05 CET 2012


Updating branch refs/heads/master
         to fb2e4eea7759f5bb113a9ea2e73870ecf0ad649f (commit)
       from c0e0bee467561d5840430151bea760e104766992 (commit)

commit fb2e4eea7759f5bb113a9ea2e73870ecf0ad649f
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jan 14 00:45:01 2012 +0100

    Use same clear icon handling in findbar and panels

 panels/midori-bookmarks.c |    6 +-----
 panels/midori-history.c   |    7 +------
 toolbars/midori-findbar.c |    4 +---
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c
index dd5291f..8c97147 100644
--- a/panels/midori-bookmarks.c
+++ b/panels/midori-bookmarks.c
@@ -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",
diff --git a/panels/midori-history.c b/panels/midori-history.c
index 712dc70..ce635f6 100644
--- a/panels/midori-history.c
+++ b/panels/midori-history.c
@@ -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",
diff --git a/toolbars/midori-findbar.c b/toolbars/midori-findbar.c
index 548b546..122489d 100644
--- a/toolbars/midori-findbar.c
+++ b/toolbars/midori-findbar.c
@@ -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",


More information about the Xfce4-commits mailing list