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 704798 - wacom: Call the OSD window for assigning the tablets' buttons
wacom: Call the OSD window for assigning the tablets' buttons
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Wacom
unspecified
Other All
: Normal normal
: ---
Assigned To: Joaquim Rocha
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-24 10:54 UTC by Joaquim Rocha
Modified: 2013-07-26 18:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wacom: Call the OSD window for assigning the tablets' buttons (7.94 KB, patch)
2013-07-24 10:54 UTC, Joaquim Rocha
needs-work Details | Review
wacom: Call the OSD window for assigning the tablets' buttons (7.00 KB, patch)
2013-07-26 15:37 UTC, Joaquim Rocha
none Details | Review
wacom: Call the OSD window for assigning the tablets' buttons (7.34 KB, patch)
2013-07-26 18:05 UTC, Bastien Nocera
committed Details | Review

Description Joaquim Rocha 2013-07-24 10:54:20 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=704797 for some issues that occur with these changes.
Comment 1 Joaquim Rocha 2013-07-24 10:54:22 UTC
Created attachment 250021 [details] [review]
wacom: Call the OSD window for assigning the tablets' buttons

It falls back to the listbox view in case the OSD cannot be shown.
Comment 2 Bastien Nocera 2013-07-24 11:06:49 UTC
Review of attachment 250021 [details] [review]:

Remove the libgd changes from the patch...

::: panels/wacom/cc-wacom-page.c
@@ +389,2 @@
 	g_assert (priv->mapping_builder == NULL);
+

Whitespace change.

@@ +431,3 @@
+	result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object), res, &error);
+
+	if (page->priv->cancellable != NULL) {

That's not how you check for cancelled calls, as explained in the other bug.

@@ +459,3 @@
+	if (priv->cancellable != NULL) {
+		g_cancellable_cancel (priv->cancellable);
+		g_object_unref (priv->cancellable);

No need to cancel it, and you can just run g_clear_object() instead.

@@ +464,3 @@
+
+	if (proxy == NULL) {
+		g_message ("Couldn't get the GSD Wacom DBus proxy. Launching the button mapping dialog.");

I don't want that in the code. We don't support mix'n'match environment.

@@ +493,3 @@
+	g_object_get (priv->pad, "gdk-device", &gdk_device, NULL);
+
+	if (gdk_device != NULL)

g_return_if_fail (gdk_device != NULL);

::: panels/wacom/cc-wacom-panel.c
@@ +223,3 @@
+	{
+		g_cancellable_cancel (priv->cancellable);
+		g_object_unref (priv->cancellable);

g_clear_object();

@@ +440,3 @@
+	priv->proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
+
+	if (priv->cancellable != NULL)

Again, wrongly used cancellables.

::: panels/wacom/test-wacom.c
@@ +20,3 @@
+cc_wacom_panel_get_gsd_wacom_bus_proxy (CcWacomPanel *self)
+{
+	g_message ("Should get the g-s-d wacom dbus proxy here");

This should be fixed.
Comment 3 Joaquim Rocha 2013-07-26 15:37:01 UTC
Created attachment 250209 [details] [review]
wacom: Call the OSD window for assigning the tablets' buttons

New version. I still don't know how you want me to use the cancellable, I used clear_object but this way I think the cancellable is pretty much useless.
Please let me know what's the correct approach.
Comment 4 Bastien Nocera 2013-07-26 18:05:06 UTC
Created attachment 250221 [details] [review]
wacom: Call the OSD window for assigning the tablets' buttons

It falls back to the listbox view in case the OSD cannot be shown.
Comment 5 Bastien Nocera 2013-07-26 18:08:32 UTC
Attachment 250221 [details] pushed as d83e0ff - wacom: Call the OSD window for assigning the tablets' buttons