-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- RulesManager: Disable group by position when results aren't available - GUI: RulesManager: Add current group by option to dialog title - GUI: RulesManager: Ctrl(+shift)+tab cycles through group by options - GUI: RulesManager: F6 switches from the list to the summary or comments back and forth - GUI: RulesManager: Fix layout - GUI: RuleEditor: Fix checking for conflicting name when renaming a rule - GUI: RuleEditor: Fix layout - Remove `showManager`, `showCreator` and `showEditor` from `webModuleHandler` and `ruleHandler` - webModuleHandler: Remove `getEditableScratchpadWebModule` and `getEditableUserConfigWebModule` from public API - WebModule: Add `getWritableLayer` to public API - WebModuleDataLayer: Remove obsolete `rulesOnly` attribute - Bump API version to 0.6
- Loading branch information
1 parent
b3878cf
commit 7947177
Showing
15 changed files
with
598 additions
and
636 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
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 |
---|---|---|
|
@@ -20,10 +20,13 @@ | |
# See the file COPYING.txt at the root of this distribution for more details. | ||
|
||
|
||
__version__ = "2024.08.24" | ||
__version__ = "2024.08.25" | ||
__authors__ = ( | ||
"Shirley Noel <[email protected]>", | ||
"Julien Cochuyt <[email protected]>", | ||
"André-Abush Clause <[email protected]>", | ||
"Sendhil Randon <[email protected]>", | ||
"Gatien Bouyssou <[email protected]>", | ||
) | ||
|
||
|
||
|
@@ -187,13 +190,12 @@ def onAutoActionChoice(self, evt): | |
|
||
@guarded | ||
def onAddGesture(self, evt): | ||
context = self.context | ||
context = self.context.copy() | ||
context["data"]["gestures"] = self.gesturesMap | ||
if gestureBinding.show(context=context, parent=self) == wx.ID_OK: | ||
id = context["data"].pop("gestureBinding")["gestureIdentifier"] | ||
if gestureBinding.show(context, self): | ||
id = context["data"]["gestureBinding"]["gestureIdentifier"] | ||
self.onGestureChange(Change.CREATION, id) | ||
del context["data"]["gestures"] | ||
|
||
|
||
@guarded | ||
def onDeleteGesture(self, evt): | ||
index = self.gesturesListBox.Selection | ||
|
@@ -203,15 +205,13 @@ def onDeleteGesture(self, evt): | |
|
||
@guarded | ||
def onEditGesture(self, evt): | ||
context = self.context | ||
context = self.context.copy() | ||
gestures = context["data"]["gestures"] = self.gesturesMap | ||
id = self.getSelectedGesture() | ||
context["data"]["gestureBinding"] = {"gestureIdentifier": id, "action": gestures[id]} | ||
if gestureBinding.show(context=context, parent=self) == wx.ID_OK: | ||
if gestureBinding.show(context=context, parent=self): | ||
id = context["data"]["gestureBinding"]["gestureIdentifier"] | ||
self.onGestureChange(Change.UPDATE, id) | ||
del context["data"]["gestureBinding"] | ||
del context["data"]["gestures"] | ||
|
||
def onGestureChange(self, change: Change, id: str): | ||
if change is Change.DELETION: | ||
|
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 |
---|---|---|
|
@@ -20,8 +20,15 @@ | |
# See the file COPYING.txt at the root of this distribution for more details. | ||
|
||
|
||
__version__ = "2024.08.19" | ||
__author__ = "Shirley Noel <[email protected]>" | ||
__version__ = "2024.08.25" | ||
__authors__ = ( | ||
"Shirley Noel <[email protected]>", | ||
"Frédéric Brugnot <[email protected]>", | ||
"Julien Cochuyt <[email protected]>", | ||
"André-Abush Clause <[email protected]>", | ||
"Sendhil Randon <[email protected]>", | ||
"Gatien Bouyssou <[email protected]>", | ||
) | ||
|
||
|
||
from collections.abc import Mapping | ||
|
@@ -211,4 +218,4 @@ def _captureFunc(self, gesture): | |
|
||
|
||
def show(context: Mapping[str, Any], parent: wx.Window): | ||
return showContextualDialog(GestureBindingDialog, context, parent) | ||
return showContextualDialog(GestureBindingDialog, context, parent) == wx.ID_OK |
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 |
---|---|---|
|
@@ -22,8 +22,12 @@ | |
"""Web Access GUI.""" | ||
|
||
|
||
__version__ = "2024.08.02" | ||
__author__ = "Julien Cochuyt <[email protected]>" | ||
__version__ = "2024.08.25" | ||
__authors__ = ( | ||
"Julien Cochuyt <[email protected]>", | ||
"André-Abush Clause <[email protected]>", | ||
"Gatien Bouyssou <[email protected]>", | ||
) | ||
|
||
|
||
import wx | ||
|
@@ -33,7 +37,6 @@ | |
|
||
from ... import webAccess | ||
from .. import ruleHandler | ||
from .. import webModuleHandler | ||
from ..utils import guarded | ||
from . import webModulesManager | ||
|
||
|
@@ -53,17 +56,15 @@ def __init__(self, context): | |
self.context = context | ||
|
||
if webAccess.webAccessEnabled: | ||
webModule = context["webModule"] if "webModule" in context else None | ||
webModule = context.get("webModule") | ||
|
||
if webModule is not None: | ||
if webModule: | ||
item = self.Append( | ||
wx.ID_ANY, | ||
# Translators: Web Access menu item label. | ||
_("&New rule...") | ||
) | ||
self.Bind(wx.EVT_MENU, self.onRuleCreate, item) | ||
|
||
if webModule is not None: | ||
item = self.Append( | ||
wx.ID_ANY, | ||
# Translators: Web Access menu item label. | ||
|
@@ -72,13 +73,14 @@ def __init__(self, context): | |
self.Bind(wx.EVT_MENU, self.onRulesManager, item) | ||
self.AppendSeparator() | ||
|
||
if webModule is None: | ||
if not webModule: | ||
item = self.Append( | ||
wx.ID_ANY, | ||
# Translators: Web Access menu item label. | ||
_("&New web module...")) | ||
self.Bind(wx.EVT_MENU, self.onWebModuleCreate, item) | ||
else: | ||
|
||
if webModule: | ||
item = self.Append( | ||
wx.ID_ANY, | ||
# Translators: Web Access menu item label. | ||
|
@@ -110,23 +112,30 @@ def show(self): | |
|
||
@guarded | ||
def onRuleCreate(self, evt): | ||
ruleHandler.showCreator(self.context) | ||
self.context["new"] = True | ||
from .rule.editor import show | ||
show(self.context, gui.mainFrame) | ||
|
||
@guarded | ||
def onRulesManager(self, evt): | ||
ruleHandler.showManager(self.context) | ||
from .rule.manager import show | ||
show(self.context, gui.mainFrame) | ||
|
||
@guarded | ||
def onWebModuleCreate(self, evt): | ||
webModuleHandler.showCreator(self.context) | ||
self.context["new"] = True | ||
from .webModuleEditor import show | ||
show(self.context, gui.mainFrame) | ||
|
||
@guarded | ||
def onWebModuleEdit(self, evt): | ||
webModuleHandler.showEditor(self.context) | ||
from .webModuleEditor import show | ||
show(self.context) | ||
|
||
@guarded | ||
def onWebModulesManager(self, evt): | ||
webModuleHandler.showManager(self.context) | ||
from .webModulesManager import show | ||
show(self.context) | ||
|
||
@guarded | ||
def onWebAccessToggle(self, evt): | ||
|
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 |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
# See the file COPYING.txt at the root of this distribution for more details. | ||
|
||
|
||
__version__ = "2024.08.02" | ||
__version__ = "2024.08.25" | ||
__author__ = "Julien Cochuyt <[email protected]>" | ||
|
||
|
||
|
@@ -32,7 +32,7 @@ | |
class RuleAwarePanelBase(ContextualSettingsPanel, metaclass=guiHelper.SIPABCMeta): | ||
|
||
def getRuleData(self): | ||
return self.context["data"].setdefault("rule", {}) | ||
return self.context.setdefault("data", {}).setdefault("rule", {}) | ||
|
||
def getRuleManager(self): | ||
return self.context["webModule"].ruleManager | ||
|
Oops, something went wrong.