[f21/master] Use suggested-action on more buttons (#1131254)
David Shea
dshea at redhat.com
Thu Aug 28 20:10:34 UTC 2014
Let users know what to do next with a soothing blue.
---
pyanaconda/ui/gui/hubs/progress.glade | 6 ++++++
pyanaconda/ui/gui/hubs/summary.glade | 3 +++
widgets/src/StandaloneWindow.c | 5 +++++
3 files changed, 14 insertions(+)
diff --git a/pyanaconda/ui/gui/hubs/progress.glade b/pyanaconda/ui/gui/hubs/progress.glade
index 1dd82f4..f459ce0 100644
--- a/pyanaconda/ui/gui/hubs/progress.glade
+++ b/pyanaconda/ui/gui/hubs/progress.glade
@@ -152,6 +152,9 @@ Finish it and then click the Finish configuration button please.</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="_do_configuration" swapped="no"/>
+ <style>
+ <class name="suggested-action"/>
+ </style>
</object>
<packing>
<property name="left_attach">1</property>
@@ -201,6 +204,9 @@ Go ahead and reboot to start using it!</property>
<property name="valign">end</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/pyanaconda/ui/gui/hubs/summary.glade b/pyanaconda/ui/gui/hubs/summary.glade
index cae6cb7..8588791 100644
--- a/pyanaconda/ui/gui/hubs/summary.glade
+++ b/pyanaconda/ui/gui/hubs/summary.glade
@@ -99,6 +99,9 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
</object>
<packing>
<property name="expand">False</property>
diff --git a/widgets/src/StandaloneWindow.c b/widgets/src/StandaloneWindow.c
index 9daaad9..f0477c0 100644
--- a/widgets/src/StandaloneWindow.c
+++ b/widgets/src/StandaloneWindow.c
@@ -135,6 +135,7 @@ GtkWidget *anaconda_standalone_window_new() {
static void anaconda_standalone_window_init(AnacondaStandaloneWindow *win) {
AtkObject *atk;
GtkWidget *main_box = anaconda_base_window_get_main_box(ANACONDA_BASE_WINDOW(win));
+ GtkStyleContext *context;
win->priv = G_TYPE_INSTANCE_GET_PRIVATE(win,
ANACONDA_TYPE_STANDALONE_WINDOW,
@@ -149,6 +150,10 @@ static void anaconda_standalone_window_init(AnacondaStandaloneWindow *win) {
atk = gtk_widget_get_accessible(win->priv->continue_button);
atk_object_set_name(atk, _(CONTINUE_TEXT));
+ /* Set the Continue button to the blue 'suggested-action' style class */
+ context = gtk_widget_get_style_context(win->priv->continue_button);
+ gtk_style_context_add_class(context, "suggested-action");
+
/* Set the properties on AnacondaBaseStandalone */
g_object_set(G_OBJECT(win), "AnacondaBaseStandalone::quit-button", win->priv->quit_button, NULL);
g_object_set(G_OBJECT(win), "AnacondaBaseStandalone::continue-button", win->priv->continue_button, NULL);
--
2.0.0
More information about the anaconda-patches
mailing list