From e4475b4c495dcab6fe74b843b6f8acfef51f3c07 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 24 Jan 2012 23:33:54 +0100 Subject: [PATCH] midori_location_action_set_icon_for_uri is unneeded --- midori/midori-browser.c | 5 ----- midori/midori-locationaction.c | 30 +++++++++++------------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 859c3aa1..72ab33b7 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -484,17 +484,12 @@ midori_view_notify_icon_cb (MidoriView* view, GParamSpec* pspec, MidoriBrowser* browser) { - const gchar* uri; GtkAction* action; if (midori_browser_get_current_tab (browser) != (GtkWidget*)view) return; - uri = midori_view_get_display_uri (view); action = _action_by_name (browser, "Location"); - if (browser->maximum_history_age) - midori_location_action_set_icon_for_uri ( - MIDORI_LOCATION_ACTION (action), midori_view_get_icon (view), uri); midori_location_action_set_icon (MIDORI_LOCATION_ACTION (action), midori_view_get_icon (view)); if (sokoke_is_app_or_private ()) diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index 64e652b4..f7250329 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -1536,30 +1536,22 @@ midori_location_action_add_item (MidoriLocationAction* location_action, #endif } +/** + * midori_location_action_set_icon_for_uri: + * @location_action: a #MidoriLocationAction + * @icon: a #GdkPixbuf + * @uri: an URI string + * + * Sets the icon for the specified URI. + * + * Deprecated: 0.4.4 + **/ void midori_location_action_set_icon_for_uri (MidoriLocationAction* location_action, GdkPixbuf* icon, const gchar* uri) { - #if !HAVE_HILDON - GSList* proxies; - #endif - - g_return_if_fail (MIDORI_IS_LOCATION_ACTION (location_action)); - g_return_if_fail (!icon || GDK_IS_PIXBUF (icon)); - g_return_if_fail (uri != NULL); - - #if !HAVE_HILDON - proxies = gtk_action_get_proxies (GTK_ACTION (location_action)); - - for (; proxies != NULL; proxies = g_slist_next (proxies)) - if (GTK_IS_TOOL_ITEM (proxies->data)) - { - GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data); - gtk_icon_entry_set_icon_from_pixbuf (GTK_ICON_ENTRY (entry), - GTK_ICON_ENTRY_PRIMARY, icon); - } - #endif + midori_location_action_set_icon (location_action, icon); } /** -- 2.39.5