Hi, here we collect some documentation and resources for developing with Python GTK & Glade
Links to documentation
- PyGObject API reference https://lazka.github.io/pgi-docs/
- PyGTK tutorial (start here) https://python-gtk-3-tutorial.readthedocs.io/
- Extensive docs on working with GTK and Glade as part of Librem5 project https://developer.puri.sm/Librem5/Apps/Gnome.html
Handy tips and tricks
apt install gtk3-widget-factory
for widget porn & reference
Enable the GTK inspector/debugger
It's like the browser's inspector, but for GTK gui applications. Allows you to see the parameters of widgets, change them live, tweak CSS etc etc.
https://wiki.gnome.org/action/show/Projects/GTK/Inspector
In the terminal do: gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
Then ctrl+shift+i
to inspect an element you are hovering over.
Reference projects
Technical
Ideally written in Python, using GTK and x-platform
- minigalaxy, a GOG library manager using PyGTK and glade
- Exaile, a PyGTK cross platform application
- pithos, PyGTK radio player, handles templates in a specific way
Design / conceptual
- onionshare, anon sharing over TOR, d&d interface, otherwise clunky
Develop
Install for Hacking
Install poetry and then install the package locally.
$ poetry install
Run in Hackity Hack Hack Mode
$ poetry run dropship
Updating dependencies
- Change the bounds/versions/etc. in the pyproject.toml
- Run
poetry update
- Commit and push your changes
The poetry.lock file helps us all get the same dependencies.
Adding a Github Mirror
We use a Github mirror so we can have a gratis automated release build.
Add the following to the bottom of your .git/config
.
[remote "all"]
url = ssh://gitea@vvvvvvaria.org:12345/rra/dropship.git
url = git@github.com:decentral1se/dropship.git
The git push -u all main
will setup git push
to automatically push to both remotes.
Make a new Release
Publishing binaries is disabled until we make further progress on #3
$ git tag $mytag # follow semver.org please
$ git push
The Travis CI configuration will run a build and publish binaries here.