GNOME Bugzilla – Bug 677562
wacom: need to flag unknown devices
Last modified: 2012-06-11 13:12:43 UTC
so we can report that in the gnome-control-center Wacom panel (bug 668611)
Created attachment 215754 [details] [review] Proposed patch Adds a "is_fallback" flag for device and stylus, and methods to read that flag. Also adds a new setting to allow users to disable notification (per device)
Review of attachment 215754 [details] [review]: ::: data/org.gnome.settings-daemon.peripherals.wacom.gschema.xml.in.in @@ +19,3 @@ + <default>true</default> + <_summary>Warn about unknown device</_summary> + <_description>Enable this to warn the user when an unknown (fallback) device is created.</_description> Really rather not. The UI could use an info bar or something instead.
Sorry I do not understand. Once a fallback device has been detected, and the user do not want to see that warning again for the same device, we need to flag it in the settings database, that's the purpose of that settings. I don't see what an info bar has to do with that.
Just to be clear, the purpose of that settings is to implement https://bugzilla.gnome.org/show_bug.cgi?id=668611#c0
(In reply to comment #3) > Sorry I do not understand. > > Once a fallback device has been detected, and the user do not want to see that > warning again for the same device, Maybe. Maybe not. The bug you're referencing hasn't exactly been through design. > we need to flag it in the settings database, > that's the purpose of that settings. This setting has nothing to do with gnome-settings-daemon's configuration storage, because it's not configuration. If anything needs to be stored for gnome-control-center to use, then it should save that on its own (in a side keyfile in XDG_CONFIG_DIR or something). > I don't see what an info bar has to do with that. We could always show the infobar instead of having warning popups. But as mentioned earlier, this needs to go through design. We might also need to add support for loading tablet definitions from the user's local directory, etc. The rest of the patch is fine, please upload a new one here, and I'll mark it as commit now.
Created attachment 215943 [details] [review] Updated patch Updated patch without the new GSetting as per comment #2
Created attachment 215945 [details] [review] Updated patch (same as comment #6 with consistent g_return_val_if_fail() when the passed param in not of expected type)
Review of attachment 215945 [details] [review]: Sorry to come back to you with this, but I'm not sure we want to separate "is_fallback" for styli and tablets. The "/* Create a fallback stylus if we don't have one */" branch is impossible to get to, with a recent libwacom, as we will add styli ourselves if "Styli=" isn't present. Furthermore, the absence of "Styli=" definition in a tablet file isn't a bug, it's the way we define devices that don't have styli with device ids. I think you should restrict the GsdWacomDevice to have a "fallback" property. ::: plugins/wacom/gsd-wacom-device.c @@ +1212,3 @@ db = libwacom_database_new (); + device->priv->is_fallback = FALSE; /* Until proven otherwise */ The private struct is zero'ed when instantiated, so there's no need to set it, unless you absolutely want this comment to appear (I don't think it's useful).
Created attachment 215948 [details] [review] Updated patch (In reply to comment #8) Sure, agreed. This one also adds the info to the list-wacom test program.
Created attachment 215949 [details] [review] Updated patch Same, but without removing a blank line to remain as the original file.
Review of attachment 215949 [details] [review]: Looks good.
committed