From 39cadaa36e7a83cd6bab527b0e1a2878492f0ea0 Mon Sep 17 00:00:00 2001 From: NikoKrause Date: Thu, 15 Nov 2018 11:10:25 +0100 Subject: [PATCH] close dialog: use "suggested-action" style class (#261) ... for the default actions (save as, save) --- xed/xed-close-confirmation-dialog.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xed/xed-close-confirmation-dialog.c b/xed/xed-close-confirmation-dialog.c index b72f16e..deecf0a 100755 --- a/xed/xed-close-confirmation-dialog.c +++ b/xed/xed-close-confirmation-dialog.c @@ -129,6 +129,8 @@ static void set_logout_mode (XedCloseConfirmationDialog *dlg, gboolean logout_mode) { + GtkWidget *button; + dlg->priv->logout_mode = logout_mode; if (logout_mode) @@ -159,11 +161,15 @@ set_logout_mode (XedCloseConfirmationDialog *dlg, if (save_as) { - gtk_dialog_add_button (GTK_DIALOG (dlg), _("_Save As..."), GTK_RESPONSE_YES); + button = gtk_dialog_add_button (GTK_DIALOG (dlg), _("_Save As..."), GTK_RESPONSE_YES); + gtk_style_context_add_class (gtk_widget_get_style_context (button), + GTK_STYLE_CLASS_SUGGESTED_ACTION); } else { - gtk_dialog_add_button (GTK_DIALOG (dlg), _("_Save"), GTK_RESPONSE_YES); + button = gtk_dialog_add_button (GTK_DIALOG (dlg), _("_Save"), GTK_RESPONSE_YES); + gtk_style_context_add_class (gtk_widget_get_style_context (button), + GTK_STYLE_CLASS_SUGGESTED_ACTION); } gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_YES);