[gnome-control-center/wip/gbsneto/new-goa-panel] online-accounts: always keep editor dialog size the minimum
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/gbsneto/new-goa-panel] online-accounts: always keep editor dialog size the minimum
- Date: Thu, 16 Feb 2017 12:09:28 +0000 (UTC)
commit 9ef945dc8ab7ca89558a6263a6bfa5b3b496c92a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Feb 16 09:57:56 2017 -0200
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(+), 0 deletions(-)
---
diff --git a/panels/online-accounts/cc-online-accounts-panel.c
b/panels/online-accounts/cc-online-accounts-panel.c
index 05acc48..c3f8c0a 100644
--- a/panels/online-accounts/cc-online-accounts-panel.c
+++ b/panels/online-accounts/cc-online-accounts-panel.c
@@ -258,6 +258,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,
@@ -577,6 +580,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 f21868b..234b5f7 100644
--- a/panels/online-accounts/online-accounts.ui
+++ b/panels/online-accounts/online-accounts.ui
@@ -227,6 +227,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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]