diff options
author | Pablo Barciela <[email protected]> | 2018-02-20 15:56:07 +0100 |
---|---|---|
committer | Pablo Barciela <[email protected]> | 2018-02-20 15:56:07 +0100 |
commit | 43897cf72714b140cd5f50942f288be10a080d0e (patch) | |
tree | 610e89e5403ea8d26a37a7bf22a8a49c4abf57ac /src/terminal-app.c | |
parent | 90f1e19d3f2cf71d15bc624f5688c921c3cbd738 (diff) | |
download | mate-terminal-43897cf72714b140cd5f50942f288be10a080d0e.tar.bz2 mate-terminal-43897cf72714b140cd5f50942f288be10a080d0e.tar.xz |
terminal-app: avoid gtk_dialog_add_buttons with stock ids
Diffstat (limited to 'src/terminal-app.c')
-rw-r--r-- | src/terminal-app.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/src/terminal-app.c b/src/terminal-app.c index 3bfff75..ea47400 100644 --- a/src/terminal-app.c +++ b/src/terminal-app.c @@ -656,6 +656,24 @@ profile_list_delete_confirm_response_cb (GtkWidget *dialog, } static void +mate_dialog_add_button (GtkDialog *dialog, + const gchar *button_text, + const gchar *icon_name, + gint response_id) +{ + GtkWidget *button; + + button = gtk_button_new_with_mnemonic (button_text); + gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON)); + + gtk_button_set_use_underline (GTK_BUTTON (button), TRUE); + gtk_style_context_add_class (gtk_widget_get_style_context (button), "text-button"); + gtk_widget_set_can_default (button, TRUE); + gtk_widget_show (button); + gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id); +} + +static void profile_list_delete_button_clicked_cb (GtkWidget *button, GtkWidget *widget) { @@ -684,12 +702,15 @@ profile_list_delete_button_clicked_cb (GtkWidget *button, _("Delete profile ā%sā?"), terminal_profile_get_property_string (selected_profile, TERMINAL_PROFILE_VISIBLE_NAME)); - gtk_dialog_add_buttons (GTK_DIALOG (dialog), - "gtk-cancel", - GTK_RESPONSE_REJECT, - "gtk-delete", - GTK_RESPONSE_ACCEPT, - NULL); + mate_dialog_add_button (GTK_DIALOG (dialog), + _("_Cancel"), + "process-stop", + GTK_RESPONSE_REJECT); + + mate_dialog_add_button (GTK_DIALOG (dialog), + _("_Delete"), + "edit-delete", + GTK_RESPONSE_ACCEPT); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); |