}
}
+static void
+midori_browser_update_secondary_icon (MidoriBrowser* browser,
+ MidoriView* view,
+ GtkAction* action)
+{
+ if (g_object_get_data (G_OBJECT (view), "news-feeds"))
+ {
+ midori_location_action_set_secondary_icon (
+ MIDORI_LOCATION_ACTION (action), STOCK_NEWS_FEED);
+ _action_set_sensitive (browser, "AddNewsFeed", TRUE);
+ }
+ else
+ {
+ midori_location_action_set_secondary_icon (
+ MIDORI_LOCATION_ACTION (action), NULL);
+ _action_set_sensitive (browser, "AddNewsFeed", FALSE);
+ }
+}
+
static void
_midori_browser_update_interface (MidoriBrowser* browser)
{
#endif
action = _action_by_name (browser, "Location");
- if (g_object_get_data (G_OBJECT (view), "news-feeds"))
- {
- midori_location_action_set_secondary_icon (
- MIDORI_LOCATION_ACTION (action), STOCK_NEWS_FEED);
- _action_set_sensitive (browser, "AddNewsFeed", TRUE);
- }
- else
- {
- midori_location_action_set_secondary_icon (
- MIDORI_LOCATION_ACTION (action), GTK_STOCK_JUMP_TO);
- _action_set_sensitive (browser, "AddNewsFeed", FALSE);
- }
midori_location_action_set_security_hint (
MIDORI_LOCATION_ACTION (action), midori_view_get_security (view));
+ midori_browser_update_secondary_icon (browser, MIDORI_VIEW (view), action);
}
static void
#else
GtkAction* action = _action_by_name (browser, "Location");
MidoriLocationAction* location_action = MIDORI_LOCATION_ACTION (action);
- if (g_object_get_data (G_OBJECT (view), "news-feeds"))
- midori_location_action_set_secondary_icon (
- location_action, STOCK_NEWS_FEED);
- else
- midori_location_action_set_secondary_icon (
- location_action, GTK_STOCK_JUMP_TO);
+ midori_browser_update_secondary_icon (browser, view, action);
midori_location_action_set_text (location_action,
midori_view_get_display_uri (MIDORI_VIEW (view)));
#endif
{
midori_location_action_set_text (
MIDORI_LOCATION_ACTION (action), uri);
- midori_location_action_set_secondary_icon (
- MIDORI_LOCATION_ACTION (action), GTK_STOCK_JUMP_TO);
g_object_notify (G_OBJECT (browser), "uri");
}
if (!browser->show_navigationbar || midori_browser_is_fullscreen (browser))
gtk_widget_hide (browser->navigationbar);
- if (g_object_get_data (G_OBJECT (view), "news-feeds"))
- midori_location_action_set_secondary_icon (
- MIDORI_LOCATION_ACTION (action), STOCK_NEWS_FEED);
- else
- midori_location_action_set_secondary_icon (
- MIDORI_LOCATION_ACTION (action), GTK_STOCK_JUMP_TO);
+ midori_browser_update_secondary_icon (browser, MIDORI_VIEW (view), action);
}
static void