Commit Graph

64 Commits

Author SHA1 Message Date
Peter Hutterer
1ccf312bc0 Fix AttributeError after RatbagdButton.button was removed
AttributeError: 'RatbagdButton' object has no attribute 'button'

Introduced in 7f54cdc3f4

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 07:43:17 +02:00
Peter Hutterer
ee30a8683e Use 'name', not 'description' in the ratbagd bindings
ratbagd commit ff3730f3fba7dc9e4660fe841097d4f1fe1793e8

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 07:43:17 +02:00
Peter Hutterer
0f79ad4ee2 Fix import path for ratbagd modules
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-07-04 07:43:17 +02:00
Jente Hidskes
ae7acc48ba RatbagdResolution: add minres and maxres 2017-07-03 16:25:31 +10:00
Jente Hidskes
eb1fbbd4da README: update 2017-06-30 13:45:01 +02:00
Jente Hidskes
d6adeacfcb ratbagd: add RatbagdLed class
Fixes #16.
2017-06-30 12:41:45 +02: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
8e32b402df ratbagd: add missing commas 2017-06-13 08:55:18 +02:00
Jente Hidskes
7f54cdc3f4 ratbagd: add support for DBus signals
_RatbagdDBus now inherits from GObject so that we can use GObject's
signals when we receive a signal over DBus. This means that any users of
the bindings can just `Ratbagd*.connect("<signal>", <callback>)` to
be notified of any emitted signals.

Another advantage of inheriting to GObject is that the properties can
now be GObject properties. Again, this allows users of the bindings to
`Ratbagd*.connect("notify::<property>", <callback>)` to watch for
property changes.
2017-06-12 18:58:10 +10:00
Jente Hidskes
9e58fe885a ratbagd: add missing properties, methods and capabilities
To make it easier to verify that everything is implemented, I reordered
the properties and methods to follow
https://github.com/libratbag/ratbagd#the-dbus-interface.
2017-06-12 18:58:10 +10:00
Jente Hidskes
7112603a95 Import ratbagd bindings
This is a direct copy from the last ratbagd/python/ratbagd/__init__.py,
with the line "This file is part of ratbagd" removed, because, well,
it's not anymore.
2017-06-08 11:17:05 +02:00
Peter Hutterer
9a158c7f45 Change 'description' to 'name'
See ff3730f3fba7dc9e in ratbagd

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-08 10:03:07 +10: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
Peter Hutterer
6d44a84e45 piper 0.2.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
0.2.1
2016-04-06 12:16:40 +10:00
Peter Hutterer
0377e04a6a Fix icon path
Oh how I wish for a proper $datadir

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-06 12:16:00 +10:00
Peter Hutterer
5f33e42552 piper 0.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
0.2
2016-04-06 11:45:53 +10:00
Peter Hutterer
9918663380 Add an icon file
Same file as the 404, just shrunk down to 48 pixels and stretched a bit to
fill out the square canvadl (but it is still an svg). Someone with more design
skills can apply some spit and polish to it.

Note: like the .desktop file this ends up being installed in the egg when
using a normal setup.py run.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-06 11:26:22 +10:00
Peter Hutterer
83ebd8249a Reinstate the SIGINT signal handler
Dropped in 7a579f701f when we switched to setup.py. The main
entry point is now main() so we skipped over this code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-04-06 11:25:55 +10:00
Peter Hutterer
537b63440b Add __pycache__ to gitignore
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-09 08:17:59 +10:00
Peter Hutterer
f475a78a62 git add the COPYING file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-08 10:38:20 +10:00
Peter Hutterer
24dec78048 Add a .desktop file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-08 10:38:19 +10:00
Peter Hutterer
5f99b017a5 piper 0.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
0.1
2016-03-04 15:46:38 +10:00
Peter Hutterer
b1c1894b0d Rename to README.md
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
22cfc8d846 Spice up the README
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Dan Callaghan
7a579f701f Add setup.py, use pkg_resources for loading data files
Also converted piper.py from a standalone module into a package, so that
we have somewhere for setuptools to put the data files and load them
from.

Signed-off-by: Dan Callaghan <dcallagh@redhat.com>
2016-03-04 15:46:38 +10:00
Peter Hutterer
033a4a89a1 Drop the default-mouse graphic
We have a 404 image now, let's use that instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
e1d698ace0 Get the absolute svg path, not just the svg file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
7e46796779 Drop ratbag.py, moved to ratbagd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
e225a69607 Load the picture from the data dir
And add a 404 picture if we can't find one there.
Ideally the path should come from libratbag's pkgconfig file but that requires
hooking up a makefile or automake or something.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
51076d3f34 Don't change the combo box iter until we know which value to set it to
Changing the iter triggers the "changed" signal, so we set all buttons to None
first, then back to the actual value (if any)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
128dc2801d Write out the button mapping on change
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
56113d67df Fill in the button functions on the main page
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 15:46:38 +10:00
Peter Hutterer
b896cff5c5 Fix the ui file for the resolution-up entry
Glade crashing continuously and suggesting to autorestore lost this change

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-25 12:11:18 +10:00
Peter Hutterer
4e33bebcb5 Preselect the correct special function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-24 20:41:13 +10:00
Peter Hutterer
8417579b74 Hook up the radio buttons in the button map dialog
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-24 20:31:58 +10:00
Peter Hutterer
b795dd18ba Drop the height request for the listboxrow in the button interface
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-24 20:31:24 +10:00
Peter Hutterer
66a8f1cde0 Preselect the right action type in the button dialog
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-24 17:39:27 +10:00
Peter Hutterer
adf191f0ef Hook up the special function combo box
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-24 17:22:28 +10:00
Peter Hutterer
606fd8f243 ratbag: hook up the dbus buttons
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-24 17:21:59 +10:00
Peter Hutterer
032ad93c90 Read buttons from DBus
Or at least what ratbagd currently exports

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-23 13:32:00 +10:00
Peter Hutterer
19e9df2643 Make RatbagDBus the parent class for all ratbag objects
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-23 13:24:14 +10:00
Peter Hutterer
5dc6f78797 Show a button map dialog on button click
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-23 13:19:43 +10:00
Peter Hutterer
ad2d9c3da0 Make sure the error window is actually shown
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-23 11:50:29 +10:00
Peter Hutterer
28aabd73f4 Move window init into Piper's init
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-22 14:58:37 +10:00
Peter Hutterer
c7b2003786 Split ratbag init into a helper function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-22 14:57:49 +10:00
Peter Hutterer
7df603409e Hook up the profile buttons to update from the device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-22 14:44:30 +10:00
Peter Hutterer
4876bab591 First selected profile is the current one, not the active one
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-22 14:44:30 +10:00
Peter Hutterer
039f8fca9f Hook up resolution changes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-22 14:44:30 +10:00
Peter Hutterer
c92330d1a4 Hook up setting the report rate
Still missing from libratbag though

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-02-22 14:44:30 +10:00