After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673892 - Make calibrate button insensitive if matching tablet is not found
Make calibrate button insensitive if matching tablet is not found
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Wacom
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Peter Hutterer
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-11 09:13 UTC by Olivier Fourdan
Modified: 2012-05-18 09:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (920 bytes, patch)
2012-04-11 09:13 UTC, Olivier Fourdan
needs-work Details | Review
Proposed patch (1.04 KB, patch)
2012-04-12 13:39 UTC, Olivier Fourdan
none Details | Review
0001-wacom-Make-Calibrate-button-insensitive-if-there-is-.patch (1.15 KB, patch)
2012-04-12 22:56 UTC, Peter Hutterer
committed Details | Review

Description Olivier Fourdan 2012-04-11 09:13:30 UTC
Created attachment 211816 [details] [review]
Proposed patch

In the case of a screen tablet, calibration cannot work if the monitor for the tablet cannot be matched.

The attached patch make the "Calibrate" button insensitive in this case.
Comment 1 Bastien Nocera 2012-04-12 10:03:17 UTC
Review of attachment 211816 [details] [review]:

Please use git format-patch to generate the patch.
Comment 2 Olivier Fourdan 2012-04-12 13:39:03 UTC
Created attachment 211928 [details] [review]
Proposed patch

(In reply to comment #1)
> Please use git format-patch to generate the patch.

Sure, here it comes :)
Comment 3 Peter Hutterer 2012-04-12 22:47:24 UTC
Review of attachment 211928 [details] [review]:

::: panels/wacom/cc-wacom-page.c
@@ +1056,3 @@
 		gtk_widget_show (WID ("button-calibrate"));
+		if (gsd_wacom_device_get_display_monitor (page->priv->stylus) < 0)
+			gtk_widget_set_sensitive (WID ("button-calibrate"), FALSE);

tbh, I'd prefer using a temporary variable here to avoid duplicating calls. Something like

gbool has_monitor = gsd_wacom_device_get_display_monitor (page->priv->stylus) < 0;
gtk_widget_set_sensitive (WID ("button-calibrate"), has_monitor);
Comment 4 Peter Hutterer 2012-04-12 22:56:34 UTC
Created attachment 211962 [details] [review]
0001-wacom-Make-Calibrate-button-insensitive-if-there-is-.patch
Comment 5 Bastien Nocera 2012-04-13 13:08:37 UTC
Review of attachment 211962 [details] [review]:

Looks good.
Comment 6 Peter Hutterer 2012-05-14 03:27:56 UTC
ping?
Comment 7 Bastien Nocera 2012-05-18 09:36:52 UTC
(In reply to comment #6)
> ping?

Ping for what? :)
At that point, you'll have to explain why neither of you have GNOME git accounts...
Comment 8 Bastien Nocera 2012-05-18 09:38:33 UTC
Fixed in gnome-3-4 and master.