From be513edb66d182ed76701ee454a10110f6b12e7d Mon Sep 17 00:00:00 2001 From: SkyzcYou Date: Tue, 5 Sep 2023 14:18:52 +0800 Subject: [PATCH] fix(*): Fixed issue with empty taskbar due to empty object id list. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复了由于 object-id-list 为空导致的任务栏为空问题。 Close #14053 #11856 --- ...with-empty-taskbar-due-to-empty-obje.patch | 82 +++++++++++++++++++ kiran-panel.spec | 10 ++- 2 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 0002-fix-Fixed-issue-with-empty-taskbar-due-to-empty-obje.patch diff --git a/0002-fix-Fixed-issue-with-empty-taskbar-due-to-empty-obje.patch b/0002-fix-Fixed-issue-with-empty-taskbar-due-to-empty-obje.patch new file mode 100644 index 0000000..1edd79a --- /dev/null +++ b/0002-fix-Fixed-issue-with-empty-taskbar-due-to-empty-obje.patch @@ -0,0 +1,82 @@ +From 72c29b2a51c9f22a9832066e710f9d9523b6ff64 Mon Sep 17 00:00:00 2001 +From: youzhengcai +Date: Mon, 4 Sep 2023 17:25:15 +0800 +Subject: [PATCH] fix(*): Fixed issue with empty taskbar due to empty object id + list. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复了由于 object-id-list 为空导致的任务栏为空问题。 + +Close #14053 #11856 +--- + mate-panel/panel-profile.c | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c +index 13a04ab..7e1a039 100644 +--- a/mate-panel/panel-profile.c ++++ b/mate-panel/panel-profile.c +@@ -86,6 +86,7 @@ static GQuark commit_timeout_quark = 0; + + static void panel_profile_object_id_list_update (gchar **objects); + static void panel_profile_ensure_toplevel_per_screen (void); ++static GSList* panel_profile_object_id_list(GSettings *panel_settings); + + static void + panel_profile_set_toplevel_id (PanelToplevel *toplevel, +@@ -1554,6 +1555,13 @@ panel_profile_object_id_list_notify (GSettings *settings, + gchar **objects; + objects = g_settings_get_strv (settings, key); + panel_profile_object_id_list_update (objects); ++ ++ GSList *object_ids = panel_profile_object_id_list(settings); ++ if (g_slist_length(object_ids) == 0){ ++ g_settings_set_strv (settings, PANEL_TOPLEVEL_ID_LIST_KEY, NULL); ++ } ++ g_slist_free (object_ids); ++ + g_strfreev (objects); + } + +@@ -1583,6 +1591,19 @@ panel_profile_load_list (GSettings *settings, + g_strfreev (list); + } + ++static GSList* ++panel_profile_object_id_list(GSettings *panel_settings) { ++ gchar **objects = g_settings_get_strv(panel_settings, PANEL_OBJECT_ID_LIST_KEY); ++ ++ GSList *object_ids; ++ object_ids = mate_gsettings_strv_to_gslist ((const gchar **) objects); ++ object_ids = panel_g_slist_make_unique (object_ids, ++ (GCompareFunc) g_strcmp0, ++ FALSE); ++ g_strfreev(objects); ++ return object_ids; ++} ++ + static void + panel_profile_ensure_toplevel_per_screen () + { +@@ -1608,7 +1629,15 @@ panel_profile_ensure_toplevel_per_screen () + for (l = empty_screens; l; l = l->next) + panel_layout_apply_default_from_gkeyfile (l->data); + +- g_slist_free (empty_screens); ++ GSettings *panel_settings = g_settings_new (PANEL_SCHEMA); ++ GSList *object_ids = panel_profile_object_id_list(panel_settings); ++ if (g_slist_length(object_ids) == 0){ ++ g_settings_set_strv (panel_settings, PANEL_TOPLEVEL_ID_LIST_KEY, NULL); ++ } ++ g_slist_free (object_ids); ++ g_object_unref(panel_settings); ++ ++ g_slist_free (empty_screens); + } + + void +-- +2.27.0 + diff --git a/kiran-panel.spec b/kiran-panel.spec index 139f631..73fe269 100644 --- a/kiran-panel.spec +++ b/kiran-panel.spec @@ -11,15 +11,16 @@ Name: kiran-panel Version: 1.22.4 -Release: 3.kb4 +Release: 6.kb6 Summary: KIRAN Desktop panel and applets License: GPL-2.0-or-later URL: http://mate-desktop.org Source0: %{name}-%{version}.tar.gz -Patch0001: 0001-feature-backends-Compatible-wayland-framework-which-.patch -Patch0002: 0002-fix-translate-add-some-translation.patch +Patch0000: 0001-feature-backends-Compatible-wayland-framework-which-.patch +Patch0001: 0002-fix-translate-add-some-translation.patch +Patch0002: 0002-fix-Fixed-issue-with-empty-taskbar-due-to-empty-obje.patch #kylin Obsoletes: mintmenu @@ -132,6 +133,9 @@ desktop-file-install \ %changelog +* Mon Sep 04 2023 youzhengcai - 1.22.4-6.kb6 +- Fixed issue with empty taskbar due to empty object id list.(#14053 #11856) + * Mon Apr 10 2023 wangyucheng - 1.22.4-3.kb4 - KYOS-T: add some translation -- Gitee