From 1f1f2e2b1fe574ba955923203225e158fb60ce9c Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 16 Feb 2017 09:57:56 -0200 Subject: [PATCH] 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 --- panels/online-accounts/cc-online-accounts-panel.c | 6 ++++++ panels/online-accounts/online-accounts.ui | 1 + 2 files changed, 7 insertions(+) diff --git a/panels/online-accounts/cc-online-accounts-panel.c b/panels/online-accounts/cc-online-accounts-panel.c index 5db96e141..2c70b6c32 100644 --- a/panels/online-accounts/cc-online-accounts-panel.c +++ b/panels/online-accounts/cc-online-accounts-panel.c @@ -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); diff --git a/panels/online-accounts/online-accounts.ui b/panels/online-accounts/online-accounts.ui index f632e5534..7022ca3df 100644 --- a/panels/online-accounts/online-accounts.ui +++ b/panels/online-accounts/online-accounts.ui @@ -162,6 +162,7 @@ True False crossfade + False True