[gtk+] dialog: remove suggested action class when changing default action



commit 2cc1bf4edf46b326d5b84776881e0cdcd750aefb
Author: William Jon McCann <william jon mccann gmail com>
Date:   Thu Feb 27 09:09:28 2014 -0500

    dialog: remove suggested action class when changing default action
    
    So that we don't have multiple widgets with the style class set
    to suggested-action.

 gtk/gtkdialog.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 04ae4a9..8e5797f 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -1127,6 +1127,8 @@ gtk_dialog_set_default_response (GtkDialog *dialog,
          gtk_widget_grab_default (widget);
           gtk_style_context_add_class (gtk_widget_get_style_context (widget), 
GTK_STYLE_CLASS_SUGGESTED_ACTION);
         }
+      else
+        gtk_style_context_remove_class (gtk_widget_get_style_context (widget), 
GTK_STYLE_CLASS_SUGGESTED_ACTION);
 
       tmp_list = g_list_next (tmp_list);
     }


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