From fb2e4eea7759f5bb113a9ea2e73870ecf0ad649f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 14 Jan 2012 00:45:01 +0100 Subject: [PATCH] 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 dd5291f5..8c971470 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 712dc70c..ce635f6f 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 548b546d..122489dc 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", -- 2.39.5