diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-plugin.c | 8 | ||||
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-utils.c | 27 | ||||
-rw-r--r-- | plugins/filebrowser/pluma-file-browser-utils.h | 4 |
3 files changed, 12 insertions, 27 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c index 775d7b36..e3a5d1c9 100644 --- a/plugins/filebrowser/pluma-file-browser-plugin.c +++ b/plugins/filebrowser/pluma-file-browser-plugin.c @@ -1140,9 +1140,7 @@ on_confirm_no_trash_cb (PlumaFileBrowserWidget * widget, result = pluma_file_browser_utils_confirmation_dialog (window, GTK_MESSAGE_QUESTION, message, - secondary, - "gtk-delete", - NULL); + secondary); g_free (secondary); return result; @@ -1175,9 +1173,7 @@ on_confirm_delete_cb (PlumaFileBrowserWidget *widget, result = pluma_file_browser_utils_confirmation_dialog (PLUMA_WINDOW (data->window), GTK_MESSAGE_QUESTION, message, - secondary, - "gtk-delete", - NULL); + secondary); g_free (message); diff --git a/plugins/filebrowser/pluma-file-browser-utils.c b/plugins/filebrowser/pluma-file-browser-utils.c index 1443125a..8a2fbf64 100644 --- a/plugins/filebrowser/pluma-file-browser-utils.c +++ b/plugins/filebrowser/pluma-file-browser-utils.c @@ -22,6 +22,9 @@ #include "pluma-file-browser-utils.h" #include <pluma/pluma-utils.h> +#include <glib/gi18n.h> + + static GdkPixbuf * process_icon_pixbuf (GdkPixbuf * pixbuf, gchar const * name, @@ -148,9 +151,7 @@ gboolean pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, GtkMessageType type, gchar const *message, - gchar const *secondary, - gchar const * button_image, - gchar const * button_label) + gchar const *secondary) { GtkWidget *dlg; gint ret; @@ -167,11 +168,8 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, (GTK_MESSAGE_DIALOG (dlg), "%s", secondary); /* Add a cancel button */ - button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON, - "label", "gtk-cancel", - "use-stock", TRUE, - "use-underline", TRUE, - NULL)); + button = gtk_button_new_with_mnemonic (_("_Cancel")); + gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_BUTTON)); gtk_widget_show (button); @@ -180,16 +178,9 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, button, GTK_RESPONSE_CANCEL); - /* Add custom button */ - 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_label (GTK_BUTTON (button), button_label); - } + /* Add delete button */ + button = gtk_button_new_with_mnemonic (_("_Delete")); + gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("edit-delete", GTK_ICON_SIZE_BUTTON)); gtk_widget_show (button); gtk_widget_set_can_default (button, TRUE); diff --git a/plugins/filebrowser/pluma-file-browser-utils.h b/plugins/filebrowser/pluma-file-browser-utils.h index ffe6159e..e882055a 100644 --- a/plugins/filebrowser/pluma-file-browser-utils.h +++ b/plugins/filebrowser/pluma-file-browser-utils.h @@ -18,9 +18,7 @@ gchar * pluma_file_browser_utils_uri_basename (gchar const * uri); gboolean pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window, GtkMessageType type, gchar const *message, - gchar const *secondary, - gchar const * button_image, - gchar const * button_label); + gchar const *secondary); #endif /* __PLUMA_FILE_BROWSER_UTILS_H__ */ |