summaryrefslogtreecommitdiff
path: root/plugins/filebrowser/pluma-file-browser-utils.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-01-18 23:24:59 +0100
committerraveit65 <[email protected]>2018-02-08 21:34:17 +0100
commit2217a021ca5c5ac918dd6e41c4ef29435b5a6b8e (patch)
tree136751a6809f3f9dc590c4fc8f0a588e7e86e190 /plugins/filebrowser/pluma-file-browser-utils.c
parent29d362e10ff63935fa1ecc12a0156b43fd3c11b9 (diff)
downloadpluma-2217a021ca5c5ac918dd6e41c4ef29435b5a6b8e.tar.bz2
pluma-2217a021ca5c5ac918dd6e41c4ef29435b5a6b8e.tar.xz
avoid deprecated GtkStock
Diffstat (limited to 'plugins/filebrowser/pluma-file-browser-utils.c')
-rw-r--r--plugins/filebrowser/pluma-file-browser-utils.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-utils.c b/plugins/filebrowser/pluma-file-browser-utils.c
index 3a232f8d..1443125a 100644
--- a/plugins/filebrowser/pluma-file-browser-utils.c
+++ b/plugins/filebrowser/pluma-file-browser-utils.c
@@ -149,7 +149,7 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
GtkMessageType type,
gchar const *message,
gchar const *secondary,
- gchar const * button_stock,
+ gchar const * button_image,
gchar const * button_label)
{
GtkWidget *dlg;
@@ -167,7 +167,12 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
(GTK_MESSAGE_DIALOG (dlg), "%s", secondary);
/* Add a cancel button */
- button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-cancel",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_show (button);
gtk_widget_set_can_default (button, TRUE);
@@ -176,10 +181,13 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
GTK_RESPONSE_CANCEL);
/* Add custom button */
- button = gtk_button_new_from_stock (button_stock);
-
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", button_image,
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
if (button_label) {
- gtk_button_set_use_stock (GTK_BUTTON (button), FALSE);
gtk_button_set_label (GTK_BUTTON (button), button_label);
}