summaryrefslogtreecommitdiff
path: root/pluma/pluma-file-chooser-dialog.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-04-14 01:53:50 +0200
committerPablo Barciela <[email protected]>2018-04-14 01:53:50 +0200
commit4de5f8786543f0c2b0972b6273051892982bf308 (patch)
tree648f31abae35d7a13fa85a4ebf1fb3b1016344b2 /pluma/pluma-file-chooser-dialog.c
parentac1a33614fd26f77285ed327491e58d34376dd2d (diff)
downloadpluma-4de5f8786543f0c2b0972b6273051892982bf308.tar.bz2
pluma-4de5f8786543f0c2b0972b6273051892982bf308.tar.xz
avoid 'pluma_file_chooser_dialog_new' with stock ids
Diffstat (limited to 'pluma/pluma-file-chooser-dialog.c')
-rw-r--r--pluma/pluma-file-chooser-dialog.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/pluma/pluma-file-chooser-dialog.c b/pluma/pluma-file-chooser-dialog.c
index 9e6a855b..2b50100e 100644
--- a/pluma/pluma-file-chooser-dialog.c
+++ b/pluma/pluma-file-chooser-dialog.c
@@ -47,6 +47,7 @@
#include "pluma-prefs-manager-app.h"
#include "pluma-debug.h"
#include "pluma-enum-types.h"
+#include "pluma-utils.h"
#define PLUMA_FILE_CHOOSER_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_FILE_CHOOSER_DIALOG, PlumaFileChooserDialogPrivate))
@@ -435,7 +436,15 @@ pluma_file_chooser_dialog_new_valist (const gchar *title,
{
response_id = va_arg (varargs, gint);
- gtk_dialog_add_button (GTK_DIALOG (result), button_text, response_id);
+ if (g_strcmp0 (button_text, "process-stop") == 0)
+ pluma_dialog_add_button (GTK_DIALOG (result), _("_Cancel"), button_text, response_id);
+ else if (g_strcmp0 (button_text, "document-open") == 0)
+ pluma_dialog_add_button (GTK_DIALOG (result), _("_Open"), button_text, response_id);
+ else if (g_strcmp0 (button_text, "document-save") == 0)
+ pluma_dialog_add_button (GTK_DIALOG (result), _("_Save"), button_text, response_id);
+ else
+ gtk_dialog_add_button (GTK_DIALOG (result), button_text, response_id);
+
if ((response_id == GTK_RESPONSE_OK) ||
(response_id == GTK_RESPONSE_ACCEPT) ||
(response_id == GTK_RESPONSE_YES) ||
@@ -453,7 +462,7 @@ pluma_file_chooser_dialog_new_valist (const gchar *title,
* @title: (allow-none): Title of the dialog, or %NULL
* @parent: (allow-none): Transient parent of the dialog, or %NULL
* @action: Open or save mode for the dialog
- * @first_button_text: (allow-none): stock ID or text to go in
+ * @first_button_text: (allow-none): icon name or text to go in
* the first button, or %NULL
* @...: (allow-none): response ID for the first button, then
* additional (button, id) pairs, ending with %NULL