Commit graph

517 commits

Author SHA1 Message Date
Automeris naranja
65734339c2 wacom: Rename "Test Your Settings" button to "Test Settings"
The same change was made in the Mouse & Touchpad panel:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1486
2023-03-15 13:37:44 +00:00
Mohammed Sadiq
3b121805ed log: Improve logging
The 'tracing' build option is no longer needed.  And the verbosity
of logs can be set by providing '-v' multiple times.
2022-12-01 11:44:17 +00:00
Mohammed Sadiq
26fe10348e wacom: Use CcListRow for row with go-next icon 2022-11-25 20:52:28 +05:30
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +00:00
Carlos Garnacho
92b784f561 wacom: Use Mutter's input mapping interface to show calibration UI
When the "Automatic" mapping is chosen for a display-attached tablet device,
Mutter is in charge of applying the heuristics to map the tablet device to
its most likely attached display.

When that happens, the Wacom panel does not know better (or anything)
to show the calibration UI than picking a GdkMonitor and hoping for the
best.

To improve this situation, Mutter has been added a D-Bus interface so it
is possible to query it for the output that a tablet device is mapped to.
This commit adds the support for this interface, so that the Wacom panel
does know to pick the right GdkMonitor to fullscreen the calibration UI on.
2022-09-01 23:14:07 +02:00
Carlos Garnacho
39402f21ba wacom: Show distinct entries for Wacom Express Key Remote
If you did not know the Wacom Express Key Remote (or EKR for short),
let me introduce it to you:

https://estore.wacom.com/media/catalog/product/cache/fb4143a007ae6439deba9b18afd745f2/a/c/ack-411050_main_2.jpg

This is a hand-sized standalone pad device, meant to be used together
with drawing tablets, providing additional buttons and a touch sensitive
ring that can be mapped to actions and keypresses.

These pads were so far handled in GNOME, but in a very subtle manner.
As the EKR is implicitly paired to a tablet, it was possible to map
EKR buttons from the paired tablet once the pad OSD UI from GNOME
Shell was shown.

As this device basically just needs a "Map buttons" action to
configure it, it just didn't sit well in the older Settings UI,
it would get a separate page with just a lone button in there. So
its support has been kind of an easter egg so far.

But the new UI can indeed accomodate better a device that is neither
tablet nor stylus, and has few options. This commit adds the EKR
as a separate AdwPreferencesGroup.
2022-08-17 11:57:33 +00:00
Lukáš Tyrychtr
8cd39513be Fix a typo 2022-06-19 23:25:30 +00:00
Lukáš Tyrychtr
ca04a2b550 Add a few missing labels in the wacom settings 2022-06-19 23:25:30 +00:00
Felipe Borges
e8a046765f wacom: Fix typo in UI file property name
Fixes #1777
2022-04-24 12:04:38 +00:00
Felipe Borges
c2f89ef7ba wacom: Mark two more strings as translatable
See c5d0437c0f (note_1433556)
2022-04-20 18:09:21 +02:00
oscfdezdz
c5d0437c0f wacom: mark some strings as translatable
Some UI strings were not marked as translatable when the panel was ported to GTK4.
2022-04-19 16:46:59 +00:00
Carlos Garnacho
0d82613258 wacom: Bring back empty state view
This went mistakenly missing in the recent UI updates. Since this
panel is still accessible through search despite tablet availability,
we should have a proper empty state view when moving to the panel
with no tablets available.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1684
2022-03-04 15:19:21 +00:00
Carlos Garnacho
7371dbb35c wacom: Explicitly discard input from touchscreens
Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1612
2022-02-12 16:03:37 +00:00
Carlos Garnacho
57e5144f41 wacom: Avoid reset on spurious size changes
This is a possible reason for undesired calibration resets.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1613
2022-02-12 16:03:37 +00:00
Carlos Garnacho
3f12a7d2cb wacom: Allow NULL monitors in calibration
Unfortunately, this may be the case, it is better to show wonky UI
than no UI at all.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
6c6499e23e wacom: Pass GdkMonitor directly to calibrator object
Instead of figuring out a monitor number from a GdkMonitor, and
look the GdkMonitor back up, pass the GdkMonitor directly.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
6756710996 wacom: Make calibrator retrieve dimensions from window
So we can fullscreen on a monitor and forget.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
ec5ad4d3e4 wacom: Turn CcCalibArea into a window subclass
Modernize a bit the code, since it will be easier to do some things
as a window subclass.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
fce8b631cc wacom: Rename calibrator API
Add "Cc" prefix so it's more consistent with the rest of the project.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
1777a42aef wacom: Update/unbreak calibrator
It got to a building state in the GTK4 port, but was broken at
runtime. Update event handlers and builder objects so it works again.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
e26ea4e6d1 wacom: Drop dead code
These dimensions are no longer used.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
3d4d785588 wacom: Drop unused API
This function was only used for logging purposes, we can do
without it.
2022-02-12 16:03:37 +00:00
Carlos Garnacho
a9127145d3 wacom: Move tablet/stylus sections to AdwPreferencesGroup
There is now the header-suffix property that makes it possible to add
tablet/stylus icons besides the title/description, so we can simply
use this widget.
2022-02-01 14:18:53 +00:00
Carlos Garnacho
653d66b7a7 wacom: Add description subtitles to tablet devices 2022-02-01 14:18:53 +00:00
Carlos Garnacho
04bb70a5b3 wacom: Add description subtitles to styli 2022-02-01 14:18:53 +00:00
Carlos Garnacho
9bd0b94527 wacom: Use right function to find whether stylus has eraser tip
We are looking for paired styli that act as standalone erasers, this is
not what we are looking for here.
2022-02-01 14:18:53 +00:00
Carlos Garnacho
2bbc1fd2bb wacom: Update tablet images
These had some additional padding that is undesirable in the new
UI. Drop that so things are nicely aligned.
2022-02-01 14:18:53 +00:00
Carlos Garnacho
0379531980 wacom: Restore stylus icons
These images needed updating, this is done separately in this commit.
With this, stylus sections also get a nice icon.
2022-02-01 14:18:53 +00:00
Carlos Garnacho
7806b88460 wacom: Refresh UI
Use libadwaita widgets, and follow recent mockups for this panel.
2022-02-01 14:18:53 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Georges Basile Stavracas Neto
4300a4a290 panels: Use new CcPanel helpers for title widgets
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Georges Basile Stavracas Neto
d189a67000 flatpak: Update dependencies to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
816e6203e3 wacom: Port to GTK4
Many part of this commit were made by Carlos
Garnacho <carlosg@gnome.org>

WIP wacom: Port to GTK4

Lots of stuff missing and probably broken.

wacom: Port CcDrawingArea input to gestures

We have a handy GtkGestureStylus to use here, which avoids direct
handling of GdkEvents.

wacom: Update current stylus tracking to GtkGestureStylus

Use the ::proximity signal to notice when we are being hovered with
a tablet stylus, and look up the tool from there.
2021-12-14 22:34:21 -03:00
Bastien Nocera
4b1f7011c4 wacom: Add scenario tester
Running the helper will launch gnome-control-center with a mocked Wacom
Cintiq tablet through umockdev when one isn't present or easily available.

The Cintiq was selected as it will trigger showing all the different
buttons Wacom tablets can make the panel spawn.
2021-11-18 14:57:22 +00:00
Bastien Nocera
8ac36f479e wacom: Add a fake stylus when mocking a tablet 2021-11-18 14:57:22 +00:00
Bastien Nocera
a93a023229 wacom: Split off notebook switching for detected stylus
This will reduce code duplication for mocking styli.
2021-11-18 14:57:22 +00:00
Bastien Nocera
d47b9be08a wacom: Print errors for libwacom_new_from_*() calls
This helps with debugging.
2021-11-18 14:57:22 +00:00
Philip Withnall
e522e5e732 wacom: Fix a critical warning if loading a cursor fails
It’s possible for `gdk_cursor_new_for_display()` to return `NULL`. It’s
OK to pass `NULL` to `gdk_window_set_cursor()`, but not OK to then unref
it.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-02 21:41:03 +00:00
Carlos Garnacho
297906685e wacom: Group pad/stylus devices together with the group name
This will cover the regular case of pads attached to a tablet, but
also the EKR case where the pad is a separate device logically
grouped with a tablet.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/415
2020-09-04 21:46:19 +00:00
Carlos Garnacho
eb14c5a64f wacom: Cater for multiple pads in the CcWacomPage
We don't need to track them much specifically, as we delegate pad
button mapping UI on GNOME Shell. It is however possible to have
tablets with 0 to N pads (upper bound within sanity = 2), so we
must at least reflect that in the "Map Buttons..." button visibility.

This distinction is most important for the combination of EKR plus
Cintiq 27QHD, as this is a pad-less tablet, for which we wouldn't
usually show the "Map buttons..." action.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/415
2020-09-04 21:46:19 +00:00
Carlos Garnacho
e50f27a96b wacom: Let CcWacomPage track pad devices
This puts stylus/pad tracking on 2 separate levels. The CcWacomPanel
will look for styli, and treat them as "device leaders", adding a
CcWacomPage for them.

The CcWacomPage will then track the related pad, and update the
"Map buttons..." action visibility according to it.

This simplifies tablet page creation (eg. have it completed in one
step), and decouples the device grouping logic from CcWacomPanel,
which will be useful in future commits.
2020-09-04 21:46:19 +00:00
Yuri Chornoivan
e7050ab6f4 Fix minor typos 2020-07-20 10:38:09 +03:00
Robert Ancell
e6128c9ffd wacom: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
Carlos Garnacho
7c85d5a871 wacom: Pick libwacom's Generic Pen stylus if tool ID is 0
We generally use tool ID 0 if the ID is actually unknown, libwacom however
assigns 0xfffff to such device. Make it sure we find the "Generic Pen"
stylus description in that case.
2020-02-13 22:15:00 +00:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Carlos Garnacho
edd7f97422 wacom: Avoid poking disposed object
A little above in the function, we update the page UI, maybe destroying
the bits that allow decoupling display-attached tablets from their display.
Later on, we unconditionally update its GtkSwitch.

This can't bode well on tablets where the widget was already destroyed.
2019-12-18 00:24:22 +00:00
Robert Ancell
34cb560009 wacom: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
Carlos Garnacho
c9ef4fee0f wacom: Snap tip/eraser pressure feel to the allowed values
And add markers for those. We only allow a total of 7 fixed pressure curve
values, so make the UI clear about it.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/483
2019-09-09 22:52:44 +00:00