Merged
Conversation
This is a hacky, temporary solution. This state can be achieved by: - Creating a score timeline and then deleting the beat timeline used to create it - Restoring the app state (e.g. after an exception during a timeline command), if the svg viewer happens to be loaded before the beat timeline is restored
"" is a valid value for the color property, it means "use the default color", just as None.
…eline kinds We should leverage classes as first-class citizens to use them instead of relying on an additional TimelineKind abstraction (TimelineKind). This is a first step towards that.
This commits introduces the commands API, a much simpler way to handle user interactions. Commands make all the following obsolete:
- All timeline and timeline component `RequestHandlers`
- `TimelineComponentSelector`
- Several `TimelineSelectors`
- `TiliaActions`
- `user_action` fixture
- `TimelineUi.on_timeline_request`, `TimelineUI.on_timeline_component_request` (substituted by `TimelineUIs.on_timeline_command`)
- `TimelineUIs.pre_process_timeline_request()`
- `tilia\ui\timelines\collection\requests\args.py`
- Several `Post` and `Get` members
- Some `TimelineSelector` members
The core functionality is given by `command.py`, along with fuller documentation.
Usage of commands:
```
# Register a new command
commands.register(
'example.command',
callback_function,
text='Menu Text', # Optional: for display in Qt interface
shortcut='Ctrl+E', # Optional: keyboard shortcut
icon='example_icon' # Optional: icon name in IMG_DIR (without extension)
)
# Execute a command
commands.execute('example.command', arg1, arg2, kwarg1=value1)
```
Examples of commands:
- File commands: 'file.open', 'file.save', 'file.export.img'
- Timeline commands: 'timeline.delete', 'timeline.component.copy'
- View commands: 'view.zoom.in', 'view.zoom.out'
Note that we can pass arguments to commands directly, so we don't need (horrible) things like `TimelineSelector.FROM_MANAGE_TIMELINES_TO_PERMUTE`.
Commands also set the stage for plugins, as they provide a simpler interface to modify application state programatically.
Also add tests for clear commands
Also improve message wording.
Collaborator
Author
Collaborator
Author
|
@azfoo, let me know if you want to review this (partly or fully). |
7749286 to
4749d00
Compare
Before this changes to default audio outputs in the OS would be ignored. If the default output was removed, for instance, there was no way to regain sound playback, even if the output was added again.
items show up alphabetically in help
Collaborator
Author
See #407. |
Collaborator
Author
|
I am merging this before final approval to try and release v0.6.0 today. I don't think it will be possible though. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Introduces the commands API, a much simpler way to handle user interactions. Commands make all the following obsolete:
RequestHandlersTimelineComponentSelectorTimelineSelectorsTiliaActionsuser_actionfixtureTimelineUi.on_timeline_request,TimelineUI.on_timeline_component_request(substituted byTimelineUIs.on_timeline_command)TimelineUIs.pre_process_timeline_request()tilia\ui\timelines\collection\requests\args.pyPostandGetmembersTimelineSelectormembersThe core functionality is given by
command.py, along with fuller documentation.Usage of commands:
Examples of commands:
Note that we can pass arguments to commands directly, so we don't need (horrible) things like
TimelineSelector.FROM_MANAGE_TIMELINES_TO_PERMUTE.Commands also set the stage for plugins, as they provide a simpler interface to modify application state programatically.
This PR also contains small changes that were covenient preliminaries for or complements to the implementation:
- Bug fixes (3be8cee, 24576bd, 6964fdd)
- Additional testing (467cb5e, f07fd4d)
- Convenient refactors (b8d15ef, 914a0bd, 974e715, 769e30b, f13fa08)
- Documentation (45dd1da)