[Xfce4-commits] [xfce/xfce4-panel] 01/01: Replace more references to GtkStock (Bug #13528)

noreply at xfce.org noreply at xfce.org
Wed Apr 26 22:35:33 CEST 2017


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository xfce/xfce4-panel.

commit 867275a79b66d521a53e6fcfefdac6af8c5e4b86
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Wed Apr 26 22:35:14 2017 +0200

    Replace more references to GtkStock (Bug #13528)
---
 libxfce4panel/xfce-panel-convenience.c | 2 +-
 migrate/main.c                         | 2 +-
 panel/panel-dialogs.c                  | 6 +++---
 panel/panel-item-dialog.c              | 4 +---
 panel/panel-plugin-external.c          | 4 ++--
 panel/panel-preferences-dialog.c       | 8 ++++----
 panel/panel-tic-tac-toe.c              | 2 +-
 plugins/launcher/launcher.c            | 4 ++--
 8 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/libxfce4panel/xfce-panel-convenience.c b/libxfce4panel/xfce-panel-convenience.c
index c22c00f..597dbb7 100644
--- a/libxfce4panel/xfce-panel-convenience.c
+++ b/libxfce4panel/xfce-panel-convenience.c
@@ -259,7 +259,7 @@ xfce_panel_pixbuf_from_source_at_size (const gchar  *source,
         icon_theme = gtk_icon_theme_get_default ();
 
       /* bit ugly as a fallback, but in most cases better then no icon */
-      pixbuf = gtk_icon_theme_load_icon (icon_theme, GTK_STOCK_MISSING_IMAGE,
+      pixbuf = gtk_icon_theme_load_icon (icon_theme, "image-missing",
                                          size, GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
     }
 
diff --git a/migrate/main.c b/migrate/main.c
index d4fc312..8da271b 100644
--- a/migrate/main.c
+++ b/migrate/main.c
@@ -115,7 +115,7 @@ main (gint argc, gchar **argv)
       dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
                                        _("Welcome to the first start of the panel"));
       gtk_window_set_title (GTK_WINDOW (dialog), _("Panel"));
-      gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_PREFERENCES);
+      gtk_window_set_icon_name (GTK_WINDOW (dialog), "preferences-system");
       gtk_window_stick (GTK_WINDOW (dialog));
       gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
 
diff --git a/panel/panel-dialogs.c b/panel/panel-dialogs.c
index 3742005..2e58ee0 100644
--- a/panel/panel-dialogs.c
+++ b/panel/panel-dialogs.c
@@ -124,10 +124,10 @@ panel_dialogs_choose_panel (PanelApplication *application)
   /* setup the dialog */
   dialog = gtk_dialog_new_with_buttons (_("Add New Item"), NULL,
                                         0,
-                                        GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                        GTK_STOCK_ADD, GTK_RESPONSE_OK, NULL);
+                                        _("Cancel"), GTK_RESPONSE_CANCEL,
+                                        _("Add"), GTK_RESPONSE_OK, NULL);
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
-  gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_ADD);
+  gtk_window_set_icon_name (GTK_WINDOW (dialog), "list-add");
   gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
 
   /* create widgets */
diff --git a/panel/panel-item-dialog.c b/panel/panel-item-dialog.c
index bf95558..ddb3a1b 100644
--- a/panel/panel-item-dialog.c
+++ b/panel/panel-item-dialog.c
@@ -223,9 +223,7 @@ panel_item_dialog_init (PanelItemDialog *dialog)
   gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
   gtk_widget_set_tooltip_text (entry, _("Enter search phrase here"));
-#if GTK_CHECK_VERSION (2, 16, 0)
-  gtk_entry_set_icon_from_stock (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
-#endif
+  gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, "edit-find");
   gtk_widget_show (entry);
 
   /* scroller */
diff --git a/panel/panel-plugin-external.c b/panel/panel-plugin-external.c
index e0cb011..e10543e 100644
--- a/panel/panel-plugin-external.c
+++ b/panel/panel-plugin-external.c
@@ -432,8 +432,8 @@ panel_plugin_external_child_ask_restart_dialog (GtkWindow   *parent,
                                             "the last %d seconds. If you press Execute the panel will try to restart "
                                             "the plugin otherwise it will be permanently removed from the panel."),
                                             PANEL_PLUGIN_AUTO_RESTART);
-  gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_EXECUTE, GTK_RESPONSE_OK,
-                          GTK_STOCK_REMOVE, GTK_RESPONSE_CLOSE, NULL);
+  gtk_dialog_add_buttons (GTK_DIALOG (dialog), "system-run", GTK_RESPONSE_OK,
+                          "list-remove", GTK_RESPONSE_CLOSE, NULL);
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
   gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
 
diff --git a/panel/panel-preferences-dialog.c b/panel/panel-preferences-dialog.c
index 2c1871a..387c480 100644
--- a/panel/panel-preferences-dialog.c
+++ b/panel/panel-preferences-dialog.c
@@ -466,7 +466,7 @@ panel_preferences_dialog_bindings_update (PanelPreferencesDialog *dialog)
   /* get run mode of the driver (multiple screens or randr) */
   screen = gtk_widget_get_screen (GTK_WIDGET (dialog->active));
   display = gtk_widget_get_display (GTK_WIDGET (dialog->active));
-  n_screens = gdk_display_get_n_screens (display);
+  n_screens = 1;
   n_monitors = 1;
   if (G_LIKELY (n_screens <= 1))
     {
@@ -677,7 +677,7 @@ panel_preferences_dialog_bg_style_changed (PanelPreferencesDialog *dialog)
   object = gtk_builder_get_object (GTK_BUILDER (dialog), "background-rgba");
   panel_return_if_fail (GTK_IS_WIDGET (object));
   g_object_get (G_OBJECT (dialog->active), "composited", &composited, NULL);
-  gtk_color_chooser_set_use_alpha (object, composited);
+  gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (object), composited);
 
   object = gtk_builder_get_object (GTK_BUILDER (dialog), "bg-color-box");
   panel_return_if_fail (GTK_IS_WIDGET (object));
@@ -1203,8 +1203,8 @@ panel_preferences_dialog_item_remove (GtkWidget              *button,
       gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (widget),
                                                 _("If you remove the item from the panel, "
                                                   "it is permanently lost."));
-      gtk_dialog_add_buttons (GTK_DIALOG (widget), GTK_STOCK_CANCEL, GTK_RESPONSE_NO,
-                              GTK_STOCK_REMOVE, GTK_RESPONSE_YES, NULL);
+      gtk_dialog_add_buttons (GTK_DIALOG (widget), _("Cancel"), GTK_RESPONSE_NO,
+                              _("Remove"), GTK_RESPONSE_YES, NULL);
       gtk_dialog_set_default_response (GTK_DIALOG (widget), GTK_RESPONSE_NO);
 
       /* run the dialog */
diff --git a/panel/panel-tic-tac-toe.c b/panel/panel-tic-tac-toe.c
index f552c1b..29f3e6d 100644
--- a/panel/panel-tic-tac-toe.c
+++ b/panel/panel-tic-tac-toe.c
@@ -121,7 +121,7 @@ panel_tic_tac_toe_init (PanelTicTacToe *dialog)
 
   button = xfce_gtk_button_new_mixed (GTK_STOCK_NEW, _("_New Game"));
   gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_ACCEPT);
-  gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+  gtk_dialog_add_button (GTK_DIALOG (dialog), _("Close"), GTK_RESPONSE_CLOSE);
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), vbox, TRUE, TRUE, 0);
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index fd2269b..d700cb1 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -1752,7 +1752,7 @@ launcher_plugin_button_update (LauncherPlugin *plugin)
 
       icon_name = garcon_menu_item_get_icon_name (item);
       gtk_image_set_from_icon_name (GTK_IMAGE (plugin->child),
-          panel_str_is_empty (icon_name) ? GTK_STOCK_MISSING_IMAGE : icon_name,
+          panel_str_is_empty (icon_name) ? "image-missing" : icon_name,
           icon_size);
 
       panel_utils_set_atk_info (plugin->button,
@@ -1764,7 +1764,7 @@ launcher_plugin_button_update (LauncherPlugin *plugin)
       /* set missing image icon */
       panel_return_if_fail (GTK_IS_WIDGET (plugin->child));
       gtk_image_set_from_icon_name (GTK_IMAGE (plugin->child),
-                                    GTK_STOCK_MISSING_IMAGE, icon_size);
+                                    "image-missing", icon_size);
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list