Peter Hutterer
b8a97fd367
meson.build: fix the ratbagd runtime check
...
find_program(required: true) exits with the meson error message if the
program is not found so we never get to our pretty error message.
Fix this and make the message an actual error too.
Also indent the else condition correctly while we're here.
2023-07-12 09:53:14 +10:00
Domefemia
c7e1ad8fab
Removed unneeded stuff
2023-04-23 18:25:40 +03:00
Domefemia
e4b3f59ebb
Replaced multiple comparison with in function
2023-04-23 18:25:40 +03:00
Domefemia
da0056500d
Converted strings to f string
2023-04-23 18:25:40 +03:00
Heimen Stoffels
b9527c85c1
po: update the Dutch translation
2023-04-14 13:44:39 +03:00
Yaroslav Chvanov
264dc10bc1
po: add the "advanced" page to translatable files
2023-04-13 13:04:05 +03:00
Heimen Stoffels
9713c86f7e
po: update the Dutch translation
2023-04-13 12:43:44 +03:00
Yaroslav Chvanov
a7ae0c6e32
piper: fix an optional access warning
2023-03-20 22:01:51 +03:00
Yaroslav Chvanov
21943b9064
piper: add more missing and fix wrong type hints
2023-03-20 22:01:30 +03:00
Yaroslav Chvanov
e5aae89fc7
mouseperspective: enable the "commit" button if any profile is dirty
...
..not only the active one.
This fixes the "commit" button not getting active when another profile
is disabled outside of Piper (e.g. ratbagctl).
2023-03-18 21:28:14 +03:00
Yaroslav Chvanov
b7ba399c94
mouseperspective: enable add profile if at least one is disabled
2023-03-09 18:01:29 +03:00
Yaroslav Chvanov
3a30459d76
profilerow: don't allow "deleting" the active profile
...
I think libratbag doesn't return any kind of error in such case, this is
something to work on.
2023-03-09 18:01:03 +03:00
Yaroslav Chvanov
fc27089d3c
mouseperspective: don't ever hide the add profile button in the list
...
Following my design choice to disable all unavailable actions instead of
hiding them.
Another way to go here would be to move the deleted snippet to
_on_profile_notify_disabled(), so that the button is not hidden after
removing a profile from a full profile list.
2023-03-09 18:00:31 +03:00
Yaroslav Chvanov
ac6e557529
piper: listen to notify::disabled on profiles
...
It was actually already listening to notify::enabled, so this is a very
simple change.
2023-03-09 18:00:31 +03:00
Yaroslav Chvanov
c69a8a4ea9
ratbagd.py: listen and notify about RatabgdProfile.Disabled changes
2023-03-09 17:37:02 +03:00
Yaroslav Chvanov
05cd7a7031
buttonspage: support BTN_* events in key-type button actions
...
Technically it can contain moues button events as it's just event codes
under the hood.
2023-03-09 17:12:50 +03:00
Yaroslav Chvanov
e0318b6bfc
ratbagd.py: sync with libratbag
...
Fixes crash on `BTN_*` event codes in macros.
2023-03-09 17:09:36 +03:00
Yaroslav Chvanov
8570535f15
ratbagd.py: notify about external updates to LED properties
...
Piper was already listening for the `notify::mode` signal, so it now
shows update LED type.
2023-03-06 22:58:01 +03:00
Yaroslav Chvanov
985064bf7b
advancedpage: listen for external angle snapping value changes
2023-03-06 22:58:01 +03:00
Yaroslav Chvanov
41a2d1405c
ratbagd.py: notify about external angle snapping value changes
2023-03-06 22:58:01 +03:00
Yaroslav Chvanov
d8c0442feb
advancedpage: listen for external debounce time updates
2023-03-06 22:58:01 +03:00
Yaroslav Chvanov
797afcc050
ratbagd.py: notify about debounce time changes in the profile
2023-03-06 22:58:01 +03:00
Yaroslav Chvanov
a959d00fb3
ratbagd.py: use try-except when checking changed props on D-Bus
...
I'd argue this is a bit more Pythonic to do for dicts on top of being
slightly more performant.
Still, I must say all of this repeated handling is kind of ugly.
2023-03-06 22:58:00 +03:00
Yaroslav Chvanov
c96799da74
mouseperspective: show the advanced page if report rates are supported
...
Should've been a part of cdd1be7095 .
2023-03-06 22:58:00 +03:00
Yaroslav Chvanov
d24c7b7b30
advancedpage: listen for external report rate updates
2023-03-06 22:58:00 +03:00
Yaroslav Chvanov
21ccf86af1
ratbagd.py: notify on report rate changes
2023-03-06 22:58:00 +03:00
Yaroslav Chvanov
dfb371ce08
ratbagd.py: update the report rate of the profile
...
Another regression by me.
2023-03-06 22:58:00 +03:00
Yaroslav Chvanov
5cc09a0dfe
resolutionrow: listen for external resolution changes
...
This adds some duplicated code.
TODO: refactor this file.
2023-03-06 22:58:00 +03:00
Yaroslav Chvanov
6e464692a4
ratbagd.py: notify on external resolution changes
2023-03-06 22:36:09 +03:00
Yaroslav Chvanov
2875e85e28
ratbagd.py: add a helper for getting non-null values from D-Bus
...
This should probably return a custom exception instead of an ValueError
but it's okay for now.
2023-03-06 22:36:09 +03:00
Yaroslav Chvanov
3f03024259
mouseperspective: update profile list when a profile is set to active
...
This fixes profile list becoming wrong when you change active profile
with ratbagctl.
2023-03-06 22:36:09 +03:00
Yaroslav Chvanov
3b99861834
ratbagd.py: remove LED types
...
They were long deprecated and removed in libratbag.
2023-03-06 22:36:09 +03:00
Yaroslav Chvanov
590f80fbc9
piper: make util an explicit namespace
2023-03-06 22:36:09 +03:00
Yaroslav Chvanov
12109d6f61
ratbagd.py: connect to notify::dirty of child objects in the profile
...
This fixes regression of commit button not becoming active introduced by
me in d390f22210 .
2023-03-05 14:31:45 +03:00
Yaroslav Chvanov
69d3ee1303
mouseperspective: fix wrong profile potentially being shown as dirty
2023-03-05 13:50:30 +03:00
Yaroslav Chvanov
d390f22210
ratbagd.py: sync with Piper
...
Make RatbagdProfile more reliable and fix incorrect value on start.
2023-03-05 13:48:47 +03:00
Yaroslav Chvanov
9d7f239294
devicerow: show device firmware version near it's name
2023-03-04 17:58:42 +03:00
Yaroslav Chvanov
ba18f7878e
ui: fix a position property
2023-03-04 17:48:58 +03:00
Yaroslav Chvanov
cdd1be7095
Move report rate changing from ResolutionsPage to AdvancedPage
...
Not a setting people change often and it's also just weird to have it
together with resolutions.
2023-03-04 17:48:34 +03:00
Yaroslav Chvanov
5cead82b12
buttonsdialog: implement button disabling
...
Probably not the best way design-wise, but it works and we can always
iterate upon this.
2023-03-04 17:23:47 +03:00
Yaroslav Chvanov
6cf9db3c88
ratbagd.py: make profile dirty if angle snapping or debounce time change
2023-03-04 17:16:08 +03:00
Yaroslav Chvanov
96d3e40789
piper: fix optional access warnings
2023-03-04 17:16:08 +03:00
Yaroslav Chvanov
6f4f127a3f
build: bump minimal ratbagd version for runtime dependency checks
...
Although it won't actually work with v0.17, we will have to update it
again before doing a new release. This is just a reminder for myself.
2023-03-04 17:16:07 +03:00
Yaroslav Chvanov
e4003d2504
piper: add type hints where possible
2023-03-04 17:16:07 +03:00
Yaroslav Chvanov
a88ebf8f8f
resolutionspage: take profile in the constructor
2023-03-04 17:16:07 +03:00
Yaroslav Chvanov
e0767d7d73
ledspage: take profile in the constructor
2023-03-04 17:16:07 +03:00
Yaroslav Chvanov
9142d626d4
buttonspage: take profile in the constructor
2023-03-04 17:16:03 +03:00
Yaroslav Chvanov
c1a15e273e
advancedpage: take profile in the constructor
2023-03-04 17:15:57 +03:00
Yaroslav Chvanov
f04f1f2cd3
mouseperspective: recreate the stack on profile change
2023-03-04 17:15:57 +03:00
Yaroslav Chvanov
aa0716a323
Ensure signal handlers get disconnected when GObject is removed
...
If you jump around several devices and switch profiles a bunch of times,
Piper may crash. This is caused by the fact PyGObject doesn't disconnect
handlers produced within an object from another object, when the first
object is destroyed.
https://gitlab.gnome.org/GNOME/pygobject/-/issues/557
2023-03-04 17:15:57 +03:00