[gedit] Fixes #143 - close without saving button color
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fixes #143 - close without saving button color
- Date: Mon, 8 Apr 2019 20:50:08 +0000 (UTC)
commit cb4db9fc5b6151897a8bf0b4ea0a57a4b9f4ff10
Author: Jordi Mas <jmas softcatala org>
Date: Mon Apr 8 22:49:40 2019 +0200
Fixes #143 - close without saving button color
gedit/gedit-close-confirmation-dialog.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-close-confirmation-dialog.c b/gedit/gedit-close-confirmation-dialog.c
index 85af73fff..0fdebfe95 100644
--- a/gedit/gedit-close-confirmation-dialog.c
+++ b/gedit/gedit-close-confirmation-dialog.c
@@ -273,10 +273,16 @@ gedit_close_confirmation_dialog_new_single (GtkWindow *parent,
static void
add_buttons (GeditCloseConfirmationDialog *dlg)
{
- gtk_dialog_add_buttons (GTK_DIALOG (dlg),
- _("Close _without Saving"), GTK_RESPONSE_NO,
- _("_Cancel"), GTK_RESPONSE_CANCEL,
- NULL);
+ GtkWidget *close_button;
+
+ close_button = gtk_dialog_add_button (GTK_DIALOG (dlg),
+ _("Close _without Saving"),
+ GTK_RESPONSE_NO);
+
+ gtk_style_context_add_class (gtk_widget_get_style_context (close_button),
+ "destructive-action");
+
+ gtk_dialog_add_button (GTK_DIALOG (dlg), _("_Cancel"), GTK_RESPONSE_CANCEL);
if (dlg->disable_save_to_disk)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]