Commit Graph

12 Commits (a8d864144299c95d4ba760a7d1b2bdab37edb298)

Author SHA1 Message Date
Peter Hutterer 10c34bc655 gui: simplify the Config's singleton pattern
Use __new__ instead of instance(), this way we can just use the same config
object as Config().do_something.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>k
2019-08-20 12:19:52 +10:00
Peter Hutterer 64fcf04e32 svg: use our Json SVG converter from kete
A few minor changes like passing in a filename and fixing the different
spellings of the orientations.

In order to use it from kete though we have to mess with the PYTHONPATH. But
since it's a in-tree tool only anyway... meh.

This loses the ability to disable pressure on tablets. I think that's just a
leftover from before we knew how to handle pressure in SVG exports. We should
just fix that properly instead of having a config option here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-20 12:02:30 +10:00
Peter Hutterer ac811920b8 tuhi: move the gui/svg.py file to tuhi
One JSON to SVG converter per project is enough.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-20 12:02:30 +10:00
Peter Hutterer f5bafb7f73 gui: use mm in the svg 2019-08-20 12:02:30 +10:00
Peter Hutterer 92fcfd12cc wacom: update the dimensions with the point size
Make sure our dimensions are in actual µm.

Note that this will mess with any cached JSON files since they are now on a
different scale.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-20 12:02:30 +10:00
Peter Hutterer 9ef4002b39 Move the default config setting to the entry points
Have this in the effective main() methods (or close to that anyway) instead of
hidden away in the config implementations.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-19 15:43:01 +02:00
Peter Hutterer 8d67bbf5c4 gui: drop an unused config path
This is the copy of tuhi-kete, no need to keep the config path around here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-19 14:30:26 +10:00
Peter Hutterer 101e2f380e gui: store the cached SVGs in $XDG_CACHE_DIR instead
This is transient data, they're constantly regenerated. Let's store them as
such.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-19 14:26:27 +10:00
Peter Hutterer be6d57562a Switch to pathlib everywhere
gresources and svgwrite don't (yet?) take a Path though, so we have to use
os.fspath() to convert those.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-19 14:11:36 +10:00
Peter Hutterer c8759eb400 gui: unify the loggers across the GUI
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-19 14:11:25 +10:00
Peter Hutterer 6dc67f13c8 svg: call the super constructor
Presumably gobject sets a few things up, so let's call it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-15 15:22:53 +10:00
Peter Hutterer e6057e256d Merge tuhigui into tuhi.gui
Let's make this a submodule of tuhi so we can share some code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-14 08:18:39 +10:00