From d260e71a23e61d1d3f009f7adbc3ea5219709ed0 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 11 Jul 2012 18:40:44 +0200 Subject: [PATCH] Add edit, stop and url icon to midori-stock.h --- midori/midori-locationaction.c | 2 +- midori/midori-searchaction.c | 2 +- midori/midori-stock.h | 4 ++++ toolbars/midori-findbar.c | 10 +++++----- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index d10e41b9..ec377bdb 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -1770,7 +1770,7 @@ midori_location_action_set_security_hint (MidoriLocationAction* location_action, GTK_ICON_ENTRY_PRIMARY, "text-html-symbolic"); else gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (entry), - GTK_ICON_ENTRY_PRIMARY, "text-html"); + GTK_ICON_ENTRY_PRIMARY, STOCK_URL); gtk_icon_entry_set_tooltip (GTK_ICON_ENTRY (entry), GTK_ICON_ENTRY_PRIMARY, _("Open, unencrypted connection")); } diff --git a/midori/midori-searchaction.c b/midori/midori-searchaction.c index bc814d99..a4efe454 100644 --- a/midori/midori-searchaction.c +++ b/midori/midori-searchaction.c @@ -433,7 +433,7 @@ midori_search_action_get_icon (KatzeItem* item, else if (gtk_icon_theme_has_icon (icon_theme, "edit-find-option")) *icon_name = "edit-find-option"; else - *icon_name = "edit-find"; + *icon_name = STOCK_EDIT_FIND; return NULL; } diff --git a/midori/midori-stock.h b/midori/midori-stock.h index 3157c2c1..721c0459 100644 --- a/midori/midori-stock.h +++ b/midori/midori-stock.h @@ -31,5 +31,9 @@ #define STOCK_USER_TRASH "user-trash" #define STOCK_WINDOW_NEW "window-new" #define STOCK_FOLDER_NEW "folder-new" +#define STOCK_EDIT_CLEAR "edit-clear" +#define STOCK_EDIT_FIND "edit-find" +#define STOCK_STOP "stop" +#define STOCK_URL "text-html" #endif /* !__MIDORI_STOCK_H__ */ diff --git a/toolbars/midori-findbar.c b/toolbars/midori-findbar.c index cbee17b5..c5a12f8a 100644 --- a/toolbars/midori-findbar.c +++ b/toolbars/midori-findbar.c @@ -112,7 +112,7 @@ midori_findbar_entry_clear_icon_released_cb (GtkIconEntry* entry, { if (icon_pos == GTK_ICON_ENTRY_SECONDARY) { - midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, "edit-find"); + midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, STOCK_EDIT_FIND); } } @@ -191,7 +191,7 @@ midori_findbar_invoke (MidoriFindbar* findbar) GtkWidget* view = midori_browser_get_current_tab (browser); const gchar* text; - midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, "edit-find"); + midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, STOCK_EDIT_FIND); gtk_widget_show (GTK_WIDGET (findbar->find_case)); gtk_widget_show (GTK_WIDGET (findbar->find_highlight)); gtk_widget_show (GTK_WIDGET (findbar->find_close)); @@ -233,7 +233,7 @@ midori_findbar_preedit_changed_cb (GtkWidget* entry, midori_view_unmark_text_matches (MIDORI_VIEW (view)); if (g_utf8_strlen (preedit, -1) >= 1) { - midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_SECONDARY, "edit-clear"); + midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_SECONDARY, STOCK_EDIT_CLEAR); midori_findbar_find_text (findbar, preedit, TRUE); } else @@ -291,7 +291,7 @@ midori_findbar_init (MidoriFindbar* findbar) gtk_label_new_with_mnemonic (_("_Inline Find:"))); 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"); + midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, STOCK_EDIT_FIND); 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); @@ -370,7 +370,7 @@ midori_findbar_search_text (MidoriFindbar* findbar, gboolean case_sensitive; gboolean highlight; - midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, found ? "edit-find" : "stop"); + midori_findbar_set_icon (findbar, GTK_ICON_ENTRY_PRIMARY, found ? STOCK_EDIT_FIND : STOCK_STOP); if (typing) { -- 2.39.5