-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UI] Allow "Unapply All" menu entry through settings (#283)
* fixup! PatchmanagerPage: Reorder pulley menu entries (#272) * Control Unapply All option through settings * update Requires for Nemo.Configuration plugin * fixup! Control Unapply All option through settings * PatchManagerPage: Enhance comment * SettingsPage: Enhance commment and new strings * SettingsPage: Hope that "for" is a correct preposition … after trying "at" and pondering about "on" (both "feel" plausible, but not like a perfect fit). Co-authored-by: olf <[email protected]>
- Loading branch information
Showing
3 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Copyright (C) 2013 Lucien XU <[email protected]> | ||
* Copyright (C) 2016 Andrey Kozhevnikov <[email protected]> | ||
* Copyright (c) 2021, Patchmanager for SailfishOS contributors: | ||
* Copyright (c) 2021, 2022, Patchmanager for SailfishOS contributors: | ||
* - olf "Olf0" <https://github.com/Olf0> | ||
* - Peter G. "nephros" <[email protected]> | ||
* - Vlad G. "b100dian" <https://github.com/b100dian> | ||
|
@@ -37,11 +37,26 @@ | |
|
||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
import Nemo.Configuration 1.0 | ||
import org.SfietKonstantin.patchmanager 2.0 | ||
|
||
Page { | ||
id: container | ||
|
||
/* | ||
* The usual, system-wide configuration values are set via D-Bus plugin by the | ||
* Patchmanager daemon, which stores them in /etc/patchmanager2.conf | ||
* This configuration group "uisettings" is for settings which *solely* affect | ||
* the PM GUI application and consequently also are per-user settings. | ||
*/ | ||
ConfigurationGroup { | ||
id: uisettings | ||
path: "/org/SfietKonstantin/patchmanager/uisettings" | ||
|
||
property bool showUnapplyAll: false | ||
} | ||
|
||
|
||
Timer { | ||
id : startTimer | ||
interval: 1500 | ||
|
@@ -138,16 +153,16 @@ Page { | |
PullDownMenu { | ||
busy: view.busy | ||
enabled: !busy | ||
|
||
/* | ||
Disabled due to discussion at https://github.com/sailfishos-patches/patchmanager/pull/272#issuecomment-1047685536 | ||
*/ | ||
|
||
MenuItem { | ||
text: qsTranslate("", "Deactivate all Patches") | ||
onClicked: menuRemorse.execute( text, function() { PatchManager.call(PatchManager.unapplyAllPatches()) } ) | ||
visible: PatchManager.loaded | ||
visible: uisettings.showUnapplyAll | ||
} | ||
*/ | ||
|
||
MenuItem { | ||
text: qsTranslate("", "About Patchmanager") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Copyright (C) 2013 Lucien XU <[email protected]> | ||
* Copyright (C) 2016 Andrey Kozhevnikov <[email protected]> | ||
* Copyright (c) 2021, Patchmanager for SailfishOS contributors: | ||
* Copyright (c) 2021, 2022, Patchmanager for SailfishOS contributors: | ||
* - olf "Olf0" <https://github.com/Olf0> | ||
* - Peter G. "nephros" <[email protected]> | ||
* - Vlad G. "b100dian" <https://github.com/b100dian> | ||
|
@@ -37,9 +37,24 @@ | |
|
||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
import Nemo.Configuration 1.0 | ||
import org.SfietKonstantin.patchmanager 2.0 | ||
|
||
Page { | ||
|
||
/* | ||
* The usual, system-wide configuration values are set via D-Bus plugin by the | ||
* Patchmanager daemon, which stores them in /etc/patchmanager2.conf | ||
* This configuration group "uisettings" is for settings which *solely* affect | ||
* the PM GUI application and consequently also are per-user settings. | ||
*/ | ||
ConfigurationGroup { | ||
id: uisettings | ||
path: "/org/SfietKonstantin/patchmanager/uisettings" | ||
|
||
property bool showUnapplyAll: false | ||
} | ||
|
||
SilicaFlickable { | ||
id: flick | ||
anchors.fill: parent | ||
|
@@ -73,6 +88,14 @@ Page { | |
automaticCheck: false | ||
} | ||
|
||
TextSwitch { | ||
text: qsTranslate("", "Show 'Deactivate all Patches' pulley menu entry") | ||
description: qsTranslate("", "Enable an additional pulley menu entry for Patchmanager's main page to deactivate all Patches.") | ||
checked: uisettings.showUnapplyAll | ||
onClicked: uisettings.showUnapplyAll = !uisettings.showUnapplyAll | ||
automaticCheck: false | ||
} | ||
|
||
TextSwitch { | ||
text: qsTranslate("", "Allow incompatible Patches") | ||
description: qsTranslate("", "Enable activating Patches, which are not marked as compatible with the installed SailfishOS version. Note that Patches, which are actually incompatible, will not work.") | ||
|