centralize panel content-change grace period into HoverPanel.keepOpen()
This commit is contained in:
parent
084ef1da75
commit
46f14d5d36
6 changed files with 36 additions and 19 deletions
|
|
@ -12,8 +12,6 @@ M.HoverPanel {
|
|||
onVisibleChanged: if (visible)
|
||||
scanner.running = true
|
||||
|
||||
readonly property bool _busy: connectProc.running || disconnectProc.running || radioProc.running
|
||||
|
||||
function triggerRefresh() {
|
||||
if (visible)
|
||||
scanner.running = true;
|
||||
|
|
@ -85,24 +83,30 @@ M.HoverPanel {
|
|||
id: radioProc
|
||||
property string _state: ""
|
||||
command: ["nmcli", "radio", "wifi", _state]
|
||||
onRunningChanged: if (!running)
|
||||
scanner.running = true
|
||||
onRunningChanged: if (!running) {
|
||||
scanner.running = true;
|
||||
menuWindow.keepOpen(500);
|
||||
}
|
||||
}
|
||||
|
||||
property Process _connectProc: Process {
|
||||
id: connectProc
|
||||
property string uuid: ""
|
||||
command: ["nmcli", "connection", "up", uuid]
|
||||
onRunningChanged: if (!running)
|
||||
scanner.running = true
|
||||
onRunningChanged: if (!running) {
|
||||
scanner.running = true;
|
||||
menuWindow.keepOpen(500);
|
||||
}
|
||||
}
|
||||
|
||||
property Process _disconnectProc: Process {
|
||||
id: disconnectProc
|
||||
property string uuid: ""
|
||||
command: ["nmcli", "connection", "down", uuid]
|
||||
onRunningChanged: if (!running)
|
||||
scanner.running = true
|
||||
onRunningChanged: if (!running) {
|
||||
scanner.running = true;
|
||||
menuWindow.keepOpen(500);
|
||||
}
|
||||
}
|
||||
|
||||
// Wi-Fi radio toggle header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue