Commit Graph

78 Commits

Author SHA1 Message Date
Peter Hutterer 16c22a95ec base: add a flag to control the config directory
For testing it's a lot easier to just provide a /tmp/ directory than having to
clear out the normal one that may contain useful drawings for debugging.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-13 19:12:53 +10:00
Peter Hutterer 28fbddce78 gui: remove two more TuhiGUI leftovers from the About dialog
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer 0c333aa64b gui: fix flake8 warnings
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer 0840f353d5 gui: render the drawings as oblongs in the right ratio
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer ee68ec4bcc gui: drop the Credits page from the About dialog
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer 35ab7ad621 gui: reverse-sort the drawings by timestamp before adding them
We want the most-recent drawings up the top. And since we always add to the
flowbox, we need to reverse-sort everything.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer 89559364cf gui: fix categorization of drawings
Using the year/month as key only works if both are expanded properly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer 37d22dfaad gui: drop the relative_time() helper, no longer used
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-08 14:44:18 +10:00
Peter Hutterer 4e886fca2b gui: only show the toolbox on enter
This is using opacity of 0% to hide them - this way the space stays allocated
and showing it doesn't rearrange things. Using visiblity here causes
everything to shift around on reveal.
2019-07-19 18:09:13 +10:00
Peter Hutterer d06b92e9af gui: hook up a zoom slider
The default size of the drawings is a bit small now, good for an overview but
not for identifying which drawing to use now. Add a zoom slider for that.
2019-07-19 16:41:17 +10:00
Peter Hutterer 097f66f33c gui: add a GTK separator under the month/year label 2019-07-19 14:37:51 +10:00
Peter Hutterer 357f25deb4 gui: pack the toolbox at the start so it doesn't expand
If one drawing in the line gets rotated, the buttons all scaled to filll the
space - which is ugly.
2019-07-19 14:37:51 +10:00
Peter Hutterer 6b623132e5 gui: handle the now-normalized pressure range
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-19 14:37:51 +10:00
Peter Hutterer 8a76d4eae3 gui: some more styling of the drawings 2019-07-19 14:37:51 +10:00
Peter Hutterer e38c6a0d55 gui: drop the timestamp label for each drawing
Now that we group by month anyway, this isn't that useful anymore
2019-07-19 14:37:51 +10:00
Peter Hutterer c00580655e gui: use a GdkPixbuf to scale into the desired size 2019-07-19 14:37:51 +10:00
Peter Hutterer 66130b9b8b gui: give the toolbox a name 2019-07-19 14:37:51 +10:00
Peter Hutterer 68e533ec5f gui: maximize the window on startup
We need screen estate to show the drawings, let's make use of it
2019-07-19 14:37:51 +10:00
Peter Hutterer 5dddefe9d4 gui: make the drawings slightly off-white
Some randome color off the google colour picker that's supposed to look more
like a real paper color. This also means we set the general background white
now to give it a better contrast.
2019-07-19 14:37:51 +10:00
Peter Hutterer b7bf68326f gui: group the list of drawings up by month 2019-07-19 10:59:20 +10:00
Peter Hutterer 2547f6b26d gui: space out the drawings a bit 2019-07-19 10:38:40 +10:00
Peter Hutterer c29da10918 gui: fix a grammar mistake 2019-07-18 20:26:28 +10:00
Peter Hutterer bad0bc87ab Add a 'missing tablet' icon to be displayed instead of the spinner
On startup and before we connected to a tablet, let's display a missing tablet
icon. Taken from the tablet icon, combined with the X from one of the network
icons in the Adwaita theme.

Once we get a sync notification, we just hide that one and done.
2019-07-18 19:43:16 +10:00
Peter Hutterer 3e246b0aa1 gui: add a separator between the close button and the other buttons
To avoid accidentally clicking the close button when trying to save
2019-07-18 18:33:40 +10:00
Peter Hutterer 78fc886375 gui: fix the global orientation changes
This broke at some point, let's fix it again by moving to the drawing and
calling refresh() from there - no need for the DrawingPerspective to call into
the drawing here.
2019-07-18 18:32:11 +10:00
Peter Hutterer b7079e2343 gui: restyle the drawing entries 2019-07-18 18:26:31 +10:00
Peter Hutterer 1224711328 gui: move the battery and sync spinner to the titlebar
We have the real estate there anyway, might as well make use of it
2019-07-18 17:30:41 +10:00
Peter Hutterer 900d0302cd gui: remove duplicate active stack assignment 2019-07-18 17:21:45 +10:00
Peter Hutterer 06b28274a7 Remove tuhigui's gitignore file, it's covered by the top-level one anyway 2019-07-18 13:41:48 +10:00
Peter Hutterer 23281976da tuhigui: share the config path with tuhi
The tuhigui.ini settings file where we store the orientation of the device is
now the same config directory tuhi dumps its data in.

The svgs are in an svg subdirectory, just to make them easier to find.
2019-07-18 13:04:25 +10:00
Peter Hutterer 0791dba90a tuhigui: namespace the loggers 2019-07-18 12:19:29 +10:00
Peter Hutterer 16cd17b2d1 Drop TuhiGui, make it into Tuhi
Drop the user-visible separation, make everything just Tuhi. Directory
structure remains largely separate (tuhi vs tuhigui) except for the po files
which are in the top-level directory because convention.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-18 12:19:29 +10:00
Peter Hutterer bc7c55f281 Merge the two directories closer together
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-17 21:03:15 +10:00
Peter Hutterer a1dc262772 Drop separate COPYING from tuhigui 2019-07-17 20:56:45 +10:00
Peter Hutterer 1f0709eea0 Merge tuhigui into gui
This is a plain subtree merge without any changes to the tuhigui tree itself.

As we'll keep the distinction between the DBus server and the GTK UI, the
directory layout will reflect that.
2019-07-17 20:48:36 +10:00
Peter Hutterer 71614aa47f Swap "never" for "not yet", it's more accurate 2019-07-17 20:16:55 +10:00
Peter Hutterer efabaf3aaa Move the setup dialog to the main window
No need for a separate file just for those few lines of code
2019-07-17 19:40:13 +10:00
Peter Hutterer 037d05babf Move the error perspective to the main window
No need to have a separate file for a few lines of code
2019-07-17 19:39:26 +10:00
Peter Hutterer 7677ce60eb Add all the hooks required for translation 2019-07-16 21:54:50 +10:00
Peter Hutterer d8fa2ba00a Add another rotation button
Because it's effectively free anyway
2019-07-16 21:29:03 +10:00
Peter Hutterer ec09d0c73c Drop the 'completed' image
A user may want to download the drawing multiple times. And besides, after
switching back to the default icon theme, I couldn't find a decent icon
anyway.
2019-07-16 21:24:01 +10:00
Peter Hutterer ec33e3f0af Add a rotation button to the drawings 2019-07-16 21:17:09 +10:00
Peter Hutterer 3e23e8bc31 svg: pass the orientation into the constructor
Don't let the SVG generation parse the config file, not necessary here.
2019-07-16 21:15:11 +10:00
Peter Hutterer 1743a93873 Rename Config.load() to Config.instance() for better clarity 2019-07-16 21:13:30 +10:00
Peter Hutterer 09a66642ae Move SVG generation to the Drawing
This means we can just call refresh() from the parent after the orientation
has changed.
2019-07-16 21:06:32 +10:00
Peter Hutterer 9903bd851d Handle the iteration through the flowbox children better 2019-07-16 20:54:01 +10:00
Peter Hutterer 7be996e43a Streamline the setup dialog
Just the minimal bits that are needed.
2019-07-16 15:33:49 +10:00
Peter Hutterer 951bc85139 Display the missing battery icon until we get data from Tuhi 2019-07-16 15:33:40 +10:00
Peter Hutterer e999beafd7 If we haven't synced in 10 years, it's "never"
This is the value that's displayed on startup now
2019-07-16 15:33:34 +10:00
Peter Hutterer a857b14b8a Implement 'deleting' drawings
Enable the delete button that's been hidden away so far. When clicked, we
suffix the cached json file with '.deleted'. This also causes a popup with an
undo button to appear (taken from Nautilus). When clicked, that button will
restore the drawing again.

This is really all just renaming anyway, because nothing ever gets deleted
here.

An extra filter is needed to skip Tuhi drawings that have been deleted in the
GUI - we don't want to add the drawings we just deleted again just because
Tuhi still keeps them in cache.
2019-07-16 15:33:02 +10:00