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
This commit is contained in:
parent
dce3e168d2
commit
76062e1106
2 changed files with 32 additions and 2 deletions
|
@ -45,6 +45,7 @@ struct _CcGoaPanel
|
|||
GtkWidget *edit_account_dialog;
|
||||
GtkWidget *edit_account_headerbar;
|
||||
GtkWidget *providers_listbox;
|
||||
GtkWidget *stack;
|
||||
GtkWidget *accounts_vbox;
|
||||
};
|
||||
|
||||
|
@ -344,6 +345,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_edit_account_dialog_delete_event);
|
||||
gtk_widget_class_bind_template_callback (widget_class, on_listbox_row_activated);
|
||||
|
@ -372,6 +374,9 @@ show_page_account (CcGoaPanel *panel,
|
|||
|
||||
panel->active_object = object;
|
||||
|
||||
/* 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)
|
||||
|
|
|
@ -87,10 +87,35 @@
|
|||
</object>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="accounts_vbox">
|
||||
<object class="GtkBox">
|
||||
<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>
|
||||
|
|
Loading…
Add table
Reference in a new issue