[Xfce4-commits] [apps/xfburn] 03/42: Remove gtk_image_new_from_stock usage

noreply at xfce.org noreply at xfce.org
Tue Oct 15 02:21:46 CEST 2019


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

k   a   t   a   n   a   s   t   e   e   l       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfburn.

commit 78035a1343a58aaa99374d437d6e7e7d9cc9e09f
Author: Romain B <skunnyk at alteroot.org>
Date:   Sun Nov 19 22:35:37 2017 +0100

    Remove gtk_image_new_from_stock usage
    
    - Also remove gtk_widget_render_icon usage and migrate to gtk_icon_theme_load_icon
---
 xfburn/xfburn-burn-audio-cd-composition-dialog.c  | 2 +-
 xfburn/xfburn-burn-data-composition-base-dialog.c | 2 +-
 xfburn/xfburn-copy-cd-dialog.c                    | 2 +-
 xfburn/xfburn-copy-dvd-dialog.c                   | 2 +-
 xfburn/xfburn-device-list.c                       | 2 +-
 xfburn/xfburn-notebook-tab.c                      | 2 +-
 xfburn/xfburn-preferences-dialog.c                | 7 +++----
 xfburn/xfburn-progress-dialog.c                   | 4 ++--
 xfburn/xfburn-utils.c                             | 2 +-
 9 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/xfburn/xfburn-burn-audio-cd-composition-dialog.c b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
index a7d8c2d..5213d5d 100644
--- a/xfburn/xfburn-burn-audio-cd-composition-dialog.c
+++ b/xfburn/xfburn-burn-audio-cd-composition-dialog.c
@@ -147,7 +147,7 @@ xfburn_burn_audio_cd_composition_dialog_constructor (GType type, guint n_constru
 
   gtk_window_set_title (GTK_WINDOW (obj), _("Burn Composition"));
   gtk_window_set_destroy_with_parent (GTK_WINDOW (obj), TRUE);
-  icon = gtk_widget_render_icon (GTK_WIDGET (obj), XFBURN_STOCK_BURN_CD, GTK_ICON_SIZE_DIALOG, NULL);
+  icon = gtk_widget_render_icon (GTK_WIDGET (obj), "stock_xfburn", GTK_ICON_SIZE_DIALOG, NULL);
   gtk_window_set_icon (GTK_WINDOW (obj), icon);
   g_object_unref (icon);
 
diff --git a/xfburn/xfburn-burn-data-composition-base-dialog.c b/xfburn/xfburn-burn-data-composition-base-dialog.c
index 6ad4bf7..a138177 100644
--- a/xfburn/xfburn-burn-data-composition-base-dialog.c
+++ b/xfburn/xfburn-burn-data-composition-base-dialog.c
@@ -273,7 +273,7 @@ xfburn_burn_data_composition_base_dialog_constructor (GType type, guint n_constr
   gtk_widget_show (priv->entry_path_iso);
   gtk_box_pack_start (GTK_BOX (priv->hbox_iso), priv->entry_path_iso, FALSE, FALSE, 0);
 
-  img = gtk_image_new_from_stock ("folder", GTK_ICON_SIZE_SMALL_TOOLBAR);
+  img = gtk_image_new_from_icon_name ("folder", GTK_ICON_SIZE_SMALL_TOOLBAR);
   gtk_widget_show (img);
   button = gtk_button_new ();
   gtk_container_add (GTK_CONTAINER (button), img);
diff --git a/xfburn/xfburn-copy-cd-dialog.c b/xfburn/xfburn-copy-cd-dialog.c
index ab9ad6f..934d856 100644
--- a/xfburn/xfburn-copy-cd-dialog.c
+++ b/xfburn/xfburn-copy-cd-dialog.c
@@ -177,7 +177,7 @@ xfburn_copy_cd_dialog_init (XfburnCopyCdDialog * obj)
   g_free (tmp_dir);
   gtk_box_pack_start (GTK_BOX (priv->hbox_iso), priv->entry_path_iso, FALSE, FALSE, 0);
 
-  img = gtk_image_new_from_stock ("folder", GTK_ICON_SIZE_SMALL_TOOLBAR);
+  img = gtk_image_new_from_icon_name ("folder", GTK_ICON_SIZE_SMALL_TOOLBAR);
   gtk_widget_show (img);
   button = gtk_button_new ();
   gtk_container_add (GTK_CONTAINER (button), img);
diff --git a/xfburn/xfburn-copy-dvd-dialog.c b/xfburn/xfburn-copy-dvd-dialog.c
index deccc71..94c6e8c 100644
--- a/xfburn/xfburn-copy-dvd-dialog.c
+++ b/xfburn/xfburn-copy-dvd-dialog.c
@@ -177,7 +177,7 @@ xfburn_copy_dvd_dialog_init (XfburnCopyDvdDialog * obj)
   g_free (tmp_dir);
   gtk_box_pack_start (GTK_BOX (priv->hbox_iso), priv->entry_path_iso, FALSE, FALSE, 0);
 
-  img = gtk_image_new_from_stock ("folder", GTK_ICON_SIZE_SMALL_TOOLBAR);
+  img = gtk_image_new_from_icon_name ("folder", GTK_ICON_SIZE_SMALL_TOOLBAR);
   gtk_widget_show (img);
   button = gtk_button_new ();
   gtk_container_add (GTK_CONTAINER (button), img);
diff --git a/xfburn/xfburn-device-list.c b/xfburn/xfburn-device-list.c
index 04fe683..2b1a26b 100644
--- a/xfburn/xfburn-device-list.c
+++ b/xfburn/xfburn-device-list.c
@@ -458,7 +458,7 @@ xfburn_device_list_get_refresh_button (XfburnDeviceList *devlist)
   XfburnDeviceListPrivate *priv = GET_PRIVATE (devlist);
   GtkWidget *img, *button;
 
-  img = gtk_image_new_from_stock ("view-refresh", GTK_ICON_SIZE_SMALL_TOOLBAR);
+  img = gtk_image_new_from_icon_name ("view-refresh", GTK_ICON_SIZE_SMALL_TOOLBAR);
   gtk_widget_show (img);
   button = gtk_button_new ();
   gtk_container_add (GTK_CONTAINER (button), img);
diff --git a/xfburn/xfburn-notebook-tab.c b/xfburn/xfburn-notebook-tab.c
index 38d96b5..3b82793 100644
--- a/xfburn/xfburn-notebook-tab.c
+++ b/xfburn/xfburn-notebook-tab.c
@@ -127,7 +127,7 @@ xfburn_notebook_tab_init (XfburnNotebookTab * tab)
   gtk_button_set_relief (GTK_BUTTON (priv->button_close), GTK_RELIEF_NONE);
   gtk_widget_show (priv->button_close);
 	
-  img = gtk_image_new_from_stock ("window-close", GTK_ICON_SIZE_MENU);
+  img = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU);
   gtk_widget_show (img);
   gtk_container_add (GTK_CONTAINER (priv->button_close), img);
   gtk_box_pack_start (hbox, priv->button_close, FALSE, FALSE, 0);
diff --git a/xfburn/xfburn-preferences-dialog.c b/xfburn/xfburn-preferences-dialog.c
index 2304a43..309ed01 100644
--- a/xfburn/xfburn-preferences-dialog.c
+++ b/xfburn/xfburn-preferences-dialog.c
@@ -216,10 +216,9 @@ xfburn_preferences_dialog_init (XfburnPreferencesDialog * obj)
   gtk_box_pack_start (GTK_BOX (vbox2), priv->check_show_human_readable, FALSE, FALSE, BORDER);
   gtk_widget_show (priv->check_show_human_readable);
 
-  icon = gtk_widget_render_icon (GTK_WIDGET (priv->icon_bar),
-                                 "document-properties",
-                                 GTK_ICON_SIZE_DIALOG,
-                                 NULL);
+  gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &x, &y);
+  icon = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "document-properties", x, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
+
   gtk_list_store_append (icon_store, &iter);
   gtk_list_store_set (icon_store, &iter,
                       SETTINGS_LIST_PIXBUF_COLUMN, icon,
diff --git a/xfburn/xfburn-progress-dialog.c b/xfburn/xfburn-progress-dialog.c
index 5270621..6d0a46d 100644
--- a/xfburn/xfburn-progress-dialog.c
+++ b/xfburn/xfburn-progress-dialog.c
@@ -246,12 +246,12 @@ xfburn_progress_dialog_init (XfburnProgressDialog * obj)
   gtk_widget_show (priv->buffer_bar);
 
   /* action buttons */
-  priv->button_stop = gtk_button_new_from_stock ("process-stop");
+  priv->button_stop = gtk_button_new_from_stock ("_Stop");
   gtk_widget_show (priv->button_stop);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), priv->button_stop, GTK_RESPONSE_CANCEL);
   g_signal_connect (G_OBJECT (priv->button_stop), "clicked", G_CALLBACK (cb_button_stop_clicked), obj);
 
-  priv->button_close = gtk_button_new_from_stock ("window-close");
+  priv->button_close = gtk_button_new_from_stock ("gtk-close");
   gtk_widget_show (priv->button_close);
   gtk_dialog_add_action_widget (GTK_DIALOG (obj), priv->button_close, GTK_RESPONSE_CLOSE);
   GTK_WIDGET_SET_FLAGS (priv->button_close, GTK_CAN_DEFAULT);
diff --git a/xfburn/xfburn-utils.c b/xfburn/xfburn-utils.c
index 08887be..f483e33 100644
--- a/xfburn/xfburn-utils.c
+++ b/xfburn/xfburn-utils.c
@@ -191,7 +191,7 @@ xfburn_gtk_button_new_mixed (const gchar *stock_id, const gchar *label)
         button = gtk_button_new_with_mnemonic (label);
         if (stock_id != NULL) {
             /* create image widget */
-            image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
+            image = gtk_image_new_from_icon_name (stock_id, GTK_ICON_SIZE_BUTTON);
             gtk_button_set_image (GTK_BUTTON (button), image);
         }
     } else {

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


More information about the Xfce4-commits mailing list