50 lines
2.0 KiB
Diff
50 lines
2.0 KiB
Diff
From e678d299bbeed0333dbb6fa20f293dbb0a0189ae Mon Sep 17 00:00:00 2001
|
|
From: peijiankang <peijiankang@kylinos.cn>
|
|
Date: Wed, 14 Jun 2023 14:43:07 +0800
|
|
Subject: [PATCH] disable Suspend and Sleep of ukui-menu
|
|
|
|
---
|
|
.../RightClickMenu/rightclickmenu.cpp | 26 +++++++++----------
|
|
1 file changed, 13 insertions(+), 13 deletions(-)
|
|
|
|
diff --git a/src/UserInterface/RightClickMenu/rightclickmenu.cpp b/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
|
index 3db1762..fc06767 100755
|
|
--- a/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
|
+++ b/src/UserInterface/RightClickMenu/rightclickmenu.cpp
|
|
@@ -359,19 +359,19 @@ int RightClickMenu::showShutdownMenu(const QPoint &pos, const bool &isFullWind)
|
|
this, SLOT(switchUserActionTriggerSlot()));
|
|
}
|
|
|
|
- reply = iface.call("canHibernate");
|
|
-
|
|
- if (reply.isValid() && reply.value()) {
|
|
- m_showShutMenu.addAction(QIcon(getIconPixmap("kylin-sleep-symbolic", 1)), tr("Hibernate"),
|
|
- this, SLOT(hibernateActionTriggerSlot()));
|
|
- }
|
|
-
|
|
- reply = iface.call("canSuspend");
|
|
-
|
|
- if (reply.isValid() && reply.value()) {
|
|
- m_showShutMenu.addAction(QIcon(getIconPixmap("kylin-hebernate-symbolic", 1)), tr("Sleep"),
|
|
- this, SLOT(sleepActionTriggerSlot()));
|
|
- }
|
|
+// reply = iface.call("canHibernate");
|
|
+//
|
|
+// if (reply.isValid() && reply.value()) {
|
|
+// m_showShutMenu.addAction(QIcon(getIconPixmap("kylin-sleep-symbolic", 1)), tr("Hibernate"),
|
|
+// this, SLOT(hibernateActionTriggerSlot()));
|
|
+// }
|
|
+//
|
|
+// reply = iface.call("canSuspend");
|
|
+//
|
|
+// if (reply.isValid() && reply.value()) {
|
|
+// m_showShutMenu.addAction(QIcon(getIconPixmap("kylin-hebernate-symbolic", 1)), tr("Sleep"),
|
|
+// this, SLOT(sleepActionTriggerSlot()));
|
|
+// }
|
|
|
|
m_showShutMenu.addAction(QIcon(getIconPixmap("system-lock-screen-symbolic", 1)), tr("Lock Screen"),
|
|
this, SLOT(lockScreenActionTriggerSlot()));
|
|
--
|
|
2.33.0
|
|
|