diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-05-03 11:27:12 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-05-03 11:35:06 -0300 |
commit | c3c74f9167143ed606d3229f1e194bafe3789015 (patch) | |
tree | f3452797d673a221f350269c5929f13a5ed64a68 /shell/cc-window.c | |
parent | ccade5c090da1d8c939e99cecb1eec2a15a31cef (diff) | |
download | gnome-control-center-gbsneto/dynamic-panels.tar.gz |
window: Don't remove header widgets before changing panelsgbsneto/dynamic-panels
When changing panels, CcWindow can only remove the previous
panel's header widgets after making sure the new panel was
successfully set.
However, this is not the case, and when the current panel
fails to be set, the previous panel's header widget is
removed.
Fix that by waiting to remove the header widgets until the
panel is successfully set.
Diffstat (limited to 'shell/cc-window.c')
-rw-r--r-- | shell/cc-window.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/shell/cc-window.c b/shell/cc-window.c index 3c5161c36..d7a114093 100644 --- a/shell/cc-window.c +++ b/shell/cc-window.c @@ -350,9 +350,6 @@ set_active_panel_from_id (CcShell *shell, return TRUE; } - /* clear any custom widgets */ - remove_all_custom_widgets (self); - iter_valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self->store), &iter); /* find the details for this item */ @@ -385,12 +382,18 @@ set_active_panel_from_id (CcShell *shell, } /* Activate the panel */ - activated = activate_panel (CC_WINDOW (shell), start_id, parameters, name, gicon); + activated = activate_panel (CC_WINDOW (shell), start_id, parameters, name, gicon, visibility); /* Failed to activate the panel for some reason, let's keep the old * panel around instead */ if (!activated) - return TRUE; + { + g_debug ("Failed to activate panel"); + return TRUE; + } + + /* clear any custom widgets */ + remove_all_custom_widgets (self); /* Successful activation */ g_free (self->current_panel_id); |