mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
Merge master: the modules moved into a package
Every file this branch touches moved into dikte/, so the merge is mostly the rename following the edits. What needed a hand: hotkey.py: master replaced the _macos()/_gnome() pair with one backend() chooser, and this branch had added _windows() to the pair. Windows is a fifth value of the chooser now, and everything that used to ask "macOS or Windows?" asks backend() instead. The key is held by the running process there, so installs_shortcuts() and shortcut_needs_restart() are both false for it, and desktop_name() says Windows. install.ps1 and the Windows README name dikte/__main__.py, the entry point the Linux and macOS installers were pointed at in the same commit. The Start Menu entry, the autostart entry and the dikte.cmd shim all come off one $entry variable. settings_ui.py: the shortcut tab now has a Windows sentence of its own, with the Turkish for it. Falling through to the branch master wrote for a desktop with no registry would have told a Windows user to check /dev/input. Nothing covers that branch: there is no Windows Settings test class, the way there is one for macOS. CONTRIBUTING: the chooser it names is backend() now, and the test count is the merged one, 1067 of 1110 running anywhere.
This commit is contained in:
+5
-5
@@ -58,10 +58,10 @@ entry in a table, and one chooser picks between them, so a fifth adds an entry
|
||||
and a line rather than a branch inside every function. The tables are
|
||||
`paste.Desktop` (clipboard and key press), `audio.Sound` (capture, the device
|
||||
lists, and whether the far side of a meeting can be recorded at all),
|
||||
`paths.directories()` (where the settings and the data live) and the
|
||||
`_macos()`/`_windows()`/`_gnome()` set in `hotkey.py`. Keep `sys.platform` inside
|
||||
the chooser and read it there every time: a constant settled at import is one no
|
||||
test can stand somewhere else.
|
||||
`paths.directories()` (where the settings and the data live) and `hotkey.backend()`,
|
||||
which names the one mechanism a session has for holding a key. Keep `sys.platform`
|
||||
inside the chooser and read it there every time: a constant settled at import is
|
||||
one no test can stand somewhere else.
|
||||
|
||||
Where a platform cannot do something, say so in its table entry rather than in
|
||||
the code that asks. `audio.Sound.meetings` is the shape of it: Windows offers no
|
||||
@@ -70,7 +70,7 @@ there can tell that apart from an empty device list, which only means the tool
|
||||
that lists them is not installed.
|
||||
|
||||
The tests are split along the same line, and almost none of them are skipped.
|
||||
1009 of the 1052 run on any machine, including every line of the Wayland, X11,
|
||||
1067 of the 1110 run on any machine, including every line of the Wayland, X11,
|
||||
macOS and Windows backends: the programs are faked at `shutil.which`, the
|
||||
frameworks and system libraries at the one function that loads them
|
||||
(`paste._win_api`, `hotkey._win_input`). A test class says which system it is
|
||||
|
||||
Reference in New Issue
Block a user