diff --git a/0001-fix-coredump-Fix-crash-when-clicking-on-the-power-op.patch b/0001-fix-coredump-Fix-crash-when-clicking-on-the-power-op.patch deleted file mode 100644 index 236d643..0000000 --- a/0001-fix-coredump-Fix-crash-when-clicking-on-the-power-op.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f5d0a115fa44bd1a3a61b2a109956a15130e11e4 Mon Sep 17 00:00:00 2001 -From: huangjiawen -Date: Tue, 27 Jun 2023 18:51:42 +0800 -Subject: [PATCH] fix(coredump): Fix crash when clicking on the power option - button in vnc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复在vnc下点击电源选项按钮崩溃 - -Signed-off-by: huangjiawen ---- - src/common/kiran-power.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/common/kiran-power.cpp b/src/common/kiran-power.cpp -index 9ef8a2c..8485a9f 100644 ---- a/src/common/kiran-power.cpp -+++ b/src/common/kiran-power.cpp -@@ -366,6 +366,7 @@ bool KiranPower::can_logout() - bool KiranPower::can_switch_user() - { - RETURN_VAL_IF_TRUE(this->settings_->get_boolean(STARTMENU_LOCKDOWN_KEY_DISABLE_USER_SWITCHING), false); -+ RETURN_VAL_IF_FALSE(this->seat_manager_proxy_, false); - - try - { --- -2.33.0 - diff --git a/0002-fix-tray-Place-all-tray-icons-in-the-panel-and-no-lo.patch b/0002-fix-tray-Place-all-tray-icons-in-the-panel-and-no-lo.patch deleted file mode 100644 index 89555bf..0000000 --- a/0002-fix-tray-Place-all-tray-icons-in-the-panel-and-no-lo.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 2724de097ff51a06e28579066a5085d5318a7b0e Mon Sep 17 00:00:00 2001 -From: luoqing -Date: Thu, 24 Aug 2023 14:37:03 +0800 -Subject: [PATCH] fix(tray):Place all tray icons in the panel and no longer in - the tray container for the time being -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 将所有托盘图标都放到面板中,暂时不再放入托盘容器中 - -Related #12490 ---- - src/tray/kiran-tray.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/tray/kiran-tray.c b/src/tray/kiran-tray.c -index 9b40d96..2d5d418 100644 ---- a/src/tray/kiran-tray.c -+++ b/src/tray/kiran-tray.c -@@ -1123,7 +1123,7 @@ kiran_tray_notify_icon_added(KiranTrayManager *manager, - priv = tray->priv; - - id = kiran_notify_icon_get_id(icon); -- type = kiran_tray_get_icon_type(priv->settings, id); -+ // type = kiran_tray_get_icon_type(priv->settings, id); - - /* 系统已知的通知图标如声音,网络,电池等不需要记录 */ - if (kiran_notify_icon_get_category(icon) != KIRAN_NOTIFY_ICON_CATEGORY_HARDWARE) -@@ -1136,6 +1136,10 @@ kiran_tray_notify_icon_added(KiranTrayManager *manager, - - gtk_widget_set_name(GTK_WIDGET(icon), "iconWinButton"); - -+ gtk_box_pack_start(GTK_BOX(tray), GTK_WIDGET(icon), FALSE, TRUE, 0); -+ kiran_tray_icons_refresh(tray); -+ -+ /* - if (type == ICON_SHOW_IN_PANEL) - { - gtk_box_pack_start(GTK_BOX(tray), GTK_WIDGET(icon), FALSE, TRUE, 0); -@@ -1149,6 +1153,7 @@ kiran_tray_notify_icon_added(KiranTrayManager *manager, - gtk_widget_show(priv->icons_win_button); - position_notify_icon_window(tray, FALSE); - } -+ */ - - g_signal_connect(icon, - "size-allocate", --- -2.33.0 - diff --git a/0003-fix-tray-Fixed-a-crash-issue-that-occurred-when-the-.patch b/0003-fix-tray-Fixed-a-crash-issue-that-occurred-when-the-.patch deleted file mode 100644 index ced4245..0000000 --- a/0003-fix-tray-Fixed-a-crash-issue-that-occurred-when-the-.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 4428d8c315ac13d8bacc533a9b6cc64bf335d30b Mon Sep 17 00:00:00 2001 -From: luoqing -Date: Wed, 30 Aug 2023 17:04:12 +0800 -Subject: [PATCH] fix(tray):Fixed a crash issue that occurred when the tray - icon was removed from the tray area -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复托盘图标从托盘区域移除时,发生的崩溃问题 - -Related #14004 ---- - src/tray/kiran-tray.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/src/tray/kiran-tray.c b/src/tray/kiran-tray.c -index 2d5d418..4093571 100644 ---- a/src/tray/kiran-tray.c -+++ b/src/tray/kiran-tray.c -@@ -1123,7 +1123,7 @@ kiran_tray_notify_icon_added(KiranTrayManager *manager, - priv = tray->priv; - - id = kiran_notify_icon_get_id(icon); -- // type = kiran_tray_get_icon_type(priv->settings, id); -+ type = kiran_tray_get_icon_type(priv->settings, id); - - /* 系统已知的通知图标如声音,网络,电池等不需要记录 */ - if (kiran_notify_icon_get_category(icon) != KIRAN_NOTIFY_ICON_CATEGORY_HARDWARE) -@@ -1136,9 +1136,12 @@ kiran_tray_notify_icon_added(KiranTrayManager *manager, - - gtk_widget_set_name(GTK_WIDGET(icon), "iconWinButton"); - -- gtk_box_pack_start(GTK_BOX(tray), GTK_WIDGET(icon), FALSE, TRUE, 0); -- kiran_tray_icons_refresh(tray); -- -+ if (type != ICON_NOT_SHOW) -+ { -+ gtk_box_pack_start(GTK_BOX(tray), GTK_WIDGET(icon), FALSE, TRUE, 0); -+ kiran_tray_icons_refresh(tray); -+ } -+ - /* - if (type == ICON_SHOW_IN_PANEL) - { -@@ -1186,6 +1189,12 @@ kiran_tray_notify_icon_removed(KiranTrayManager *manager, - id = kiran_notify_icon_get_id(icon); - type = kiran_tray_get_icon_type(priv->settings, id); - -+ if(type != ICON_NOT_SHOW) -+ { -+ gtk_container_remove(GTK_CONTAINER(tray), GTK_WIDGET(icon)); -+ } -+ -+ /* - if (type == ICON_SHOW_IN_PANEL) - { - gtk_container_remove(GTK_CONTAINER(tray), GTK_WIDGET(icon)); -@@ -1203,6 +1212,7 @@ kiran_tray_notify_icon_removed(KiranTrayManager *manager, - - position_notify_icon_window(tray, FALSE); - } -+ */ - - priv->icons = g_slist_remove(priv->icons, icon); - } --- -2.33.0 - diff --git a/0004-feature-sn-icon-menu-Support-dynamic-increase-or-dec.patch b/0004-feature-sn-icon-menu-Support-dynamic-increase-or-dec.patch deleted file mode 100644 index ac8c8ae..0000000 --- a/0004-feature-sn-icon-menu-Support-dynamic-increase-or-dec.patch +++ /dev/null @@ -1,188 +0,0 @@ -From c7bc43571acc57546cd732e3658be86d308f0256 Mon Sep 17 00:00:00 2001 -From: luoqing -Date: Thu, 14 Sep 2023 17:34:29 +0800 -Subject: [PATCH] feature(sn-icon-menu):Support dynamic increase or decrease of - sub-item MenuItem in the tray right-click menu and property changes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 支持托盘右键菜单中的子项MenuItem动态增减以及属性变化 - -Closed #15944 ---- - src/tray/kiran-sn-icon-menu.c | 126 +++++++++++++++++++++++++++++----- - 1 file changed, 109 insertions(+), 17 deletions(-) - -diff --git a/src/tray/kiran-sn-icon-menu.c b/src/tray/kiran-sn-icon-menu.c -index 22e321f..ffae1bb 100644 ---- a/src/tray/kiran-sn-icon-menu.c -+++ b/src/tray/kiran-sn-icon-menu.c -@@ -1,19 +1,20 @@ - /** -- * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd. -+ * Copyright (c) 2020 ~ 2021 KylinSec Co., Ltd. - * kiran-cc-daemon is licensed under Mulan PSL v2. -- * You can use this software according to the terms and conditions of the Mulan PSL v2. -+ * You can use this software according to the terms and conditions of the Mulan PSL v2. - * You may obtain a copy of Mulan PSL v2 at: -- * http://license.coscl.org.cn/MulanPSL2 -- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -- * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -- * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -- * See the Mulan PSL v2 for more details. -- * -+ * http://license.coscl.org.cn/MulanPSL2 -+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. -+ * See the Mulan PSL v2 for more details. -+ * - * Author: wangxiaoqing - */ - - #include "kiran-sn-icon-menu.h" - #include -+#include - struct _KiranSnIconMenuPrivate - { - gchar *bus_name; -@@ -30,6 +31,7 @@ enum - LAST_PROP - }; - -+#define DATA_KEY_SIGNAL_PROPERTY_CHANGED_IS_CONNECTED "signal_property_changed_is_connected" - static GParamSpec *properties[LAST_PROP] = {NULL}; - - G_DEFINE_TYPE_WITH_PRIVATE(KiranSnIconMenu, kiran_sn_icon_menu, GTK_TYPE_MENU) -@@ -175,6 +177,88 @@ create_widget_from_menuitem(DbusmenuMenuitem *item) - return gmi; - } - -+static void -+kiran_sn_icon_menu_create_widget_from_dbusmenuitem(KiranSnIconMenu *menu, DbusmenuMenuitem *item) -+{ -+ GtkWidget *gmi = create_widget_from_menuitem(item); -+ -+ gtk_menu_shell_append(GTK_MENU_SHELL(menu), gmi); -+ gtk_widget_show(gmi); -+ -+ g_signal_connect(gmi, -+ "activate", -+ G_CALLBACK(activate_cb), -+ item); -+} -+ -+static void -+kiran_sn_icon_menu_remove_widget_all(KiranSnIconMenu *menu) -+{ -+ GList *child; -+ GList *container_children = gtk_container_get_children(GTK_CONTAINER(menu)); -+ for (child = container_children; child; child = child->next) -+ { -+ gtk_container_remove(GTK_CONTAINER(menu), GTK_WIDGET(child->data)); -+ gtk_widget_destroy(GTK_WIDGET(child->data)); -+ } -+} -+ -+static void -+property_changed_cb(DbusmenuMenuitem *item, gchar *property, GVariant *value, gpointer user_data) -+{ -+ GList *child; -+ KiranSnIconMenu *menu = KIRAN_SN_ICON_MENU(user_data); -+ -+ kiran_sn_icon_menu_remove_widget_all(menu); -+ -+ // 遍历MenuItem,以找到root -+ DbusmenuMenuitem *root = dbusmenu_menuitem_get_parent(item); -+ gboolean is_root = dbusmenu_menuitem_get_root(root); -+ -+ while (!is_root) -+ { -+ root = dbusmenu_menuitem_get_parent(root); -+ is_root = dbusmenu_menuitem_get_root(root); -+ } -+ -+ GList *dbus_menuitem_children = dbusmenu_menuitem_get_children(root); -+ for (child = dbus_menuitem_children; child; child = child->next) -+ { -+ kiran_sn_icon_menu_create_widget_from_dbusmenuitem(menu,child->data); -+ } -+} -+ -+static void -+submenu_get_children_to_connect(DbusmenuMenuitem *submenu, gpointer user_data) -+{ -+ KiranSnIconMenu *menu = KIRAN_SN_ICON_MENU(user_data); -+ GList *submenu_children = dbusmenu_menuitem_get_children(submenu); -+ GList *submenu_child; -+ for (submenu_child = submenu_children; submenu_child; submenu_child = submenu_child->next) -+ { -+ const gchar *children_display = dbusmenu_menuitem_property_get(submenu_child->data, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY); -+ if (g_strcmp0(children_display, "submenu") == 0) -+ { -+ submenu_get_children_to_connect(submenu_child->data, menu); -+ } -+ -+ gboolean is_connected = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(submenu_child->data), DATA_KEY_SIGNAL_PROPERTY_CHANGED_IS_CONNECTED)); -+ if (!is_connected) -+ { -+ g_signal_connect(submenu_child->data, DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(property_changed_cb), menu); -+ g_object_set_data(G_OBJECT(submenu_child->data), DATA_KEY_SIGNAL_PROPERTY_CHANGED_IS_CONNECTED, GINT_TO_POINTER(TRUE)); -+ } -+ } -+} -+ -+/** -+ * NOTE: -+ * dbus_menuitem 移除某个menuitem时,没有类似REMOVE_MENUITEM的信号, -+ * 而是会触发 DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED 信号。 -+ * 新增时会触发 DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM 信号 -+ * -+ * 因此layout_updated_cb中还会处理menuitem变化的情况 -+ */ - static void - layout_updated_cb(DbusmenuClient *client, - gpointer user_data) -@@ -182,21 +266,29 @@ layout_updated_cb(DbusmenuClient *client, - KiranSnIconMenu *menu; - DbusmenuMenuitem *root = dbusmenu_client_get_root(client); - GList *child; -- GList *children = dbusmenu_menuitem_get_children(root); - - menu = KIRAN_SN_ICON_MENU(user_data); - -- for (child = children; child; child = child->next) -+ kiran_sn_icon_menu_remove_widget_all(menu); -+ -+ GList *dbus_menuitem_children = dbusmenu_menuitem_get_children(root); -+ for (child = dbus_menuitem_children; child; child = child->next) - { -- GtkWidget *gmi = create_widget_from_menuitem(child->data); -+ kiran_sn_icon_menu_create_widget_from_dbusmenuitem(menu,child->data); - -- gtk_menu_shell_append(GTK_MENU_SHELL(menu), gmi); -- gtk_widget_show(gmi); -+ // NOTE:只修改一个属性,可能会触发多个 PROPERTY_CHANGE 信号 -+ const gchar *children_display = dbusmenu_menuitem_property_get(child->data, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY); -+ if (g_strcmp0(children_display, "submenu") == 0) -+ { -+ submenu_get_children_to_connect(child->data, menu); -+ } - -- g_signal_connect(gmi, -- "activate", -- G_CALLBACK(activate_cb), -- child->data); -+ gboolean is_connected = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(child->data), DATA_KEY_SIGNAL_PROPERTY_CHANGED_IS_CONNECTED)); -+ if (!is_connected) -+ { -+ g_signal_connect(child->data, DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(property_changed_cb), menu); -+ g_object_set_data(G_OBJECT(child->data), DATA_KEY_SIGNAL_PROPERTY_CHANGED_IS_CONNECTED, GINT_TO_POINTER(TRUE)); -+ } - } - } - --- -2.33.0 - diff --git a/0005-fix-sn-icon-Fixed-case-where-kiran_sn_icon_context_m.patch b/0005-fix-sn-icon-Fixed-case-where-kiran_sn_icon_context_m.patch deleted file mode 100644 index e958d2f..0000000 --- a/0005-fix-sn-icon-Fixed-case-where-kiran_sn_icon_context_m.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b0137c26ea84240a80c693650c5c70ec81323a52 Mon Sep 17 00:00:00 2001 -From: luoqing -Date: Sun, 8 Oct 2023 09:49:05 +0800 -Subject: [PATCH 1/2] fix(sn-icon):Fixed case where kiran_sn_icon_context_menu - was not called when Menu was not set by tray program -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复当托盘程序未设置Menu时,未调用kiran_sn_icon_context_menu的情况 - -Close #17216 ---- - src/tray/kiran-sn-icon.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tray/kiran-sn-icon.c b/src/tray/kiran-sn-icon.c -index a36040d..0309ee4 100644 ---- a/src/tray/kiran-sn-icon.c -+++ b/src/tray/kiran-sn-icon.c -@@ -1230,7 +1230,7 @@ kiran_sn_icon_button_press_event(GtkWidget *widget, - } - else if (event->button == 3) - { -- if (priv->gmenu != NULL) -+ if ((g_strcmp0(priv->menu, "/NO_DBUSMENU") != 0) && priv->gmenu != NULL) - { - gtk_menu_popup_at_widget(priv->gmenu, widget, - GDK_GRAVITY_SOUTH_WEST, --- -2.33.0 - diff --git a/0006-fix-sn-icon-menu-Fixed-an-issue-where-the-menuItem-p.patch b/0006-fix-sn-icon-menu-Fixed-an-issue-where-the-menuItem-p.patch deleted file mode 100644 index ba85a8c..0000000 --- a/0006-fix-sn-icon-menu-Fixed-an-issue-where-the-menuItem-p.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 195fec91ec7d9019ae14a56b649caeaca434c826 Mon Sep 17 00:00:00 2001 -From: luoqing -Date: Sun, 8 Oct 2023 10:09:00 +0800 -Subject: [PATCH 2/2] fix(sn-icon-menu):Fixed an issue where the menuItem - property was still visible after being set to invisible -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- 修复menuItem属性设置为不可见后,但仍然可见的问题 ---- - src/tray/kiran-sn-icon-menu.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/tray/kiran-sn-icon-menu.c b/src/tray/kiran-sn-icon-menu.c -index ffae1bb..02333f3 100644 ---- a/src/tray/kiran-sn-icon-menu.c -+++ b/src/tray/kiran-sn-icon-menu.c -@@ -138,7 +138,6 @@ create_widget_from_menuitem(DbusmenuMenuitem *item) - GtkWidget *gmi = create_widget_from_menuitem(child->data); - - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), gmi); -- gtk_widget_show(gmi); - - g_signal_connect(gmi, - "activate", -@@ -146,7 +145,6 @@ create_widget_from_menuitem(DbusmenuMenuitem *item) - child->data); - } - -- gtk_widget_show(submenu); - } - - if (toggle_state != DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN && -@@ -183,7 +181,6 @@ kiran_sn_icon_menu_create_widget_from_dbusmenuitem(KiranSnIconMenu *menu, Dbusme - GtkWidget *gmi = create_widget_from_menuitem(item); - - gtk_menu_shell_append(GTK_MENU_SHELL(menu), gmi); -- gtk_widget_show(gmi); - - g_signal_connect(gmi, - "activate", --- -2.33.0 - diff --git a/kiran-menu-2.5.1.tar.gz b/kiran-menu-2.5.1.tar.gz deleted file mode 100644 index 67d47e9..0000000 Binary files a/kiran-menu-2.5.1.tar.gz and /dev/null differ diff --git a/kiran-menu-2.6.0.tar.gz b/kiran-menu-2.6.0.tar.gz new file mode 100644 index 0000000..19be8ca Binary files /dev/null and b/kiran-menu-2.6.0.tar.gz differ diff --git a/kiran-menu.spec b/kiran-menu.spec index 967b606..025cd0e 100644 --- a/kiran-menu.spec +++ b/kiran-menu.spec @@ -1,18 +1,11 @@ Name: kiran-menu -Version: 2.5.1 -Release: 5 +Version: 2.6.0 +Release: 1%{?dist}.kb1 Summary: Applets for mate panel from Kiran Desktop License: MulanPSL-2.0 Source0: %{name}-%{version}.tar.gz -Patch0001: 0001-fix-coredump-Fix-crash-when-clicking-on-the-power-op.patch -Patch0002: 0002-fix-tray-Place-all-tray-icons-in-the-panel-and-no-lo.patch -Patch0003: 0003-fix-tray-Fixed-a-crash-issue-that-occurred-when-the-.patch -Patch0004: 0004-feature-sn-icon-menu-Support-dynamic-increase-or-dec.patch -Patch0005: 0005-fix-sn-icon-Fixed-case-where-kiran_sn_icon_context_m.patch -Patch0006: 0006-fix-sn-icon-menu-Fixed-an-issue-where-the-menuItem-p.patch - BuildRequires: cmake > 3.0 BuildRequires: gcc-c++ BuildRequires: gtkmm30-devel @@ -103,19 +96,11 @@ gtk-update-icon-cache -f /usr/share/icons/hicolor/ %changelog -* Fri Sep 15 2023 luoqing - 2.5.1-5 -- KYOS-F: Fixed case where kiran_sn_icon_context_menu was not called when Menu was not set by tray program (#17216) -- KYOS-F: Fixed an issue where the menuItem property was still visible after being set to invisible +* Wed Dec 06 2023 liuxinhao - 2.6.0-1.kb1 +- release 2.6,new start menu icon -* Fri Sep 15 2023 luoqing - 2.5.1-4 -- KYOS-F: Support dynamic increase or decrease of sub-item MenuItem in the tray right-click menu and property changes (#15944) - -* Fri Sep 01 2023 luoqing - 2.5.1-3 -- KYOS-F: Place all tray icons in the panel and no longer in the tray container for the time being (#12490) -- KYOS-F: Fixed a crash issue that occurred when the tray icon was removed from the tray area (#14004) - -* Fri Jun 30 2023 huangjiawen - 2.5.1-2 -- KYOS-F: Fix crash when clicking on the power option button in vnc. +* Thu May 11 2023 kpkg - 2.5.1-1.kb1 +- rebuild for KiranUI-2.5-next * Wed May 10 2023 tangjie02 - 2.5.1-1 - KYOS-F: replace suspend/hibernate/shutdown api with SessionManager.