48 lines
2.2 KiB
Diff
48 lines
2.2 KiB
Diff
From cd1b0cde4ea3b02bd3c3169a1e6142bc2a680a90 Mon Sep 17 00:00:00 2001
|
|
From: peijiankang <peijiankang@kylinos.cn>
|
|
Date: Wed, 14 Jun 2023 16:20:27 +0800
|
|
Subject: [PATCH] disable Suspend and Sleep of ukui-panel
|
|
|
|
---
|
|
plugin-startbar/startmenu_button.cpp | 8 ++++----
|
|
1 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/plugin-startbar/startmenu_button.cpp b/plugin-startbar/startmenu_button.cpp
|
|
index aade6e4..0285321 100644
|
|
--- a/plugin-startbar/startmenu_button.cpp
|
|
+++ b/plugin-startbar/startmenu_button.cpp
|
|
@@ -67,10 +67,10 @@ void StartMenuButton::contextMenuEvent(QContextMenuEvent *event)
|
|
rightPressMenu->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
QMenu *pUserAction=new QMenu(tr("User Action")); //用户操作
|
|
- QMenu *pSleepHibernate=new QMenu(tr("Sleep or Hibernate")); //重启或休眠
|
|
+ //QMenu *pSleepHibernate=new QMenu(tr("Sleep or Hibernate")); //重启或休眠
|
|
QMenu *pPowerSupply=new QMenu(tr("Power Supply")); //电源
|
|
rightPressMenu->addMenu(pUserAction);
|
|
- rightPressMenu->addMenu(pSleepHibernate);
|
|
+ //rightPressMenu->addMenu(pSleepHibernate);
|
|
rightPressMenu->addMenu(pPowerSupply);
|
|
|
|
pUserAction->addAction(QIcon::fromTheme("system-lock-screen-symbolic"),
|
|
@@ -87,7 +87,7 @@ void StartMenuButton::contextMenuEvent(QContextMenuEvent *event)
|
|
tr("Logout"),
|
|
this, SLOT(SessionLogout())
|
|
); //注销
|
|
-
|
|
+/*
|
|
if(QString::compare(getCanHibernateResult(),"yes") == 0){
|
|
pSleepHibernate->addAction(QIcon::fromTheme("kylin-sleep-symbolic"),
|
|
tr("Hibernate Mode"),
|
|
@@ -100,7 +100,7 @@ void StartMenuButton::contextMenuEvent(QContextMenuEvent *event)
|
|
tr("Sleep Mode"),
|
|
this, SLOT(SessionSuspend())
|
|
); //睡眠
|
|
- }
|
|
+ }*/
|
|
pPowerSupply->addAction(QIcon::fromTheme("ukui-system-restart-symbolic"),
|
|
tr("Restart"),
|
|
this, SLOT(SessionReboot())
|
|
--
|
|
2.33.0
|
|
|