From 53a0dcf9936e23aba31e85e232ddb3a00ee8160c Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Wed, 14 Jun 2023 15:27:22 +0800
Subject: [PATCH] disable Suspend and Sleep of ukui-greeter

---
 ukui-greeter/greeter/powerwindow.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/ukui-greeter/greeter/powerwindow.cpp b/ukui-greeter/greeter/powerwindow.cpp
index 81fa29f..d11e350 100644
--- a/ukui-greeter/greeter/powerwindow.cpp
+++ b/ukui-greeter/greeter/powerwindow.cpp
@@ -237,7 +237,7 @@ void PowerManager::initUI()
     QVBoxLayout *shutdownlayout = new QVBoxLayout(shutdownWidget);
     shutdownlayout->addWidget(shutdownFace);
     shutdownlayout->addWidget(shutdownLabel);
-
+/*
     if(m_power->canHibernate()) {
         hibernateWidget = new QWidget(this);
         hibernateWidget->setObjectName("hibernateWidget");
@@ -271,7 +271,7 @@ void PowerManager::initUI()
     	suspendlayout->addWidget(suspendFace);
     	suspendlayout->addWidget(suspendLabel);
     }
-
+*/
 
 //   if(userCount>1){
 //        QListWidgetItem *item0 = new QListWidgetItem();
@@ -279,6 +279,7 @@ void PowerManager::initUI()
 //        insertItem(this->count(), item0);
 //        setItemWidget(item0, switchWidget);
 //    }
+/*
     if(m_power->canHibernate()){
         QListWidgetItem *item1 = new QListWidgetItem();
         item1->setSizeHint(QSize(ITEM_WIDTH, ITEM_HEIGHT));
@@ -292,7 +293,7 @@ void PowerManager::initUI()
         insertItem(this->count(), item0);
         setItemWidget(item0, suspendWidget);
     }
-
+*/
     QListWidgetItem *item2 = new QListWidgetItem();
     item2->setSizeHint(QSize(ITEM_WIDTH, ITEM_HEIGHT));
     insertItem(this->count(), item2);
-- 
2.33.0

