[gnome-control-center/wip/gbsneto/new-goa-panel: 10/25] online-accounts: add a stack to the account dialog
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/new-goa-panel: 10/25] online-accounts: add a stack to the account dialog
- Date: Sat, 26 Nov 2016 10:09:27 +0000 (UTC)
commit f40004f97a67f3093a3f1ea831929e03a065d1b0
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Nov 10 09:25:04 2016 -0200
online-accounts: add a stack to the account dialog
This will be used to unify the account creation proccess and
the account editor.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
panels/online-accounts/cc-online-accounts-panel.c | 5 +++
panels/online-accounts/online-accounts.ui | 30 +++++++++++++++++++-
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c
b/panels/online-accounts/cc-online-accounts-panel.c
index 16563c1..2555fe7 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -44,6 +44,7 @@ struct _CcGoaPanel
GtkWidget *edit_account_dialog;
GtkWidget *edit_account_headerbar;
GtkWidget *providers_listbox;
+ GtkWidget *stack;
GtkWidget *accounts_vbox;
};
@@ -357,6 +358,7 @@ cc_goa_panel_class_init (CcGoaPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, edit_account_dialog);
gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, edit_account_headerbar);
gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, providers_listbox);
+ gtk_widget_class_bind_template_child (widget_class, CcGoaPanel, stack);
gtk_widget_class_bind_template_callback (widget_class, on_listbox_row_activated);
}
@@ -375,6 +377,9 @@ show_page_account (CcGoaPanel *panel,
provider = NULL;
+ /* Move to the account editor page */
+ gtk_stack_set_visible_child_name (GTK_STACK (panel->stack), "editor");
+
/* Out with the old */
children = gtk_container_get_children (GTK_CONTAINER (panel->accounts_vbox));
for (l = children; l != NULL; l = l->next)
diff --git a/panels/online-accounts/online-accounts.ui b/panels/online-accounts/online-accounts.ui
index 04fb90d..f2e79f8 100644
--- a/panels/online-accounts/online-accounts.ui
+++ b/panels/online-accounts/online-accounts.ui
@@ -86,10 +86,36 @@
</object>
</child>
<child internal-child="vbox">
- <object class="GtkBox" id="accounts_vbox">
+ <object class="GtkBox">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="margin">18</property>
+ <child>
+ <object class="GtkStack" id="stack">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="transition_type">crossfade</property>
+ <child>
+ <object class="GtkBox" id="new_account_vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="name">new-account</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="accounts_vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin">18</property>
+ </object>
+ <packing>
+ <property name="name">editor</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]