mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
fix: 使用root用户登陆时,dock右键没有切换用户选项
使用root用户登陆时,dock右键没有切换用户选项 Log: 将dock和session-shell判定是否显示切换用户改为一致 Bug: https://pms.uniontech.com/zentao/bug-view-51601.html Bug: https://pms.uniontech.com/zentao/bug-view-50789.html Change-Id: I3987cf403881c66b06662d8629f957403551e91d Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/8133 Reviewed-by: <mailman@uniontech.com> Reviewed-by: xiechuan <xiechuan@uniontech.com> Reviewed-by: fanpengcheng <fanpengcheng@uniontech.com> Tested-by: <mailman@uniontech.com>
This commit is contained in:
parent
bb37fa35e5
commit
346c62a477
@ -24,11 +24,14 @@
|
||||
#include "../frame/util/utils.h"
|
||||
#include "../widgets/tipswidget.h"
|
||||
|
||||
#include <DSysInfo>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QSettings>
|
||||
|
||||
#define PLUGIN_STATE_KEY "enable"
|
||||
|
||||
DCORE_USE_NAMESPACE
|
||||
using namespace Dock;
|
||||
|
||||
ShutdownPlugin::ShutdownPlugin(QObject *parent)
|
||||
@ -163,7 +166,7 @@ const QString ShutdownPlugin::itemContextMenu(const QString &itemKey)
|
||||
items.push_back(logout);
|
||||
|
||||
if (!QFile::exists(ICBC_CONF_FILE)) {
|
||||
if (DBusAccount().userList().count() > 1) {
|
||||
if (DBusAccount().userList().count() > 1 || DSysInfo::uosType() == DSysInfo::UosType::UosServer) {
|
||||
QMap<QString, QVariant> switchUser;
|
||||
switchUser["itemId"] = "SwitchUser";
|
||||
switchUser["itemText"] = tr("Switch account");
|
||||
|
Loading…
x
Reference in New Issue
Block a user