Commit Graph

11 Commits (master)

Author SHA1 Message Date
Peter Hutterer 8eea6468b7 wacom: add a session id field to make it easier to find log files
The session id is a UUID, postfixed by an incrementing number. The UUID stays
the same for Tuhi's livetime, the number increments with every bluetooth
connect/disconnect. Result is e.g. 4e55c30035d043ce9f6f4914fb223820-2.

This session id is printed to the log file, added to the YAML raw logs and to
the JSON file, making it easier which log part resulted in which drawing, etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-23 10:46:14 +02:00
Peter Hutterer 0ddc33a37b drawing: fix deprecation warning
tuhi/drawing.py:46: PyGIDeprecationWarning: GObject.property is deprecated;
use GObject.Property instead
  @GObject.property

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-07 15:35:59 +10:00
Benjamin Tissoires 6d74615085 tuhi: prettify the exported json
having the whole file in a single line is fine for programs, much
less for humans
2019-04-29 09:36:11 +02:00
Peter Hutterer 23e18cea67 drawing: add a stroke.seal() functionality
Makes end-of-stroke handling easier, we can call seal() on the current stroke
and it'll make drawing.current_stroke() None, which is something we can deal
with.
2018-02-16 15:43:28 +10:00
Peter Hutterer 09bfe44dd7 drawing: rename the stroke from 'l' to 's'
Leftover copy/paste error from when this class had a Layer subclass
2018-02-16 15:43:28 +10:00
Peter Hutterer 7796d3c110 wacom: don't add points to the log until we have an absolute value
On the Intuos Pro at least we sometimes get events that are all relative at
first and it can take several events for us to have all three values as
absolute. This is likely a parsing error on our side, but meanwhile don't
write the data until we have at least one known value for all three axes.

And because the SVG writer isn't happy with empty strokes, add a seal()
function to the drawing to purge empty strokes.

Fixed #92 or at least works around it
2018-02-14 14:54:17 +10:00
Benjamin Tissoires fc219e4c57 janitor: silence deprecated warnings
While running the app in flatpak, there are a few deprecation warnings
coming in:
PyGIDeprecationWarning: GObject.SIGNAL_RUN_FIRST is deprecated;
	use GObject.SignalFlags.RUN_FIRST instead
PyGIDeprecationWarning: GObject.property is deprecated;
	use GObject.Property instead
PyGIDeprecationWarning: GObject.MainLoop is deprecated;
	use GLib.MainLoop instead
2018-02-02 10:46:47 +10:00
Peter Hutterer 9cecc1b535 Replace @property with @GObject.property
Let's stick to just one for consistency
2018-02-01 10:13:22 +10:00
Benjamin Tissoires 9f118bbe15 janitor: convert double quotes into single quotes
Let's the developers of tuhi to consume more energy in their monitor
to light up more pixel when displaying single quotes whereas double
quotes.

It also makes the whole bit more uniform.

Fixes #32
2018-01-29 21:18:06 +10:00
Peter Hutterer 3bc88bbbb6 config: store/load device drawing in the device's directory 2018-01-25 14:55:10 +10:00
Peter Hutterer 80d214c78f Split the Drawing class out into a separate module
No point having multiple implementations of what a drawing is. Let's have it
in one module.
2018-01-25 14:55:10 +10:00