[gnome-initial-setup] account: Put the toggle button in the page itself
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] account: Put the toggle button in the page itself
- Date: Wed, 25 Sep 2013 23:54:32 +0000 (UTC)
commit a06ac4812410439fe84b5b3b7768945bc75088d1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Sep 25 12:32:06 2013 -0400
account: Put the toggle button in the page itself
This prevents an issue with center container jiggling all over the place.
.../pages/account/gis-account-page.c | 13 +------------
.../pages/account/gis-account-page.ui | 11 +++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c
b/gnome-initial-setup/pages/account/gis-account-page.c
index fcd1418..c24ac64 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -1164,10 +1164,9 @@ gis_account_page_constructed (GObject *object)
priv->has_enterprise = FALSE;
- priv->action = gtk_toggle_button_new_with_mnemonic ("_Use Enterprise Login");
+ priv->action = WID("page-toggle");
g_signal_connect (priv->action, "toggled", G_CALLBACK (toggle_mode), page);
g_object_bind_property (page, "applying", priv->action, "sensitive", G_BINDING_INVERT_BOOLEAN);
- g_object_ref_sink (priv->action);
/* force a refresh by setting to an invalid value */
priv->mode = NUM_MODES;
@@ -1190,21 +1189,12 @@ gis_account_page_dispose (GObject *object)
g_cancellable_cancel (priv->cancellable);
g_clear_object (&priv->realm_manager);
- g_clear_object (&priv->action);
g_clear_object (&priv->realm);
g_clear_object (&priv->cancellable);
G_OBJECT_CLASS (gis_account_page_parent_class)->dispose (object);
}
-static GtkWidget *
-gis_account_page_get_action_widget (GisPage *page)
-{
- GisAccountPage *account = GIS_ACCOUNT_PAGE (page);
- GisAccountPagePrivate *priv = gis_account_page_get_instance_private (account);
- return priv->action;
-}
-
static void
gis_account_page_locale_changed (GisPage *page)
{
@@ -1219,7 +1209,6 @@ gis_account_page_class_init (GisAccountPageClass *klass)
page_class->page_id = PAGE_ID;
page_class->locale_changed = gis_account_page_locale_changed;
- page_class->get_action_widget = gis_account_page_get_action_widget;
page_class->apply = gis_account_page_apply;
page_class->save_data = gis_account_page_save_data;
object_class->constructed = gis_account_page_constructed;
diff --git a/gnome-initial-setup/pages/account/gis-account-page.ui
b/gnome-initial-setup/pages/account/gis-account-page.ui
index 496f4b8..68a0bc6 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page.ui
@@ -10,8 +10,10 @@
<object class="GtkNotebook" id="account-notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="valign">start</property>
<property name="margin_left">80</property>
<property name="margin_right">80</property>
+ <property name="vexpand">True</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
@@ -494,6 +496,15 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkToggleButton" id="page-toggle">
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="label" translatable="true">_Use Enterprise Login</property>
+ <property name="halign">start</property>
+ <property name="valign">end</property>
+ </object>
+ </child>
</object>
<object class="GtkDialog" id="join-dialog">
<property name="can_focus">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]