midori_location_action_set_icon_for_uri is unneeded

This commit is contained in:
Christian Dywan 2012-01-24 23:33:54 +01:00
parent 3464afd167
commit e4475b4c49
2 changed files with 11 additions and 24 deletions

View file

@ -484,17 +484,12 @@ midori_view_notify_icon_cb (MidoriView* view,
GParamSpec* pspec, GParamSpec* pspec,
MidoriBrowser* browser) MidoriBrowser* browser)
{ {
const gchar* uri;
GtkAction* action; GtkAction* action;
if (midori_browser_get_current_tab (browser) != (GtkWidget*)view) if (midori_browser_get_current_tab (browser) != (GtkWidget*)view)
return; return;
uri = midori_view_get_display_uri (view);
action = _action_by_name (browser, "Location"); 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_location_action_set_icon (MIDORI_LOCATION_ACTION (action),
midori_view_get_icon (view)); midori_view_get_icon (view));
if (sokoke_is_app_or_private ()) if (sokoke_is_app_or_private ())

View file

@ -1536,30 +1536,22 @@ midori_location_action_add_item (MidoriLocationAction* location_action,
#endif #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 void
midori_location_action_set_icon_for_uri (MidoriLocationAction* location_action, midori_location_action_set_icon_for_uri (MidoriLocationAction* location_action,
GdkPixbuf* icon, GdkPixbuf* icon,
const gchar* uri) const gchar* uri)
{ {
#if !HAVE_HILDON midori_location_action_set_icon (location_action, icon);
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
} }
/** /**