[cheese] Use suggested-action style for Select button



commit 27183c4a815db17245c3a87e9a98800c0c6e3120
Author: David King <amigadave amigadave com>
Date:   Wed Mar 26 08:15:48 2014 +0000

    Use suggested-action style for Select button

 configure.ac                      |    2 +-
 libcheese/cheese-avatar-chooser.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 451e817..a8326c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,7 @@ IT_PROG_INTLTOOL([0.50.0])
 
 
 GLIB_REQUIRED="glib-2.0 >= 2.39.90"
-GTK_REQUIRED="gtk+-3.0 >= 3.11.5"
+GTK_REQUIRED="gtk+-3.0 >= 3.11.6"
 GDK_PIXBUF_REQUIRED="gdk-pixbuf-2.0"
 LIBGNOMEDESKTOP_REQUIRED="gnome-desktop-3.0 >= 2.91.6"
 GSTREAMER_VERSION=0.11.0
diff --git a/libcheese/cheese-avatar-chooser.c b/libcheese/cheese-avatar-chooser.c
index 42560a5..071b7cb 100644
--- a/libcheese/cheese-avatar-chooser.c
+++ b/libcheese/cheese-avatar-chooser.c
@@ -84,6 +84,7 @@ update_select_button (CheeseAvatarWidget  *widget,
 static void
 cheese_avatar_chooser_init (CheeseAvatarChooser *chooser)
 {
+  GtkWidget *button;
   CheeseAvatarChooserPrivate *priv = chooser->priv = cheese_avatar_chooser_get_instance_private (chooser);
 
   gtk_dialog_add_buttons (GTK_DIALOG (chooser),
@@ -94,6 +95,11 @@ cheese_avatar_chooser_init (CheeseAvatarChooser *chooser)
                           NULL);
   gtk_window_set_title (GTK_WINDOW (chooser), _("Take a Photo"));
 
+  button = gtk_dialog_get_widget_for_response (GTK_DIALOG (chooser),
+                                               GTK_RESPONSE_ACCEPT);
+  gtk_style_context_add_class (gtk_widget_get_style_context (button),
+                               GTK_STYLE_CLASS_SUGGESTED_ACTION);
+
   gtk_dialog_set_response_sensitive (GTK_DIALOG (chooser),
                                      GTK_RESPONSE_ACCEPT,
                                      FALSE);


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