summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2023-01-06 16:42:44 +0530
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2023-03-03 10:38:31 -0300
commit2fb74f2a4056d21865fd84823d2c5dbace0b834a (patch)
tree733a640ff2e46dc1ae423e58f8a23fe22753cea9 /shell
parentb612179cdb011eb2d9b7030ca3dd0d1aa038261b (diff)
downloadgnome-control-center-2fb74f2a4056d21865fd84823d2c5dbace0b834a.tar.gz
panel-list: Switch to main list if custom sidebar is not set
If the previously shown panel had a custom sidebar, we were not switching back to the main list if the currently shown panel doesn't have one. This will result in the sidebar having empty content. Fix it by always switching to main sidebar view if no custom sidebar widget is set. Closes #2261 Closes #2292
Diffstat (limited to 'shell')
-rw-r--r--shell/cc-panel-list.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c
index e122d94c3..76a978abc 100644
--- a/shell/cc-panel-list.c
+++ b/shell/cc-panel-list.c
@@ -1090,6 +1090,10 @@ cc_panel_list_add_sidebar_widget (CcPanelList *self,
gtk_stack_add_named (self->stack, widget, "custom-widget");
switch_to_view (self, CC_PANEL_LIST_WIDGET);
}
+ else if (self->view != CC_PANEL_LIST_PRIVACY)
+ {
+ switch_to_view (self, CC_PANEL_LIST_MAIN);
+ }
}
void