Commit Graph

618 Commits (a0566e0dc0d864a05efe69146f61dd99270e4cbd)

Author SHA1 Message Date
Niclas Hoyer a0566e0dc0 Workaround for Spark register problems
This is a workaround for registering problems with Spark.
The registration hangs at "Connecting to device...".

Internally the `GENERAL_ERROR` occurs, which is expected
when registering a Spark device, but this should also
raise an AuthorizeException, but it instead reaches the
handler as DeviceError.

It is currently unclear why the `GENERAL_ERROR` passes to
this handler, so this catches any `GENERAL_ERROR` while
registering a Spark device.
2020-01-07 11:00:11 +10:00
Peter Hutterer 820f168f43 meson.build: drop python-devel dependency
This isn't needed. We need python but if we can run meson we can rely on
python being available anyway. And we don't actually use the python header
files here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 10:35:15 +10:00
Peter Hutterer 110c77745c flatpak: allow access to $HOME
The whole purpose of Tuhi is to save the files after downloading and the
flatpak sandbox quietly dropped any file we saved in the target directory.

We could use xdg-download or something as allowed directory but let's open up
home itself since we don't want to limit where the files can be saved.

Fixes #230

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-03 10:34:50 +10:00
Niclas Hoyer 67eb54c908 Add company ID for Augmented Paper 2020-01-03 10:34:25 +10:00
Peter Hutterer 170b2c0d8a meson.build: add a custom message for the python3 dependency.
It's confusing to users because they don't get any indication that it's the
development package we need, not the normal python package.

This requires bumping meson's minimum version to 0.50 but hey, we can live
with that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-11-04 09:43:08 +01:00
Piotr Drąg a11d51c42c Update Polish translation 2019-10-24 16:54:46 +02:00
Peter Hutterer f6fdf86649 meson.build: drop yaml from the required python module list
This isn't required for the flatpak, the yaml module is only needed in some of
the debugging/recovery tools but not in Tuhi itself.
2019-09-30 11:36:52 +02:00
Peter Hutterer d5cb1930e5 export: drop unused import
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-30 18:05:39 +10:00
Ishak BELAHMAR ddd896b1f6 tools: Add choices to fetch.format argument 2019-09-30 09:50:03 +02:00
Ishak BELAHMAR ea1dc798b1 Remove unused svg module 2019-09-30 09:50:03 +02:00
Ishak BELAHMAR bbff179a4d Add png export feature 2019-09-30 09:50:03 +02:00
Piotr Drąg 538480f022 Add Polish translation 2019-09-16 08:32:02 +10:00
Peter Hutterer d4dcccf36d tuhi 0.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-12 11:20:42 +10:00
Peter Hutterer a6a33ce6b4 live: add flatpak compatibility mode argument
Duplicated from tuhi.in because it's easier this way.

Fixes #217

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-12 11:18:56 +10:00
Peter Hutterer 2cc9fc778f live: pass our arguments through to the tuhi server
Any args that we don't handle in live mode directly (none right now) should be
passed through to the tuhi server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-12 11:18:56 +10:00
Peter Hutterer cb72111910 gui: make the app menu translatable
Fixes #216

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-10 15:28:20 +10:00
Piotr Drąg f01651bf5e po: update POTFILES 2019-09-09 09:12:26 +10:00
Peter Hutterer b1b0be84ea tuhi: add a flatpak compatibility mode
This only modifies the XDG directories to point to the ones flatpak uses.
Makes it easier to switch back and forth.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:43 +10:00
Peter Hutterer 13830e02c5 Add the python 3.6 check to all entry points
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:43 +10:00
Peter Hutterer 0e12369866 wacom: set the x/y min/max to the correct device units
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer 74ffe763b6 ble: downgrade three more debug messages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer 1c893d14e8 wacom: make a debug message more informative
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer fde36b1271 tools: tuhi-live's tuhi server needs to ignore SIGINT
Handling SIGINT in the freshly-started server leads to a race condition:
on Ctrl+C, Tuhi is killed before tuhi-live can call StopLive, leaving the
device in live mode. On the next start of tuhi-live nothing works because the
device will complain about invalid state.

Simplest solution here is to ignore SIGINT in the Tuhi instance and instead
rely on python's multiprocessing module to take us down when the main process
exits.

Fixes #206

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer 960904d481 wacom: don't fetch the dimensions if we're stopping live mode
There's just no point to that and if the tablet is currently in live mode, it
refuses the GET_WIDTH request anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer 9eedbe108a tools: remove write-only variable from tuhi-live
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer b40dee5900 tools: stop live before starting it
If for some reason the device is still in live mode from an earlier
invocation, stop live mode first before we attempt to start a new one.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer 43c844ea1e dbusclient: make the live property mirror the dbus one
We have a dbus property for this so let's just use that as a backend for our
live property instead of emulating our own on top of it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer 2d95848cee tools: make tuhi-live --verbose actually work
The argparser in tuhi.base.main() drops argv[0], so we have to add a fake
argument here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-09-03 16:22:18 +10:00
Peter Hutterer bffe41fbb6 protocol: handle 0xb3 automatically
0xb3 is the generic error code (or success, where applicable). Let's handle
those by default so that the rest of the messages only have to care about
replies with message-specific opcodes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 12:38:21 +10:00
Peter Hutterer 1dc1acaba3 gui: move most of the tuhi-gui startup script to application.py
Add a new main() there so we have a single entry point for the gui instead of
a complex script that needs to be called. That start up script should really
just be the minimum bits possible.

It's still not perfect because we won't work without the gresources and they
require that the pkgdatadir is set. But at least it moves all the logic out of
the startup script.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 10:42:44 +10:00
Peter Hutterer bb9f9b6c26 gui: reshuffle the includes until gi and flake8 are happy
We have implied inclusion orders here, specifically with gi. This works as
long as the files are included in the right order from other files but its not
generic enough - we really do need the gi.require_version() bit
everywhere to avoid issues.

Of course, once we do this flake8 complains about everything so let's
reshuffle things in an order it's happy with. This seems to be local modules
first, then ... whatever except when not?

application.py is excluded from this patch because it's about to get changed
in the next one and I'm too lazy to separate those out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 10:42:44 +10:00
Peter Hutterer e37016dc7b Fix deprecated use of @GObject.property → @GObject.Property
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 10:42:44 +10:00
Peter Hutterer 97a4ab04d0 ble: downgrade a message from info to debug
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 10:42:10 +10:00
Peter Hutterer 90ac2c7150 tools: call directly into Tuhi's main from tuhi-live
This sets up the config dir, loggers, etc. for us. Fixes regressions
introduced a while ago when Tuhi.run() was removed and then more obvious
breakage now that we require the Config path to be set up.

Fixes #206

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-29 10:42:10 +10:00
Peter Hutterer 658fe44d76 tools: remove noop statement from tuhi-live
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer 08afa02690 tools: use the dbus client bindings from tuhi-live too
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer cd84de4f32 tools: use the shared dbus client bindings for kete
Since most of the signals are propagated by the bindings we largely just need
to hook up simple methods to log what is happening.

One nasty hack: we import some of the bits into the kete namespace so
tuhi-live continues to work. This can be fixed up in a follow-up commit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer 07cefa3c26 dbusclient: add the start/stop live from kete to the bindings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer 695b7c43be dbusclient: drop the duplicate device argument
The first argument in any signal is the object that emits it, so we don't have
to add it again.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer 71ca2ca569 gui: fix two signal disconnections
Both of the signals here are connect to the device, not Tuhi. The only reason
this worked was because the signal sent by the dbus bindings had the device
twice in the arguments and 'tuhi' was actually the device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer 2d142b4be3 dbusclient: drop the word Kete from the generic dbus client bindings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer 28f92882ec dbusclient: fix a few super() calls
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer f477e86a96 gui: move the dbus client handler bits to the tuhi module
This is used by the GUI and by kete and it's just an abstraction of the
handling anyway with little actual logic. Let's make this sharable.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:17:38 +02:00
Peter Hutterer ed29c0daae gui: stop listening on an authorization error
This conflicts with trying to register the device on authentication errors and
making re-registration unreliable. Tuhi would keep connecting to the device
while holding the button down, so we'd get another failed connection and a
disconnect from the device. The Register signal would come in and get lost
somehow.

Fixes #195

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 14:55:12 +02:00
Peter Hutterer 488512231c gui: reset the signal list after disconnecting them
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 14:55:12 +02:00
Peter Hutterer c0628f1f19 meson.build: check for missing python modules
Check those modules that aren't part of the python installation and bail out
of meson where they're missing. This is technically wrong because we don't
need them at build-time and only at run-time but pragmatically sensible
because we waste too much time dealing with those bugs.

Fixes #200

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 17:36:16 +10:00
Peter Hutterer 9c399c8eac flatpak: fix the pyxdg path
So we don't need to be redirected every time.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 17:35:52 +10:00
Peter Hutterer 505f1c786f flatpak: use specific versions of svgwrite and pyxdg
flathub requires us to use specific versions, so let's do that here too so
we're consistent in testing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 17:35:52 +10:00
Peter Hutterer cab716938f flatpak: indentation fix 2019-08-28 17:35:52 +10:00
Peter Hutterer 6c0ddd96bc protocol: add missing space for NordicData's str()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-28 15:33:28 +10:00