Repository navigation
Conversation
added 18 commits
October 22, 2026 16:14
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.
This makes python-manatools usable on Windows 10/11 with the Qt, GTK (MSYS2), ncurses (windows-curses) and web backends. All Windows-specific code is guarded by
sys.platform == 'win32'or by feature detection, so Linux behaviour is unchanged.Changes
Packaging
dbus-pythonis a Linux-only dependency;windows-cursesis added on Windows.manatools.servicesimports without dbus and raises a clearRuntimeErrorwhen used where systemd is not available.Backend detection
YUItries Qt, then GTK4, then ncurses. The XDG/X11/Wayland session checks do not apply there.MUI_BACKENDstill overrides thechoice.
Paths and configuration
AppConfigstores system settings in%PROGRAMDATA%\<app>and user preferences in%APPDATA%\<app>\<app>.yaml. The user directory is created when preferences are saved.documents_dir()asks the Windows shell for the Documents folder, so a folder redirected to OneDrive is also found.Localization
LANGUAGEis set unless the user already set one of the locale variables).AppArgsuses gettext's default locale directory on Windows instead of/usr/share/locale.Icons
icon_theme_dirs()returns the icon theme roots. Directories inMANATOOLS_ICON_PATHcome first, then<python prefix>\share\iconson Windows or the XDG locations elsewhere. Qt, GTK and the web server's/icon/route all use it.actions/22/rather than22x22/actions/).tools/install-icon-theme.ps1downloads the KDE Breeze icons, checks their SHA-256, installs them without admin rights or Developer Mode, and adds them toMANATOOLS_ICON_PATH.Qt
fcntl.fcntldoes not exist on Windows, and theresignal.set_wakeup_fdandQSocketNotifieronly accept sockets.ncurses
\r,KEY_ENTERand the PDCurses keypad Enter (PADENTER) is treated as\n.resize_term(0, 0)on PDCurses).SetConsoleTitleW, because the legacy console prints escape sequences as text.Web
SO_EXCLUSIVEADDRUSE. On Windows,SO_REUSEADDRlets a second process bind a port already in use, so a busyMUI_WEB_PORTwas shared instead of falling back to a free port.Testing
Tested on a Windows VM with Python 3.13 and PySide6 6.12:
tests/pass, the GTK ones under MSYS2 UCRT64 Python (GTK 4.24, PyGObject 3.58).The same checks still pass on Linux.
Not covered
manatools.servicesremains Linux-only (systemd over D-Bus).tools/install-icon-theme.ps1installs one.