[gnome-terminal] window: Mark close button in close confirmation dialogue as destructive



commit a4d75ae94616234145c3b4a8f83ec5bd2ff27813
Author: Kowalski7cc <kowalski 7cc gmail com>
Date:   Thu Jan 21 00:42:32 2021 +0100

    window: Mark close button in close confirmation dialogue as destructive
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/252

 src/terminal-window.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/terminal-window.c b/src/terminal-window.c
index dcde10a8..537cd2e1 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -3242,7 +3242,8 @@ confirm_close_window_or_tab (TerminalWindow *window,
 
   gtk_window_set_title (GTK_WINDOW (dialog), ""); 
 
-  gtk_dialog_add_button (GTK_DIALOG (dialog), n_tabs > 1 ? _("C_lose Window") : _("C_lose Terminal"), 
GTK_RESPONSE_ACCEPT);
+  GtkWidget *remove_button = gtk_dialog_add_button (GTK_DIALOG (dialog), n_tabs > 1 ? _("C_lose Window") : 
_("C_lose Terminal"), GTK_RESPONSE_ACCEPT);
+  gtk_style_context_add_class (gtk_widget_get_style_context (remove_button), "destructive-action");
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
 
   g_object_set_data (G_OBJECT (dialog), "close-screen", screen);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]