diff options
author | Pablo Barciela <[email protected]> | 2018-03-27 03:30:18 +0200 |
---|---|---|
committer | Pablo Barciela <[email protected]> | 2018-03-27 03:36:06 +0200 |
commit | 15f06cebb1a2d07dfcbd5ef8b5a2f1226cae75e6 (patch) | |
tree | 14e24fa1c1fd401f659750263aebfa1f49906d74 | |
parent | 78648afdb7e55f6de81b92bf5b94cce929e00bfc (diff) | |
download | pluma-15f06cebb1a2d07dfcbd5ef8b5a2f1226cae75e6.tar.bz2 pluma-15f06cebb1a2d07dfcbd5ef8b5a2f1226cae75e6.tar.xz |
avoid 'gtk_dialog_add_buttons' with stock ids
-rw-r--r-- | plugins/spell/pluma-spell-language-dialog.c | 11 | ||||
-rw-r--r-- | pluma/dialogs/pluma-close-confirmation-dialog.c | 23 | ||||
-rw-r--r-- | pluma/dialogs/pluma-encodings-dialog.c | 11 | ||||
-rw-r--r-- | pluma/dialogs/pluma-preferences-dialog.c | 8 | ||||
-rw-r--r-- | pluma/dialogs/pluma-search-dialog.c | 4 | ||||
-rw-r--r-- | pluma/pluma-commands-file.c | 14 |
6 files changed, 33 insertions, 38 deletions
diff --git a/plugins/spell/pluma-spell-language-dialog.c b/plugins/spell/pluma-spell-language-dialog.c index beaf9572..fda020bd 100644 --- a/plugins/spell/pluma-spell-language-dialog.c +++ b/plugins/spell/pluma-spell-language-dialog.c @@ -129,14 +129,9 @@ create_dialog (PlumaSpellLanguageDialog *dlg, NULL }; - gtk_dialog_add_buttons (GTK_DIALOG (dlg), - "gtk-cancel", - GTK_RESPONSE_CANCEL, - "gtk-ok", - GTK_RESPONSE_OK, - "gtk-help", - GTK_RESPONSE_HELP, - NULL); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Cancel"), "process-stop", GTK_RESPONSE_CANCEL); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_OK"), "gtk-ok", GTK_RESPONSE_OK); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Help"), "help-browser", GTK_RESPONSE_HELP); gtk_window_set_title (GTK_WINDOW (dlg), _("Set language")); gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); diff --git a/pluma/dialogs/pluma-close-confirmation-dialog.c b/pluma/dialogs/pluma-close-confirmation-dialog.c index 8be49eda..21c27a08 100644 --- a/pluma/dialogs/pluma-close-confirmation-dialog.c +++ b/pluma/dialogs/pluma-close-confirmation-dialog.c @@ -151,8 +151,10 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, _("Close _without Saving"), GTK_RESPONSE_NO); - gtk_dialog_add_button (GTK_DIALOG (dlg), - "gtk-cancel", GTK_RESPONSE_CANCEL); + pluma_dialog_add_button (GTK_DIALOG (dlg), + _("_Cancel"), + "process-stop", + GTK_RESPONSE_CANCEL); } if (dlg->priv->disable_save_to_disk) @@ -162,7 +164,7 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, } else { - const gchar *icon_id = "gtk-save"; + const gchar *icon_id = "document-save"; if (GET_MODE (dlg->priv) == SINGLE_DOC_MODE) { @@ -172,12 +174,19 @@ set_logout_mode (PlumaCloseConfirmationDialog *dlg, if (pluma_document_get_readonly (doc) || pluma_document_is_untitled (doc)) - icon_id = "gtk-save-as"; + icon_id = "document-save-as"; } - gtk_dialog_add_button (GTK_DIALOG (dlg), - icon_id, - GTK_RESPONSE_YES); + if (g_strcmp0 (icon_id, "document-save") == 0) + pluma_dialog_add_button (GTK_DIALOG (dlg), + _("_Save"), + icon_id, + GTK_RESPONSE_YES); + else + pluma_dialog_add_button (GTK_DIALOG (dlg), + _("Save _As"), + icon_id, + GTK_RESPONSE_YES); gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_YES); diff --git a/pluma/dialogs/pluma-encodings-dialog.c b/pluma/dialogs/pluma-encodings-dialog.c index e71b5473..9a7dd160 100644 --- a/pluma/dialogs/pluma-encodings-dialog.c +++ b/pluma/dialogs/pluma-encodings-dialog.c @@ -309,14 +309,9 @@ pluma_encodings_dialog_init (PlumaEncodingsDialog *dlg) dlg->priv = PLUMA_ENCODINGS_DIALOG_GET_PRIVATE (dlg); - gtk_dialog_add_buttons (GTK_DIALOG (dlg), - "gtk-cancel", - GTK_RESPONSE_CANCEL, - "gtk-ok", - GTK_RESPONSE_OK, - "gtk-help", - GTK_RESPONSE_HELP, - NULL); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Cancel"), "process-stop", GTK_RESPONSE_CANCEL); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_OK"), "gtk-ok", GTK_RESPONSE_OK); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Help"), "help-browser", GTK_RESPONSE_HELP); gtk_window_set_title (GTK_WINDOW (dlg), _("Character Encodings")); gtk_window_set_default_size (GTK_WINDOW (dlg), 650, 400); diff --git a/pluma/dialogs/pluma-preferences-dialog.c b/pluma/dialogs/pluma-preferences-dialog.c index 7be6b55a..30e8dc8d 100644 --- a/pluma/dialogs/pluma-preferences-dialog.c +++ b/pluma/dialogs/pluma-preferences-dialog.c @@ -1081,12 +1081,8 @@ pluma_preferences_dialog_init (PlumaPreferencesDialog *dlg) dlg->priv = PLUMA_PREFERENCES_DIALOG_GET_PRIVATE (dlg); - gtk_dialog_add_buttons (GTK_DIALOG (dlg), - "gtk-close", - GTK_RESPONSE_CLOSE, - "gtk-help", - GTK_RESPONSE_HELP, - NULL); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Close"), "window-close", GTK_RESPONSE_CLOSE); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Help"), "help-browser", GTK_RESPONSE_HELP); gtk_window_set_title (GTK_WINDOW (dlg), _("Pluma Preferences")); gtk_window_set_resizable (GTK_WINDOW (dlg), FALSE); diff --git a/pluma/dialogs/pluma-search-dialog.c b/pluma/dialogs/pluma-search-dialog.c index acd55ba5..d19d0d85 100644 --- a/pluma/dialogs/pluma-search-dialog.c +++ b/pluma/dialogs/pluma-search-dialog.c @@ -330,9 +330,7 @@ pluma_search_dialog_init (PlumaSearchDialog *dlg) gtk_window_set_resizable (GTK_WINDOW (dlg), FALSE); gtk_window_set_destroy_with_parent (GTK_WINDOW (dlg), TRUE); - gtk_dialog_add_buttons (GTK_DIALOG (dlg), - "gtk-close", GTK_RESPONSE_CANCEL, - NULL); + pluma_dialog_add_button (GTK_DIALOG (dlg), _("_Close"), "window-close", GTK_RESPONSE_CANCEL); /* HIG defaults */ gtk_container_set_border_width (GTK_CONTAINER (dlg), 5); diff --git a/pluma/pluma-commands-file.c b/pluma/pluma-commands-file.c index eed10f51..2b8b5613 100644 --- a/pluma/pluma-commands-file.c +++ b/pluma/pluma-commands-file.c @@ -579,9 +579,10 @@ replace_read_only_file (GtkWindow *parent, GFile *file) _("Do you want to try to replace it " "with the one you are saving?")); - gtk_dialog_add_button (GTK_DIALOG (dialog), - "gtk-cancel", - GTK_RESPONSE_CANCEL); + pluma_dialog_add_button (GTK_DIALOG (dialog), + _("_Cancel"), + "process-stop", + GTK_RESPONSE_CANCEL); pluma_dialog_add_button (GTK_DIALOG (dialog), _("_Replace"), @@ -1218,9 +1219,10 @@ revert_dialog (PlumaWindow *window, gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - gtk_dialog_add_button (GTK_DIALOG (dialog), - "gtk-cancel", - GTK_RESPONSE_CANCEL); + pluma_dialog_add_button (GTK_DIALOG (dialog), + _("_Cancel"), + "process-stop", + GTK_RESPONSE_CANCEL); pluma_dialog_add_button (GTK_DIALOG (dialog), _("_Revert"), |