Commit Graph

269 Commits

Author SHA1 Message Date
Jente Hidskes
4f560b0d1e ratbagd: sync with libratbag 2017-09-14 16:13:42 +02:00
AsavarTzeth
e90bb153b1 Add sv l10n
Add Swedish translation to Piper.
2017-09-14 12:37:38 +02:00
Jente Hidskes
2d3af89413 ratbagd: sync with libratbag 2017-09-07 12:00:54 +02:00
Jente Hidskes
65564128f2 piper/ratbagd.py: sync with libratbag 2017-08-31 15:24:35 +02:00
Jente Hidskes
3aae9c0a45 RatbagdResolution: cache the is_default property to signal only changes
Circumvents bb23f68d53/ratbagd/ratbagd-resolution.c (L118)
2017-08-31 15:22:09 +02:00
Jente Hidskes
1c0548a4dc RatbagdResolution: cache the is_active property to signal only changes
Circumvents bb23f68d53/ratbagd/ratbagd-resolution.c (L85)
2017-08-31 15:22:09 +02:00
Jente Hidskes
f8ab2492dd RatbagdProfile: emit notify::is-active from DBus' PropertyChanged signal
This ensures that it is fired in all instances where the property is
updated, and not just on our own `set_active` method.

We also cache the property so that we can emit the signals only for the
profile that *was* the active one, and the one that *became* the active
one, to circumvent
bb23f68d53/ratbagd/ratbagd-profile.c (L271)

Fixes #167.
2017-08-31 15:22:09 +02:00
Jente Hidskes
55365a0087 MousePerspective: fix previous commit 2017-08-29 16:06:00 +02:00
Peter Hutterer
eb5ffd558a ratbagd: implement commit as async call
Commit may take a while on some devices and crashes piper thanks to the
timeouts being hit. Implement this function as an asynchronous call.

Fixes #130
2017-08-29 13:49:33 +02:00
Jente Hidskes
7e24a26dbb ButtonDialog: correctly (re)initialize the current macro on Escape
Fixes #159.
2017-08-29 11:59:49 +10:00
Jente Hidskes
e35fda4f88 MouseMap: redraw on allocate
In a previous commit I added this optimization that prevents redrawing
the widget when it is reallocated: with the widget being centered,
enlarging the window does not require to redraw the widget.

However, I missed the case where the allocation actually gets smaller
(and thus the SVG is repositioned) when the width of one of the child
widgets changes, which would with this optimization result in parts of
the SVG being shifted a few pixels to the left with the remainder being
in its original position. Hence, this fixes a visual glitch in drawing
the SVG.
2017-08-29 09:19:33 +10:00
gogogogi
1c75b90db9 Update hr.po 2017-08-26 00:41:03 +02:00
muzena
0fd6dd33db Add hr.po 2017-08-26 00:41:03 +02:00
Peter Hutterer
d631ea76fc meson.build: 0.2.900
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
0.2.900
2017-08-25 14:28:07 +10:00
Piotr Drąg
555482886b Update Polish translation 2017-08-24 07:25:43 +10:00
Jente Hidskes
d2a94f833e po/pl: generate against new .pot 2017-08-24 07:06:04 +10:00
Jente Hidskes
1f4e31d4ca po/nl: translate missing string 2017-08-24 07:06:04 +10:00
Jente Hidskes
85fe2e8b75 po/de: update with latest changes 2017-08-24 07:06:04 +10:00
Jente Hidskes
fd8da3147f po/nl: update with latest changes 2017-08-24 07:06:04 +10:00
Jente Hidskes
310cb2e519 piper: comment on {} for translators 2017-08-24 07:06:04 +10:00
Jente Hidskes
016dec2a45 ratbagd: s/* Cycle [Up|Down]/Cycle * [Up|Down]/ 2017-08-24 07:06:04 +10:00
Jente Hidskes
a629f776d8 ratbagd: s/Resolution Default/Default Resolution/ 2017-08-24 07:06:04 +10:00
Jente Hidskes
6e240c5e36 WelcomePerspective: add context on the same string 2017-08-24 07:06:04 +10:00
Jente Hidskes
19f6e1e7c0 ButtonDialog: s/left-handedness/left-handed 2017-08-24 07:06:04 +10:00
Piotr Drąg
e5586d9ccb Add Polish translation 2017-08-23 16:50:44 +02:00
Jente Hidskes
a0753fdd73 po/de: update based on line numbers 2017-08-23 19:08:56 +10:00
Jente Hidskes
299b234e60 po/nl: update with new strings 2017-08-23 19:08:56 +10:00
Peter Hutterer
10a7663696 data: make the Welcome title translatable 2017-08-23 19:08:56 +10:00
Peter Hutterer
3a912bc7e2 piper: change a string for missing ratbagd
Easier to just spell ratbagd out than rely on the magic "it". Certainly works
better in the German translations.
2017-08-23 19:08:56 +10:00
Peter Hutterer
35f711a835 Add German translation 2017-08-23 19:08:56 +10:00
Peter Hutterer
e0db4749d9 data: make the "Oh Oh" title translatable 2017-08-23 19:08:56 +10:00
Peter Hutterer
f04a0e94a5 ui: limit the length of macros displayed in the option box
Otherwise it stretches the whole GUI
2017-08-23 09:50:38 +02:00
Jente Hidskes
eed44e5942 Add Dutch translation 2017-08-23 12:38:51 +10:00
Jente Hidskes
0d54a60df2 Add context where needed for translators 2017-08-23 12:38:51 +10:00
Jente Hidskes
b7dd69df53 ButtonDialog: match "Send Keystroke" label with that in the .ui file 2017-08-23 12:38:51 +10:00
Jente Hidskes
3bff3e4759 Ratbagd: use deferred translations to translate map entries 2017-08-23 12:38:51 +10:00
Jente Hidskes
4acede1397 Add support for translations
Based on earlier work by @whot:

44d8265d4a

Fixes #12.
2017-08-23 12:38:51 +10:00
Peter Hutterer
33b4001a12 Add the ErrorPerspective before all others
If ratbag is None, we crash during add_perspective because the other
perspectives rely on it being valid. Instead of adding a bunch of "is None" to
the add_perspective call, just add the ErrorPerspective first, check for
ratbag and exit if it doesn't exist. Otherwise, add the other two
perspectives and continue on our merry way.
2017-08-23 09:24:31 +10:00
Jente Hidskes
98a14a9e64 RatbagdMacro: group successive key press and release
Fixes #144.
2017-08-23 09:09:36 +10:00
Jente Hidskes
8795e7dd5f ButtonDialog: break lines after max character width 2017-08-23 09:09:36 +10:00
Jente Hidskes
c0c67cda64 RatbagdMacro: remove KEY_ prefix 2017-08-23 09:09:36 +10:00
Peter Hutterer
8001b74c6d ButtonDialog: when pressing Apply, make sure we commit the current macro 2017-08-23 09:06:59 +10:00
Peter Hutterer
501c912c70 ButtonDialog: always accept enter/escape for macros
The event state may never be 0 if e.g. numlock is turned on. And it shouldn't
matter for us anyway, let's not go to the headache of trying to figure out how
to map return/escape.
2017-08-23 09:06:59 +10:00
Jente Hidskes
749821b89f ButtonsPage: use RatbagdMacro to present macros
Fixes #100.
2017-08-23 09:06:59 +10:00
Jente Hidskes
1dba057ba3 Introduce RatbagdMacro to abstract macros
This change cleans up the shady KeyStroke class that never felt quite
right. Its behavior is split over RatbagdMacro, which is a new class
abstracting a macro as a list of (type, keycode) tuples with a
human-readable representation and methods to manipulate said list, and
the existing ButtonDialog class which is now again fully responsible for
any and all input event handling. RatbagdMacro has no notion whatsoever
of Gdk; all of this is now only found in Piper's GUI code where it
belongs.
2017-08-23 09:06:59 +10:00
Peter Hutterer
52c70acfbf ui: reconnect the radio button signal handler for left/right handed
Lost in 2965979484
2017-08-22 14:04:59 +02:00
Peter Hutterer
c0b0ac1a36 ButtonDialog: don't crash on unknown mapping types
The ratbagd test device still uses a Key action type which we ignore in piper.
This leads to the correct "Unknown" display, but crashes when we click on the
button to configure it - self._mapping triggers and AttributeError.

Avoid this by simply resetting it to -1. At least that way we don't crash.
2017-08-22 14:04:59 +02:00
Peter Hutterer
408a5ca5cf ButtonDialog: show right-handed mapping for things we don't understand
If the button is configured as anything other than left-handed, select
right-handed layout. We only support left/right-handed assignment in piper, so
don't fall through the cracks where the mouse has been preconfigured as
something else
2017-08-22 14:04:59 +02:00
Jente Hidskes
be4cc86773 RatbagdButton: update to reflect libratbag
See https://github.com/libratbag/libratbag/pull/290.
Fixes #140.
2017-08-22 10:23:40 +10:00
Jente Hidskes
ed6dbe15c8 ButtonDialog: do not list "Unknown" in the special mappings
Fixes #147.
2017-08-22 07:05:32 +10:00