- Only apply when actually running under py2app, as opposed to whenever
running on macOS.
- Instead of setting PATH to a fully hardcoded value, just append
/usr/local/bin if not already present. That way any non-default
choices by the user are respected.
- Unset PYTHONPATH instead of setting it based on /usr/bin/python's
sys.path. mpv or other players could end up invoking any copy of
Python, so there's no sensible value to set it to, but it's (normally)
fine to leave it blank. The important thing is that we don't keep the
value set by py2app, pointing to our own Contents/Resources directory.
(It should be safe to change PYTHONPATH at this point without
affecting Syncplay's own execution, since Python only checks it at
startup.)
- Unset other Python environment variables instead of just PYTHONPATH,
because py2app sets a number of them (including
PYTHONDONTWRITEBYTECODE and PYTHONHOME).
- Do the environment variable patchup when starting Syncplay, so it
applies to all players rather than just mplayer-based ones.
Fixes#276.
The freedesktop project requires that the AppStream metadata are
released under a subset of licenses that does not include Apache 2.0.
For this reason, we decided to change the license of the README file
and release it under the MIT license (after obtaining explicit
permission from all the contributors to that file). With the same
goal, the script that generates the AppImage and the AppStreams
metadata is also released under the MIT license. The README file now
clearly states the project license and that some files are released
under a different license, as declared in their header or in our
third-party notices file.
This commit adds to our UI the support for macOS 10.14+ Dark Mode.
Qt already adapts a large fraction of the color scheme, but some
label colors had to be adjusted and were put in separate STYLE_DARK
constants. To determine if the OS is set in Dark or Light Mode, we
use a new dependency, included in the vendor folder:
Darkdetect - license: BSD-3-Clause
To allow the app bundle to use the Dark Mode APIs, a constant is
added in the info.plist ('NSRequiresAquaSystemAppearance': False)
Qt on macOS automatically adds these entries to the menubar of GUI apps,
providing that such apps have an Edit menu at their startup.
Hence, this commit contains the following changes (macOS only):
- create the menubar in the first dialog shown by the app (GuiConfiguration)
- create an Edit menu, populate it with Cut/Copy/Paste/Select all actions
- connect system-wide shortcuts to these new actions
- pass the menubar and the Edit menu to the MainWindow through config and
through an added optional argument in getUI and GraphicalUI
- populate the menubar created before and not a new menubar in MainWindow
- provide localized strings for the entries in the Edit menu
- add xx.lproj folders in Syncplay.app/Contents/Resources/ to allow
automatic localization of the entries added by the OS
Known issues:
- automatically added entries will always be in the OS language
- the Edit menu might retain the previous language after a language
change in the app settings. Reboot the app solves the issue.
- the automatically added entries might disappear if the app language
does not match the OS language