[epiphany] Use destructive action style for discard form / close with multiple tabs dialogs



commit df4935207b2ec89f865a97cda51a7f1b95fd5509
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Tue Nov 5 17:23:06 2019 +0100

    Use destructive action style for discard form / close with multiple tabs dialogs
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/950

 src/ephy-window.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 71b034abe..ffd7d48a5 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -240,6 +240,7 @@ construct_confirm_close_dialog (EphyWindow *window,
                                 const char *action)
 {
   GtkWidget *dialog;
+  GtkWidget *button;
 
   dialog = gtk_message_dialog_new (GTK_WINDOW (window),
                                    GTK_DIALOG_MODAL,
@@ -249,8 +250,8 @@ construct_confirm_close_dialog (EphyWindow *window,
 
   gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", info);
 
-  gtk_dialog_add_button (GTK_DIALOG (dialog),
-                         action, GTK_RESPONSE_ACCEPT);
+  button = gtk_dialog_add_button (GTK_DIALOG (dialog), action, GTK_RESPONSE_ACCEPT);
+  gtk_style_context_add_class (gtk_widget_get_style_context (button), "destructive-action");
 
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
 


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