Skip to content

Commit 9bcd403

Browse files
myk1343deepin-bot[bot]
authored andcommitted
fix: 通过dconfig屏蔽进程暂停与恢复进程功能
通过dconfig屏蔽进程暂停与恢复进程功能 Bug: https://pms.uniontech.com/bug-view-272331.html Log: 通过dconfig屏蔽进程暂停与恢复进程功能 (cherry picked from commit 2d70563)
1 parent bd535d2 commit 9bcd403

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

assets/configs/org.deepin.system-monitor.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727
"description[zh_CN]": "启用DKapture eBPF监控进行进程数据收集",
2828
"permissions": "readwrite",
2929
"visibility": "public"
30+
},
31+
"displayMenuPauseAndRecovery": {
32+
"value": 0,
33+
"serial": 0,
34+
"flags": ["global"],
35+
"name": "Display pause recovery process",
36+
"name[zh_CN]": "显示暂停恢复进程",
37+
"description": "显示暂停恢复进程",
38+
"permissions": "readwrite",
39+
"visibility": "public"
3040
}
3141
}
3242
}

deepin-system-monitor-main/gui/process_table_view.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,14 @@ void ProcessTableView::initConnections(bool settingsLoaded)
649649
// ALT + C
650650
resumeProcAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_C));
651651
connect(resumeProcAction, &QAction::triggered, this, &ProcessTableView::resumeProcess);
652+
DConfig *config = DConfig::create("org.deepin.system-monitor", "org.deepin.system-monitor");
653+
if(config) {
654+
QVariant varMenu = config->value("displayMenuPauseAndRecovery");
655+
if(varMenu.isValid() && varMenu.toInt() == 0) {
656+
pauseProcAction->setVisible(false);
657+
resumeProcAction->setVisible(false);
658+
}
659+
}
652660

653661
// change priority dialog
654662
auto *chgProcPrioMenu = m_contextMenu->addMenu(

0 commit comments

Comments
 (0)