Don't use a custom stock icon for Cookie Manager
Due to the change of the stock icon names in GTK+ 2.22 the stock item trick doesn't work anymore. Using the authentication icon directly is good enough.
This commit is contained in:
parent
2cf3c2f5b0
commit
1e49e9f95c
2 changed files with 2 additions and 23 deletions
|
@ -85,7 +85,7 @@ static const gchar *cookie_manager_page_get_label(MidoriViewable *viewable)
|
||||||
|
|
||||||
static const gchar *cookie_manager_page_get_stock_id(MidoriViewable *viewable)
|
static const gchar *cookie_manager_page_get_stock_id(MidoriViewable *viewable)
|
||||||
{
|
{
|
||||||
return STOCK_COOKIE_MANAGER;
|
return GTK_STOCK_DIALOG_AUTHENTICATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,28 +31,7 @@ static void cm_activate_cb(MidoriExtension *extension, MidoriApp *app, gpointer
|
||||||
|
|
||||||
MidoriExtension *extension_init(void)
|
MidoriExtension *extension_init(void)
|
||||||
{
|
{
|
||||||
MidoriExtension *extension;
|
MidoriExtension *extension = g_object_new(MIDORI_TYPE_EXTENSION,
|
||||||
GtkIconFactory *factory;
|
|
||||||
GtkIconSource *icon_source;
|
|
||||||
GtkIconSet *icon_set;
|
|
||||||
static GtkStockItem items[] =
|
|
||||||
{
|
|
||||||
{ STOCK_COOKIE_MANAGER, N_("_Cookie Manager"), 0, 0, NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
factory = gtk_icon_factory_new();
|
|
||||||
gtk_stock_add(items, G_N_ELEMENTS(items));
|
|
||||||
icon_set = gtk_icon_set_new();
|
|
||||||
icon_source = gtk_icon_source_new();
|
|
||||||
gtk_icon_source_set_icon_name(icon_source, GTK_STOCK_DIALOG_AUTHENTICATION);
|
|
||||||
gtk_icon_set_add_source(icon_set, icon_source);
|
|
||||||
gtk_icon_source_free(icon_source);
|
|
||||||
gtk_icon_factory_add(factory, STOCK_COOKIE_MANAGER, icon_set);
|
|
||||||
gtk_icon_set_unref(icon_set);
|
|
||||||
gtk_icon_factory_add_default(factory);
|
|
||||||
g_object_unref(factory);
|
|
||||||
|
|
||||||
extension = g_object_new(MIDORI_TYPE_EXTENSION,
|
|
||||||
"name", _("Cookie Manager"),
|
"name", _("Cookie Manager"),
|
||||||
"description", _("List, view and delete cookies"),
|
"description", _("List, view and delete cookies"),
|
||||||
"version", "0.2",
|
"version", "0.2",
|
||||||
|
|
Loading…
Reference in a new issue