mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
disable power options for arm
https://tower.im/members/fe996d0d13b642a7867fb2d84080a5a8/?me=1vb
This commit is contained in:
parent
b1333a2795
commit
cb33eb9f49
@ -12,6 +12,10 @@ find_package(Qt5Svg REQUIRED)
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
find_package(DtkWidget REQUIRED)
|
||||
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
add_definitions("-DDISABLE_POWER_OPTIONS")
|
||||
endif()
|
||||
|
||||
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
|
||||
add_library(${PLUGIN_NAME} SHARED ${SRCS} shutdown.qrc)
|
||||
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
|
||||
|
@ -124,6 +124,7 @@ const QString ShutdownPlugin::itemContextMenu(const QString &itemKey)
|
||||
reboot["isActive"] = true;
|
||||
items.push_back(reboot);
|
||||
|
||||
#ifndef DISABLE_POWER_OPTIONS
|
||||
QMap<QString, QVariant> suspend;
|
||||
suspend["itemId"] = "Suspend";
|
||||
suspend["itemText"] = tr("Suspend");
|
||||
@ -137,6 +138,7 @@ const QString ShutdownPlugin::itemContextMenu(const QString &itemKey)
|
||||
hibernate["isActive"] = true;
|
||||
items.push_back(hibernate);
|
||||
}
|
||||
#endif
|
||||
|
||||
QMap<QString, QVariant> lock;
|
||||
lock["itemId"] = "Lock";
|
||||
@ -159,11 +161,13 @@ const QString ShutdownPlugin::itemContextMenu(const QString &itemKey)
|
||||
items.push_back(switchUser);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_POWER_OPTIONS
|
||||
QMap<QString, QVariant> power;
|
||||
power["itemId"] = "power";
|
||||
power["itemText"] = tr("Power settings");
|
||||
power["isActive"] = true;
|
||||
items.push_back(power);
|
||||
#endif
|
||||
|
||||
QMap<QString, QVariant> menu;
|
||||
menu["items"] = items;
|
||||
|
Loading…
x
Reference in New Issue
Block a user