[gnome-panel/wip/gnome-3.10+: 39/75] panel-force-quit: don't use deprecated GtkStock



commit 6ea536c3f33f3a5f5cf6f3288be343a55bb43eee
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jul 9 17:14:31 2014 +0300

    panel-force-quit: don't use deprecated GtkStock

 gnome-panel/panel-force-quit.c  |    5 ++---
 gnome-panel/panel-stock-icons.c |   36 ------------------------------------
 gnome-panel/panel-stock-icons.h |    3 ---
 3 files changed, 2 insertions(+), 42 deletions(-)
---
diff --git a/gnome-panel/panel-force-quit.c b/gnome-panel/panel-force-quit.c
index 18da5cd..cb12c24 100644
--- a/gnome-panel/panel-force-quit.c
+++ b/gnome-panel/panel-force-quit.c
@@ -33,7 +33,6 @@
 #include <X11/extensions/XInput2.h>
 
 #include "panel-icon-names.h"
-#include "panel-stock-icons.h"
 
 static GdkFilterReturn popup_filter (GdkXEvent *gdk_xevent,
                                     GdkEvent  *event,
@@ -227,9 +226,9 @@ kill_window_question (gpointer window)
                                                  "in it might get lost."));
 
        gtk_dialog_add_buttons (GTK_DIALOG (dialog),
-                               GTK_STOCK_CANCEL,
+                               _("_Cancel"),
                                GTK_RESPONSE_CANCEL,
-                               PANEL_STOCK_FORCE_QUIT,
+                               _("_Force quit"),
                                GTK_RESPONSE_ACCEPT,
                                NULL);
  
diff --git a/gnome-panel/panel-stock-icons.c b/gnome-panel/panel-stock-icons.c
index 2216b0e..8262672 100644
--- a/gnome-panel/panel-stock-icons.c
+++ b/gnome-panel/panel-stock-icons.c
@@ -39,47 +39,12 @@ panel_menu_icon_get_size (void)
 
 typedef struct {
        char *stock_id;
-       char *icon;
-} PanelStockIcon;
-
-static PanelStockIcon stock_icons [] = {
-       { PANEL_STOCK_FORCE_QUIT, PANEL_ICON_FORCE_QUIT }
-};
-
-static void
-panel_init_stock_icons (GtkIconFactory *factory)
-{
-       GtkIconSource *source;
-       int            i;
-
-
-       source = gtk_icon_source_new ();
-
-       for (i = 0; i < G_N_ELEMENTS (stock_icons); i++) {
-               GtkIconSet *set;
-
-               gtk_icon_source_set_icon_name (source, stock_icons [i].icon);
-
-               set = gtk_icon_set_new ();
-               gtk_icon_set_add_source (set, source);
-
-               gtk_icon_factory_add (factory, stock_icons [i].stock_id, set);
-               gtk_icon_set_unref (set);
-       }
-
-       gtk_icon_source_free (source);
-
-}
-
-typedef struct {
-       char *stock_id;
        char *stock_icon_id;
        char *label;
 } PanelStockItem;
 
 static PanelStockItem stock_items [] = {
        { PANEL_STOCK_EXECUTE,     GTK_STOCK_EXECUTE,       N_("_Run") },
-       { PANEL_STOCK_FORCE_QUIT,  PANEL_STOCK_FORCE_QUIT,  N_("_Force quit") },
        { PANEL_STOCK_CLEAR,       GTK_STOCK_CLEAR,         N_("C_lear") },
        { PANEL_STOCK_DONT_DELETE, GTK_STOCK_CANCEL,        N_("D_on't Delete") }
 };
@@ -121,7 +86,6 @@ panel_init_stock_icons_and_items (void)
        factory = gtk_icon_factory_new ();
        gtk_icon_factory_add_default (factory);
 
-       panel_init_stock_icons (factory);
        panel_init_stock_items (factory);
 
        g_object_unref (factory);
diff --git a/gnome-panel/panel-stock-icons.h b/gnome-panel/panel-stock-icons.h
index 6d2eeaa..499bd22 100644
--- a/gnome-panel/panel-stock-icons.h
+++ b/gnome-panel/panel-stock-icons.h
@@ -31,9 +31,6 @@ G_BEGIN_DECLS
 /* themeable size - "panel-menu" -- This is used for the icons in the menus */
 #define PANEL_DEFAULT_MENU_ICON_SIZE           24
 
-/* stock icons */
-#define PANEL_STOCK_FORCE_QUIT          "gnome-panel-force-quit"
-
 /* stock items  - no point in theme the icons one these,
  * they use stock gtk icons and just modify the text
  * for the stock item.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]