6 Star 1 Fork 17

src-openEuler/kiran-cc-daemon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0020-fix-media-keys-action-The-shutdown-shortcut-cannot-b.patch 3.00 KB
一键复制 编辑 原始数据 按行查看 历史
From 4156ea6bbf3252fd111f6a2f5a0e87ac97171c93 Mon Sep 17 00:00:00 2001
From: yangfeng <yangfeng@kylinsec.com.cn>
Date: Tue, 23 Jul 2024 17:20:17 +0800
Subject: [PATCH 20/22] fix(media-keys-action):The shutdown shortcut cannot be
found
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复关机快捷键找不到
Related #44337
---
.../media-keys/media-keys-action.cpp | 25 ++++++++-----------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/plugins/keybinding/media-keys/media-keys-action.cpp b/plugins/keybinding/media-keys/media-keys-action.cpp
index 31552d5..864f8dc 100644
--- a/plugins/keybinding/media-keys/media-keys-action.cpp
+++ b/plugins/keybinding/media-keys/media-keys-action.cpp
@@ -1,14 +1,14 @@
/**
- * 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: meizhigang <meizhigang@kylinsec.com.cn>
*/
#include "plugins/keybinding/media-keys/media-keys-action.h"
@@ -68,8 +68,7 @@ void MediaKeysAction::init_touchpad()
if (device_helper->is_touchpad())
{
this->has_touchpad_ = true;
- }
- });
+ } });
}
bool MediaKeysAction::do_action(XEvent *xev, std::string name)
@@ -208,10 +207,9 @@ void MediaKeysAction::do_touchpad_osd(bool state)
void MediaKeysAction::do_shutdown()
{
- std::string cmdline = std::string("mate-session-save --shutdown-dialog");
-
try
{
+ std::string cmdline = "kiran-session-quit --power-off";
Glib::spawn_command_line_async(cmdline);
}
catch (const Glib::Error &e)
@@ -222,10 +220,9 @@ void MediaKeysAction::do_shutdown()
void MediaKeysAction::do_logout()
{
- std::string cmdline = std::string("mate-session-save --logout-dialog");
-
try
{
+ std::string cmdline = "kiran-session-quit --logout";
Glib::spawn_command_line_async(cmdline);
}
catch (const Glib::Error &e)
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/kiran-cc-daemon.git
git@gitee.com:src-openeuler/kiran-cc-daemon.git
src-openeuler
kiran-cc-daemon
kiran-cc-daemon
master

搜索帮助