From 1c0fef571874c19efe5a41eed1bac88f4711cea1 Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Thu, 18 Jan 2024 15:23:00 +0100 Subject: [PATCH] panel-list: Reorder panel list This also drops the Categories as a criteria for creating the sidebar list separators. Now the "panel_order" array will include entries named "separator" to indicate where a separator should go. See https://hedgedoc.gnome.org/FLcx6argT6uycE3An7uaxw --- shell/cc-panel-list.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c index 770de59bb1..79e82d5a07 100644 --- a/shell/cc-panel-list.c +++ b/shell/cc-panel-list.c @@ -354,29 +354,36 @@ static const gchar * const panel_order[] = { "wwan", "mobile-broadband", "bluetooth", + + "separator", + + "display", + "sound", + "power", + "multitasking", "background", + + "separator", + + "applications", "notifications", "search", - "multitasking", - "applications", - "privacy", "online-accounts", "sharing", - /* Devices page */ - "sound", - "power", - "display", + "separator", + "mouse", "keyboard", + "color", "printers", "wacom", - "color", - /* Details page */ - "system", + "separator", + "universal-access", - "user-accounts", + "privacy", + "system", "reset-settings", }; @@ -460,15 +467,13 @@ header_func (GtkListBoxRow *row, GtkListBoxRow *before, gpointer user_data) { - RowData *row_data, *before_data; + guint pid; if (!before) return; - row_data = g_object_get_data (G_OBJECT (row), "data"); - before_data = g_object_get_data (G_OBJECT (before), "data"); - - if (row_data->category != before_data->category) + pid = get_panel_id_index (get_panel_id_from_row (user_data, row)); + if (g_str_equal (panel_order[pid-1], "separator")) { GtkWidget *separator; -- GitLab