online-accounts: Always keep editor dialog size the minimum

When adding and editing accounts, the different options that Online
Accounts provides may require different sizes of the dialog. There is,
however, a specific issue where the dialog can't resize because a
provider widget is interefering with the others.

Fix that by making the dialog's stack non-homogeneous, and making sure
to always reset the dialog size before showing it.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
This commit is contained in:
Georges Basile Stavracas Neto 2017-02-16 09:57:56 -02:00 committed by Debarshi Ray
parent e6f7d26175
commit 1f1f2e2b1f
2 changed files with 7 additions and 0 deletions

View file

@ -186,6 +186,9 @@ on_provider_row_activated (CcGoaPanel *self,
/* Move to the new account page */
gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "new-account");
/* Reset the dialog size */
gtk_window_resize (GTK_WINDOW (self->edit_account_dialog), 1, 1);
/* This spins gtk_dialog_run() */
object = goa_provider_add_account (provider,
self->client,
@ -494,6 +497,9 @@ show_page_account (CcGoaPanel *panel,
gtk_header_bar_set_title (GTK_HEADER_BAR (panel->edit_account_headerbar), title);
g_free (title);
/* Reset the dialog size */
gtk_window_resize (GTK_WINDOW (panel->edit_account_dialog), 1, 1);
gtk_widget_show_all (panel->accounts_vbox);
gtk_widget_show (panel->edit_account_dialog);

View file

@ -162,6 +162,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="transition_type">crossfade</property>
<property name="homogeneous">False</property>
<child>
<object class="GtkBox" id="new_account_vbox">
<property name="visible">True</property>