Commit Graph

642 Commits (16b0f9d2d57f65cfe3b434eb8f183c052522e074)

Author SHA1 Message Date
Peter Hutterer 16b0f9d2d5 meson.build: fall back to flake8 where flake8-3 does not exist
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-25 14:02:12 +10:00
Peter Hutterer 8ab43bf0b7 meson.build: explicitly check for gettext to be present
There's a meson issue where loading i18n produces a warning about missing
gettext but then proceeds to fail with confusing error messages where the i18n
module is used, see https://github.com/mesonbuild/meson/issues/6165

Work around this by explicitly checking for gettext after loading i18n.

Fixes #270

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-25 13:08:18 +10:00
Peter Hutterer 643099b858 Fix flake8 errors - ambiguous variable name 'l'
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-22 17:09:27 +10:00
Peter Hutterer b54ac6e99e Fix flake8 errors - module import not at top of the file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-22 17:09:27 +10:00
Peter Hutterer 27164aba52 Fix flake8 errors - f-string without placeholders
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-01-22 17:09:27 +10:00
albanobattistella 9d36e3bad0
Add Italian translation (#263) 2020-09-09 07:14:06 +10:00
Peter Hutterer 4facceebc4 data: don't make the internal page0, page1 etc names translatable
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-04 09:43:15 +10:00
Peter Hutterer 4ce8d011d1 tuhi 0.5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-02 10:24:42 +10:00
Peter Hutterer 9b4c0ca5ef Update the copyright year in the about dialog
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-02 10:24:42 +10:00
Peter Hutterer 02252b68b9 Update flatpak dependencies to latest versions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-02 10:12:08 +10:00
Peter Hutterer eef877d6ce tuhi: use a Gtk.FileChooserNative dialog
This one hooks into the correct portal APIs, hopefully fixing the issue with
the Flatpak version not saving files correctly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-26 11:03:26 +10:00
Peter Hutterer ea5177027c Update flatpak GNOME version to 3.36
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-26 11:03:26 +10:00
Peter Hutterer ba0424c6df gui: fix a flake8 complaint
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-26 11:03:26 +10:00
Peter Hutterer 59dfce5b8d gui: add an expanding label to the end, but don't expand flowboxes
pack_end, introduced in 29761204a9 means they
align to the bottom of the window. Where there aren't enough drawings to fill
the window, everything is bottom aligned. Hack around this by adding an empty
label to the bottom that expands to the maximum available size and stop
expanding the rest. This new label thus pushes everything up to the top
position.

Fixes 29761204a9

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-26 10:33:07 +10:00
Peter Hutterer 29761204a9 gui: pack the flowboxes with pack_end
The first drawings we load are from disk. If we sync a drawing from the device
with a different key (i.e. created in a different month), the new flowbox for
that drawing was appended to the list and in last place. This caused
out-of-order sorting (though a restart of Tuhi would fix it).

So simply change the behavior to sort by oldest timestamp first and pack_end()
for all of them. If we pack all our flowboxes with pack_end, they are
effectively in reverse order, i.e. last one added is first in the list.

Fixes #244

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-08-26 09:34:08 +10:00
Peter Hutterer 927fc0216b tuhi 0.4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-21 16:54:52 +10:00
Taihsiang Ho (tai271828) 3c1a84e1ab protocol: rm unused class WacomPacket 2020-04-21 15:23:44 +10:00
Robert Schütz 72d9dee37a live: keep $PATH and $DISPLAY 2020-04-06 15:38:17 +02:00
Peter Hutterer 7a881de9bb test: switch the stroke tests to use pytest
We're already running the meson test through pytest anyway and pytest is more
powerful than unittest. So let's switch, it's just a search/replace away.

Plus, this way the approach to dynamically create the tests based on the test
logs in the user's home directory is a lot saner.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-08 10:39:45 +01:00
Peter Hutterer fcdacb7187 test: switch the message tests from unittest to pytest
We're already running the meson test through pytest anyway and pytest is more
powerfull than unittest. So let's switch, it's just a search/replace away.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-08 10:39:45 +01:00
Peter Hutterer acc459f003 meson.build: check for 3.30 as minimum pygobject version
Fixes #238

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-08 10:12:24 +10:00
Peter Hutterer 53e2cebaf8 protocol: fix a flake8 issue
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-08 10:08:36 +10:00
Peter Hutterer 785c1e5f58 test: append the required \0xa to the spark messages
f5ea08f171 added this effective requirement for
the Spark and older generations, so let's make sure the test passes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-01-08 10:08:36 +10:00
Niclas Hoyer f5ea08f171 Add support for long device names
If the device name is longer than one reply, the registration will crash.
This adds support for a variable number of replies until the reply ends
with `0x0a`.
2020-01-07 11:05:13 +10:00
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