Commit graph

456 commits

Author SHA1 Message Date
Carlos Garnacho
472d87844e wacom: Add CcDrawingArea
This is a testing drawing widget that can be used to the a feeling
of changes to stylus settings.
2016-11-04 23:26:41 +01:00
Piotr Drąg
bd0d048944 wacom: use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772199
2016-10-03 15:21:28 +02:00
Georges Basile Stavracas Neto
2777fd583d panels: use the new categories
Following the previous patch, this patch adds the new alternative
categories to the panels' Desktop files. These alternative categories
are only relevant for the alternative Shell, and do not break the
current Shell in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=767301
2016-06-14 12:16:43 -03:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Bastien Nocera
97c2a880c8 wacom: Update from gnome-settings-daemon 2016-03-24 17:01:37 +01:00
Bastien Nocera
d6765b0378 wacom: Use the fully qualified D-Bus name for the OSD
So that we don't end up seeing the fallback button mapping dialogue when
running gsd-test-wacom.
2016-03-10 17:19:30 +01:00
Debarshi Ray
84b65ddea0 wacom: Use the right API for setting the window width
We should be pairing gtk_window_get_size with
gtk_window_set_default_size to avoid inconsistencies between the size
reading and setting code. eg., in recent GTK+ versions,
gtk_window_get_size and gtk_widget_set_size_request differ in their
interpretation of the CSD chrome.

However, gtk_window_set_default_size didn't work with non-resizable
GtkWindows, until now.

https://bugzilla.gnome.org/show_bug.cgi?id=762548
2016-03-09 13:47:09 +01:00
Carlos Garnacho
ff2cfece51 wacom: Avoid deprecated Clutter API 2016-01-22 21:57:49 +01:00
Carlos Garnacho
c0e854a6dd wacom: Workaround deadlocks in Clutter event handlers
The way we destroy the window during the handling of a clutter event may
cause the window to generate a focus event that gets processed immediately,
causing Clutter to deadlock on its global lock.

Bypass these issues in the places where we finalize out of Clutter events,
The Esc key presses are now handled at the GTK+ level, and we postpone
finalization (with either success or failure) to an idle.

Works around https://bugzilla.gnome.org/show_bug.cgi?id=747880
2016-01-22 21:51:46 +01:00
Carlos Garnacho
65bd735937 wacom: Refactor calibrator finalization into separate function
Instead of calling the delete event handler everywhere.
2016-01-22 21:50:38 +01:00
Rui Matos
888e40eae8 wacom: Avoid crashing when opening the panel on wayland sessions
We don't yet support wacom devices under wayland and GsdWacomDevice
uses X APIs unconditionally which makes us crash under wayland.

Instead, let's return early and leave the GsdWacomDevice in an invalid
state which means that we just present the default UI for "no wacom
devices detected".
2016-01-18 14:53:28 +01:00
Jason Gerecke
ae11d34c60 wacom: Fix window decorations being visible in calibrator window
The 'on_fullscreen' function which handles the 'window-state-event'
signal should be returning a gboolean value. Fix the function
signature and have it return FALSE to allow the event to continue to
propagate.

https://bugzilla.gnome.org/show_bug.cgi?id=751129
2015-07-01 11:42:45 +02:00
Carlos Garnacho
adb82f0d00 wacom: Drop usage of last-calibration-resolution
This is gone from the g-s-d schema, so just stop setting it.

https://bugzilla.gnome.org/show_bug.cgi?id=748660
2015-04-29 19:35:34 +02:00
Carlos Garnacho
6365dafd92 wacom: Sync gsd-wacom-device.[ch] with g-s-d
And use the GdkDevice getter where it applies.
2015-04-13 14:38:24 +02:00
Benjamin Tissoires
e2a14f4d4c wacom: add an icon for stylii without an eraser
wacom-stylus-no-eraser.svg is an adaptation of wacom-stylus.svg

https://bugzilla.gnome.org/show_bug.cgi?id=746117
2015-04-01 11:15:29 +02:00
Benjamin Tissoires
e463a1eb55 wacom: Update from gnome-settings-daemon
https://bugzilla.gnome.org/show_bug.cgi?id=746117
2015-04-01 11:15:29 +02:00
Benjamin Tissoires
66cb45bdad wacom: do not bail out if the tablet doesn't have an eraser
Tablets have not always an eraser (most of the generic tablets like Huion,
UC-Logic, etc... don't). We should not reject such tablets.

Commit 54849a9 (wacom: Only the stylus and eraser tools need to exist)
mentioned that we were not sure about eraser, and I think we should not
assume one either.

To do so, we simply ignore the eraser xinput node and rely on
libwacom to actually provide the eraser information.

If the stylus does not have the eraser tip, we may fall in the
LAYOUT_OTHER case. We have a picture of a generic Wacom pen with an
eraser, and the leaders linking the widget to the picture are scrambled.

To prevent that, gray out the eraser pressure slider so that we do not
break the layout.

https://bugzilla.gnome.org/show_bug.cgi?id=746117
2015-04-01 11:15:29 +02:00
Benjamin Tissoires
5fcf43a135 wacom: Allow button mapping if the stylus has one button too
The airbrush tool has only one button, and the button mapping combo box
does not work.
We should not bail out if the widget has been removed, that means that
the stylus does not support the second button.

Check upfront the number of buttons to know if the top button parameter
is available.

https://bugzilla.gnome.org/show_bug.cgi?id=746263
2015-03-16 12:53:41 +01:00
Benjamin Tissoires
cf29acae5d wacom: test: add Huion H610 Pro panel
The tablet does not have an eraser, so it's good to have a test for it.

https://bugzilla.gnome.org/show_bug.cgi?id=746117
2015-03-13 17:00:30 +01:00
Bastien Nocera
555429009e wacom: Update from gnome-settings-daemon 2015-03-13 17:00:30 +01:00
David King
64014362eb wacom: Fix final use-stock deprecated property
https://bugzilla.gnome.org/show_bug.cgi?id=736052
2015-01-25 14:05:07 +01:00
Carlos Garnacho
be8d68c591 Update device configuration from gnome-settings-daemon
GsdWacomDevice has been updated, dragging GsdDeviceManager as a dependency
from g-s-d, which has been added to panels/common, and compiled as a
separate static libary, which is used by the wacom and mouse modules.

gsd-input-helper.[ch] is now in such library and has been removed from
the panel directories.

https://bugzilla.gnome.org/show_bug.cgi?id=743196
2015-01-20 20:44:13 +01:00
Rui Matos
205a0cd4bd wacom: Drop deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
David King
86b7af3f0e panels: Mark label strings as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=736052
2014-09-04 16:00:20 +01:00
David King
745c7ef9de panels: Fix all but one uses of use-stock property
Avoid the deprecated use-stock.

https://bugzilla.gnome.org/show_bug.cgi?id=736052
2014-09-04 14:14:31 +01:00
David King
cea2c74a3e panels: Avoid deprecated has-resize-grip property
https://bugzilla.gnome.org/show_bug.cgi?id=736052
2014-09-04 14:11:07 +01:00
Bastien Nocera
c58b8b0b90 wacom: Fix styluys back/forward button assignments
The list store contained the wrong values.

Spotted by the.viclim@gmail.com

https://bugzilla.gnome.org/show_bug.cgi?id=728880
2014-07-17 16:55:50 +02:00
Carlos Garnacho
b1ae5c734a wacom: Fix x/y ranges' swapping when calibrating on rotated screens
The previous axis swapping code would oddly rely on the input coordinates
remaining on untransformed device coordinates, while those are gotten on
screen coordinates (hence rotated), this would cause swapping not to kick
in, and result in swapped X/Y scaling to be applied to X/Y ranges.

So make the axis swapping code be calculated upon screen coordinates, as
the collected points already are, and swap the applied scalings if
necessary.

Also, the code that swapped coordinates before returning to the caller
would scramble min/max values when swapping x/y. Fix that too, minimum
and maximum should stay like that when swapping axes.

https://bugzilla.gnome.org/show_bug.cgi?id=732442
2014-07-01 18:38:22 +02:00
Carlos Garnacho
4a9bde0679 calibrator: Use G_STMT_START/END on SWAP define
And let it pass the type, so it can be used on other than integers.

https://bugzilla.gnome.org/show_bug.cgi?id=732442
2014-07-01 18:38:22 +02:00
Christophe Fergeau
2096cacaf5 wacom: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:46:43 +02:00
Yosef Or Boczko
c5f868994b wacom: Use the new support for RTL icons in GtkIconTheme
https://bugzilla.gnome.org/show_bug.cgi?id=730597
2014-05-23 12:31:53 +03:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Bastien Nocera
49065829ba wacom: Update from gnome-settings-daemon 2014-01-28 15:55:35 +01:00
Carlos Garnacho
c78e22b911 wacom: Fix first animation of calibration UI
The "target" was seen moving from 0,0 to the first calibration
point, so 1) avoid target relayouts when the window is still
being positioned and 2) start the "target" actor as hidden so
it isn't seen moving from anywhere when first shown.

https://bugzilla.gnome.org/show_bug.cgi?id=719698
2013-12-16 12:58:35 +01:00
Carlos Garnacho
ee2afb9bd4 wacom: Protect calibrator UI to spawn animations multiple times
The window state may be updated more than once, so only initiate
the UI and animations when it's first called.

https://bugzilla.gnome.org/show_bug.cgi?id=719698
2013-12-16 12:58:29 +01:00
Carlos Garnacho
911518d683 wacom: Don't leave stray timelines on the calibration UI
Keep the reference for the error/helper messages animations in
the CalibArea struct, so those are destroyed and not leaked, or
possibly crashing when running on already destroyed actors if
the dialog gets cancelled at the right time.

https://bugzilla.gnome.org/show_bug.cgi?id=719698
2013-12-16 12:58:07 +01:00
Carlos Garnacho
e97143e025 wacom: Forgive inconspicuous double clicks when calibrating
Those were likely not meant, and will surely make you start over
again on the calibration process.

https://bugzilla.gnome.org/show_bug.cgi?id=719705
2013-12-16 12:44:42 +01:00
Carlos Garnacho
e2464ee773 wacom: Don't use monitor geometry X/Y when calculating calibration
Calibration must be performed based on the device w/h ranges and the
screen size, so in which coordinates the monitor is virtually mapped
matters little on device coordinates. This fixes calibration of devices
attached to a monitor elsewhere than (0,0) in the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=719574
2013-12-16 12:42:01 +01:00
Carlos Garnacho
71945b8156 wacom: Clear background on "target" actor in calibration UI
the actor's draw() method isn't guaranteed to get a pristine surface,
which may cause artifacts if the background is left untouched, so
clear the background each time the actor has to be drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=719701
2013-12-16 12:30:24 +01:00
Carlos Garnacho
fdef36294a wacom: Set several notebooks' show-border property to FALSE
Since GTK+ commit 05b1ea84b, this hint is used in GtkNotebook to add
a GTK_STYLE_CLASS_FRAME when rendering the notebook frame, so the theme
renders those frame-alike. As it's not what we want for the wacom panel,
set show-border to FALSE on all GtkNotebooks.

https://bugzilla.gnome.org/show_bug.cgi?id=710709
2013-12-02 12:29:30 +01:00
Yosef Or Boczko
ae36409c5f wacom: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:34:39 +02:00
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00
Bastien Nocera
8d7402c04e wacom: Fix slider on Inking Pen page
https://bugzilla.gnome.org/show_bug.cgi?id=711326
2013-11-03 15:05:33 +01:00
Bastien Nocera
95f613bee1 wacom: Fix ~100 pixel offset when calibrating
The calibration gui code moved the targets to x,y, instead of
placing the centre of the target at x,y, leading to a 47 pixel
(half the target's size) offset in both directions (thus 67 pixels
deviation as Pythagorus would tell us).
2013-10-09 12:55:29 +02:00
Bastien Nocera
bf68dfb62d wacom: Fix comment for timeout duration
The comment mentioned 5 seconds, but we use 15 seconds.
2013-10-09 12:18:48 +02:00
Bastien Nocera
18dd6ff04f wacom: Fix incorrect default window information
The window isn't 1x1...
2013-10-08 20:15:55 +02:00
Bastien Nocera
7be584f4f9 wacom: Update from gnome-settings-daemon 2013-10-08 19:25:01 +02:00
Bastien Nocera
297eb6cfbb wacom: Fix use after free
Causing random values in the calibration data.
2013-10-08 18:59:22 +02:00
Bastien Nocera
8e1dd1ae5d wacom: Update from gnome-settings-daemon 2013-10-08 18:55:19 +02:00