GNOME Bugzilla – Bug 668611
Warn about unknown devices
Last modified: 2013-05-28 16:51:19 UTC
When we fallback, warn. But do it just once.
Created attachment 215755 [details] [review] Proposed patch Adds the notification for unknown tablet in Wacom panel. Requires gsd-wacom-device.[ch] from bug #677562
Review of attachment 215755 [details] [review]: I'm fairly certain we don't want a dialogue popping up here.
Maintainer change
(In reply to comment #2) > Review of attachment 215755 [details] [review]: > > I'm fairly certain we don't want a dialogue popping up here. Should this be a desktop notification instead?
Created attachment 242426 [details] [review] wacom: Warn when devices use the fallback configuration It just warns once per device.
Created attachment 242427 [details] [review] wacom: Warn when devices use the fallback configuration It just warns once per device.
Sorry for the two equal patches but I was having fun with git-bz and in the first one I had it so it wouldn't attach the bug URL.
I don't know how to test this, but a warning dialog that is in the way is certainly not something we'd want. Does this mean we have no controls for the device? If the purpose for this is to communicate some of the controls on the panel *might* not work as expected, I'd rather see this communicated in the device name "Unknown Wacom tablet" "Unknown Tablet Model" or somesuch, rather than a nag screen.
Hi Jakub, what I wanted to know is whether a desktop notification is a good way to warn the user. The title and body for this could be "Unknown Tablet Connected // The device may not work as expected." or something like that.
So this happens when you attach the tablet rather than when you first go to configure it? Then yes, a system notification is appropriate.
Created attachment 243038 [details] [review] wacom: Notify user when a device is using the fallback configuration It notifies the user only once per device.
Review of attachment 243038 [details] [review]: ::: plugins/wacom/gsd-wacom-manager.c @@ +959,3 @@ +{ + gchar *msg_body; + NotifyNotification *notification; line feed here. @@ +960,3 @@ + gchar *msg_body; + NotifyNotification *notification; + msg_body = g_strdup_printf (_("The \"%s\" device may not " One line. @@ +961,3 @@ + NotifyNotification *notification; + msg_body = g_strdup_printf (_("The \"%s\" device may not " + "work as expected."), It's an unknown model, but we already recognised it as a wacom tablet. @@ +963,3 @@ + "work as expected."), + device_name); + notification = notify_notification_new (_("Unknown Tablet Connected"), One line. @@ +969,3 @@ + notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); + notify_notification_set_app_name (notification, _("Wacom Settings")); + notify_notification_show (notification, NULL); Definitely some cleaning up to do when the notification gets closed.
Review of attachment 242427 [details] [review]: ::: plugins/wacom/gsd-wacom-manager.c @@ +970,3 @@ + warned_devices = manager->priv->warned_devices; + + if (device_name != NULL && Why not check the device_name at the top of this block? You're not adding the device to the hash table if it's empty anyway. Are you also sure that the device name isn't a fallback device name itself? Eg. having 2 different unknown tablets could have the same device name, no? @@ +972,3 @@ + if (device_name != NULL && + !g_hash_table_contains (warned_devices, device_name)) { + g_warning ("Using the fallback configuration for " It's not a fallback configuration, it's a fallback definition. @@ +977,3 @@ + device_name); + g_hash_table_insert (warned_devices, + (gpointer) g_strdup (device_name), No need to cast to gpointer.
Created attachment 245029 [details] [review] wacom: Notify user when a device is using the fallback configuration New version addressing Bastien's comments and rebased with master.
Created attachment 245437 [details] [review] wacom: Warn when devices use the fallback configuration
Created attachment 245438 [details] [review] wacom: Warn when devices use the fallback configuration
Review of attachment 245438 [details] [review]: Fine.
Created attachment 245445 [details] [review] wacom: Notify user when a device is using the fallback configuration
Created attachment 245449 [details] [review] wacom: Warn when devices use the fallback configuration Re-attaching the right warn patch because I have mistakenly attached it before. This is already pushed after Bastien had marked it as so before I messed up the attachment.