summaryrefslogtreecommitdiff
path: root/capplets/common
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-01-26 11:06:00 +0100
committerraveit65 <[email protected]>2018-02-12 14:03:07 +0100
commit17b20172c581009a5d972dbb9bc523e7d3e4126d (patch)
treed18b5f4c993b16d5a70f0edfdd0ee5ae657aba3d /capplets/common
parent9e312c404d28250bd75782ba6f7a96ba9b707fb1 (diff)
downloadmate-control-center-17b20172c581009a5d972dbb9bc523e7d3e4126d.tar.bz2
mate-control-center-17b20172c581009a5d972dbb9bc523e7d3e4126d.tar.xz
avoid deprecated GtkStock
Diffstat (limited to 'capplets/common')
-rw-r--r--capplets/common/capplet-stock-icons.c2
-rw-r--r--capplets/common/file-transfer-dialog.c6
-rw-r--r--capplets/common/theme-thumbnail.c38
3 files changed, 29 insertions, 17 deletions
diff --git a/capplets/common/capplet-stock-icons.c b/capplets/common/capplet-stock-icons.c
index 9104e014..8488aa08 100644
--- a/capplets/common/capplet-stock-icons.c
+++ b/capplets/common/capplet-stock-icons.c
@@ -64,7 +64,7 @@ capplet_register_stock_icons (GtkIconFactory *factory)
if (!filename) {
g_warning (_("Unable to load stock icon '%s'\n"), items[i].name);
- icon_set = gtk_icon_factory_lookup_default (GTK_STOCK_MISSING_IMAGE);
+ icon_set = gtk_icon_factory_lookup_default ("gtk-missing-image");
gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
continue;
}
diff --git a/capplets/common/file-transfer-dialog.c b/capplets/common/file-transfer-dialog.c
index 8d2c2ec4..dc6a924d 100644
--- a/capplets/common/file-transfer-dialog.c
+++ b/capplets/common/file-transfer-dialog.c
@@ -329,7 +329,7 @@ file_transfer_dialog_init (FileTransferDialog *dlg)
dlg->priv->progress, FALSE, FALSE, 0);
gtk_dialog_add_button (GTK_DIALOG (dlg),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ "gtk-cancel", GTK_RESPONSE_CANCEL);
gtk_container_set_border_width (GTK_CONTAINER (dlg), 6);
@@ -441,8 +441,8 @@ file_transfer_dialog_overwrite (gpointer user_data)
button = gtk_button_new_with_label (_("_Overwrite"));
gtk_button_set_image (GTK_BUTTON (button),
- gtk_image_new_from_stock (GTK_STOCK_APPLY,
- GTK_ICON_SIZE_BUTTON));
+ gtk_image_new_from_icon_name ("gtk-apply",
+ GTK_ICON_SIZE_BUTTON));
gtk_dialog_add_action_widget (dialog, button, GTK_RESPONSE_YES);
gtk_widget_show (button);
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
index f55e79fa..7ecce692 100644
--- a/capplets/common/theme-thumbnail.c
+++ b/capplets/common/theme-thumbnail.c
@@ -172,7 +172,7 @@ create_meta_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
GtkWidget *preview;
GtkWidget *vbox;
GtkWidget *box;
- GtkWidget *stock_button;
+ GtkWidget *image_button;
GtkWidget *checkbox;
GtkWidget *radio;
@@ -220,11 +220,17 @@ create_meta_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_add (GTK_CONTAINER (preview), vbox);
- stock_button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
- gtk_widget_set_halign (stock_button, GTK_ALIGN_START);
- gtk_widget_set_valign (stock_button, GTK_ALIGN_START);
- gtk_widget_show (stock_button);
- gtk_box_pack_start (GTK_BOX (vbox), stock_button, FALSE, FALSE, 0);
+
+ image_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-open",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
+ gtk_widget_set_halign (image_button, GTK_ALIGN_START);
+ gtk_widget_set_valign (image_button, GTK_ALIGN_START);
+ gtk_widget_show (image_button);
+ gtk_box_pack_start (GTK_BOX (vbox), image_button, FALSE, FALSE, 0);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
checkbox = gtk_check_button_new ();
@@ -281,7 +287,7 @@ static GdkPixbuf *
create_gtk_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
{
GtkSettings *settings;
- GtkWidget *window, *vbox, *box, *stock_button, *checkbox, *radio;
+ GtkWidget *window, *vbox, *box, *image_button, *checkbox, *radio;
GtkRequisition requisition;
GtkAllocation allocation;
GdkPixbuf *pixbuf, *retval;
@@ -299,8 +305,14 @@ create_gtk_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0);
- stock_button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
- gtk_box_pack_start (GTK_BOX (box), stock_button, FALSE, FALSE, 0);
+
+ image_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-open",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
+ gtk_box_pack_start (GTK_BOX (box), image_button, FALSE, FALSE, 0);
checkbox = gtk_check_button_new ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), TRUE);
gtk_box_pack_start (GTK_BOX (box), checkbox, FALSE, FALSE, 0);
@@ -309,12 +321,12 @@ create_gtk_theme_pixbuf (ThemeThumbnailData *theme_thumbnail_data)
gtk_widget_show_all (window);
gtk_widget_show_all (vbox);
- gtk_widget_realize (stock_button);
- gtk_widget_realize (gtk_bin_get_child (GTK_BIN (stock_button)));
+ gtk_widget_realize (image_button);
+ gtk_widget_realize (gtk_bin_get_child (GTK_BIN (image_button)));
gtk_widget_realize (checkbox);
gtk_widget_realize (radio);
- gtk_widget_map (stock_button);
- gtk_widget_map (gtk_bin_get_child (GTK_BIN (stock_button)));
+ gtk_widget_map (image_button);
+ gtk_widget_map (gtk_bin_get_child (GTK_BIN (image_button)));
gtk_widget_map (checkbox);
gtk_widget_map (radio);