diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-01-12 17:08:54 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-01-12 17:08:54 +0100 |
commit | 42b68c8d38a2e8ea4b50b87b69ba5d1ab2f19472 (patch) | |
tree | 48dd3d4ef4d671a7d1d4d4a093631c0ad5fc1502 | |
parent | 06904269d867ed7c8355c0615473baf524fcf30b (diff) | |
download | tagit-42b68c8d38a2e8ea4b50b87b69ba5d1ab2f19472.tar.gz tagit-42b68c8d38a2e8ea4b50b87b69ba5d1ab2f19472.tar.bz2 tagit-42b68c8d38a2e8ea4b50b87b69ba5d1ab2f19472.zip |
cosmetics
-rw-r--r-- | tagit/__init__.py | 11 | ||||
-rw-r--r-- | tagit/actions/filter.py | 22 |
2 files changed, 22 insertions, 11 deletions
diff --git a/tagit/__init__.py b/tagit/__init__.py index 3b1c21c..1a501d0 100644 --- a/tagit/__init__.py +++ b/tagit/__init__.py @@ -1,5 +1,16 @@ """Tagit standalone user interfaces. +Tagit contains several submodules: +* apps: Launchable standalone applications. +* windows: Compositions of various UI functionality. +* widgets: Individual UI components and core functions. +* dialogues: Pop-up dialogues. +* actions: Single actions that can be performed on widgets. +* tiles: Display a digestible amount of information. + +Additional core functionality is provided by some generic +modules (utils, parsing, config, etc.). + Part of the tagit module. A copy of the license is provided with the project. Author: Matthias Baumgartner, 2022 diff --git a/tagit/actions/filter.py b/tagit/actions/filter.py index 869844e..3702879 100644 --- a/tagit/actions/filter.py +++ b/tagit/actions/filter.py @@ -22,7 +22,7 @@ from tagit.widgets.bindings import Binding from tagit.widgets.filter import FilterAwareMixin # inner-module imports -from . import action +from .action import Action # exports __all__ = [] @@ -35,7 +35,7 @@ Builder.load_file(os.path.join(os.path.dirname(__file__), 'filter.kv')) # classes -class SearchByAddressOnce(action.Action): +class SearchByAddressOnce(Action): """Open the filters in address mode for a single edit""" text = kp.StringProperty('Inline edit') @@ -46,7 +46,7 @@ class SearchByAddressOnce(action.Action): self.root.filter.show_address_once() -class SetToken(action.Action): +class SetToken(Action): """Set all filters from a text query.""" text = kp.StringProperty('Set tokens') @@ -84,7 +84,7 @@ class SetToken(action.Action): dialogues.Error(text=f'syntax error: {e}').open() -class AddToken(action.Action): +class AddToken(Action): """Show a dialogue for adding a filter.""" text = kp.StringProperty('Add filter') @@ -123,7 +123,7 @@ class AddToken(action.Action): self.root.browser.frame = Frame() -class EditToken(action.Action): +class EditToken(Action): """Show a dialogue for editing a filter.""" text = kp.StringProperty('Edit token') @@ -182,7 +182,7 @@ class EditToken(action.Action): filter.f_tail.pop(idx) -class RemoveToken(action.Action): +class RemoveToken(Action): """Remove a filter.""" text = kp.StringProperty('Remove token') @@ -204,7 +204,7 @@ class RemoveToken(action.Action): filter.t_tail.remove(token) -class GoBack(action.Action): +class GoBack(Action): """Remove the rightmost filter from the search.""" text = kp.StringProperty('Previous search') @@ -222,7 +222,7 @@ class GoBack(action.Action): self.root.browser.frame = filter.f_head.pop(-1) -class GoForth(action.Action): +class GoForth(Action): """Add the rightmost filter to the search""" text = kp.StringProperty('Next search') @@ -240,7 +240,7 @@ class GoForth(action.Action): self.root.browser.frame = filter.f_tail.pop(0) -class JumpToToken(action.Action): +class JumpToToken(Action): """Jump to a filter token.""" text = kp.StringProperty('Jump to token') @@ -254,12 +254,12 @@ class JumpToToken(action.Action): self.root.trigger('GoForth', filter.t_tail.index(token) + 1) -class SearchmodeSwitch(action.Action, FilterAwareMixin): +class SearchmodeSwitch(Action, FilterAwareMixin): """Switch between shingle and address search bar display.""" text = kp.StringProperty('Toggle searchbar mode') def on_root(self, wx, root): - action.Action.on_root(self, wx, root) + Action.on_root(self, wx, root) FilterAwareMixin.on_root(self, wx, root) def on_searchmode(self, filter, searchmode): |