]> spindle.queued.net Git - midori/commitdiff
Don't use a custom stock icon for Cookie Manager
authorChristian Dywan <christian@twotoasts.de>
Tue, 5 Oct 2010 19:36:48 +0000 (21:36 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 5 Oct 2010 19:43:34 +0000 (21:43 +0200)
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.

extensions/cookie-manager/cookie-manager-page.c
extensions/cookie-manager/main.c

index a67d7dfff02cff0e1ed28765cc1fa218fb0d78a4..b6ab1c5aade2eef0117790f13e2ab2cd4c1accaa 100644 (file)
@@ -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)
 {
-       return STOCK_COOKIE_MANAGER;
+       return GTK_STOCK_DIALOG_AUTHENTICATION;
 }
 
 
index 39d058e94b3f3f78034260dd7a30332a709b0f32..81391db0abfd40f4ba19e36884e0d3d969be4df5 100644 (file)
@@ -31,28 +31,7 @@ static void cm_activate_cb(MidoriExtension *extension, MidoriApp *app, gpointer
 
 MidoriExtension *extension_init(void)
 {
-       MidoriExtension *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,
+       MidoriExtension *extension = g_object_new(MIDORI_TYPE_EXTENSION,
                "name", _("Cookie Manager"),
                "description", _("List, view and delete cookies"),
                "version", "0.2",