[Xfce4-commits] <midori:master> midori_location_action_set_icon_for_uri is unneeded

Christian Dywan noreply at xfce.org
Tue Jan 24 23:58:04 CET 2012


Updating branch refs/heads/master
         to e4475b4c495dcab6fe74b843b6f8acfef51f3c07 (commit)
       from 3464afd167b54d53c41d49a0d8a22c54f776a861 (commit)

commit e4475b4c495dcab6fe74b843b6f8acfef51f3c07
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Jan 24 23:33:54 2012 +0100

    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 859c3aa..72ab33b 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 64e652b..f725032 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);
 }
 
 /**


More information about the Xfce4-commits mailing list