_action_location_focus_in (GtkAction* action,
MidoriBrowser* browser)
{
- midori_location_action_set_secondary_icon (
- MIDORI_LOCATION_ACTION (action), GTK_STOCK_JUMP_TO);
+ GdkScreen* screen = gtk_widget_get_screen (browser->notebook);
+ GtkIconTheme* icon_theme = gtk_icon_theme_get_for_screen (screen);
+ if (gtk_icon_theme_has_icon (icon_theme, "go-jump-symbolic"))
+ midori_location_action_set_secondary_icon (
+ MIDORI_LOCATION_ACTION (action), "go-jump-symbolic");
+ else
+ midori_location_action_set_secondary_icon (
+ MIDORI_LOCATION_ACTION (action), GTK_STOCK_JUMP_TO);
}
static void
}
}
+/**
+ * midori_location_action_set_security_hint:
+ * @location_action: a #MidoriLocationAction
+ * @icon: a stock ID, or an icon name
+ *
+ * Sets the secondary, ie right hand side icon.
+ *
+ * Since 0.4.6 @icon can be a stock ID or an icon name.
+ **/
void
midori_location_action_set_secondary_icon (MidoriLocationAction* location_action,
const gchar* stock_id)
GtkStockItem stock_item;
g_return_if_fail (MIDORI_IS_LOCATION_ACTION (location_action));
- g_return_if_fail (!stock_id || gtk_stock_lookup (stock_id, &stock_item));
katze_assign (location_action->secondary_icon, g_strdup (stock_id));
if (GTK_IS_TOOL_ITEM (proxies->data))
{
GtkWidget* entry = midori_location_action_entry_for_proxy (proxies->data);
- gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
- GTK_ICON_ENTRY_SECONDARY, stock_id);
+ if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
+ gtk_icon_entry_set_icon_from_stock (GTK_ICON_ENTRY (entry),
+ GTK_ICON_ENTRY_SECONDARY, stock_id);
+ else
+ gtk_icon_entry_set_icon_from_icon_name (GTK_ICON_ENTRY (entry),
+ GTK_ICON_ENTRY_SECONDARY, stock_id);
}
#endif
}