Commit Graph

7 Commits

Author SHA1 Message Date
Peter Hutterer
5440618ebc Piper: check for required GTK version at runtime
Related to #111
2017-08-16 10:21:57 +10:00
Jente Hidskes
8d77e4bf6c Window: use GtkTemplate to instantiate from a GtkBuilder template
In C/GTK+, templates allow one to define the UI in .ui files, from which
implementations can be instantiated. This significantly reduces
boilerplate code that creates widgets, sets their desired properties and
connects their signals[1, 2].

For several reasons, this does not work in Python[3]. gi_composites.py[4] is an
implementation in Python that does make this work. It's been used by
several projects for a few months now and none report issues. See the
project's README for more information[5].

Taking these facts into mind, let's experiment for a bit and see how it
can serve Piper.

[1]: https://wiki.gnome.org/HowDoI/CustomWidgets#Templates
[2]: https://blogs.gnome.org/tvb/2013/04/09/announcing-composite-widget-templates/
[3]: https://bugzilla.gnome.org/show_bug.cgi?id=701843
[4]: https://github.com/virtuald/pygi-composite-templates/
[5]: https://github.com/virtuald/pygi-composite-templates/blob/master/README.rst
2017-07-27 09:36:39 +02:00
Jente Hidskes
5508d53929 Add a piper.devel output to run from source tree
Fixes #50
2017-07-26 10:07:28 +02:00
Jente Hidskes
33afa03f14 Application: a Gtk.Application subclass
A Gtk.Application subclass to handle the application's initialization
and integration with the GNOME stack. It implements the do_startup and
do_activate methods and is responsible for the application's menus,
icons, title and lifetime.
2017-07-04 15:53:05 +10:00
Benjamin Tissoires
7b6fcdddc0 Add circle.yml
Currently only checks for style issues

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-06-30 11:21:36 +02:00
Jente Hidskes
fe287b5743 Conform to PEP8 style guide
It's good to have to code comply to a style guide; we go for PEP8
because it's the most used one. Checking for conformance should be done
using the `flake8` tool and the configuration given in this commit.

E402 and E501 are ignored because we don't care (that much) about line
length, and GObject Introspection requires us to import things as we
currently do.

piper/piper.py has not been fixed as it is going to be removed
eventually, when all its relevant bits have found a place in the new
code. It is therefore also ignored in the checking.
2017-06-30 10:39:04 +02:00
Jente Hidskes
45c669b8ad Port to Meson
As discussed in #5, this enables better integration with the GNOME stack
through Meson's GNOME module. This will allow us to use GSchemas,
AppData and other GNOME technologies much easier. It will also simplify
building Flatpaks of Piper.
2017-06-07 17:07:13 +02:00