On Tue, Aug 09, 2011 at 10:59:53AM -0700, Jason Gerecke wrote:
> On Mon, Aug 8, 2011 at 5:37 PM, Peter Hutterer <peter.hutte...@who-t.net> 
> wrote:
> > Changing subject to reflect new topic
> >
> > On Mon, Aug 08, 2011 at 09:33:11AM -0700, Jason Gerecke wrote:
> >> Good call. I thought it might be g-s-d at first, but didn't find any
> >> keys in gconf... I completely forgot that there's also dconf now.
> >
> > afaik, gconf is legacy and dconf/gsettings is the new state-of-the art.
> >
> >> I'll
> >> make some edits to the configuration section of the wiki to mention
> >> gnome-settings-daemon as yet another way of doing things, with a note
> >> about it trampling other settings at the moment.
> >>
> >> Having never looked at g-s-d before, how hard would it be to have it
> >> only apply its settings to the single tablet it got a hotplug event
> >> for?
> >
> > relatively big change. right now, the g-s-d keys currently are designed to
> > work on a global scale, even if the tablet isn't pluged in. the schema
> > hierarchy is currently:
> >    org.gnome.settings-daemon.peripherals.wacom
> >    org.gnome.settings-daemon.peripherals.wacom.stylus
> >    org.gnome.settings-daemon.peripherals.wacom.eraser
> >    org.gnome.settings-daemon.peripherals.wacom.cursor
> >    org.gnome.settings-daemon.peripherals.wacom.pad
> >
> > Now, there is no technical reason this couldn't be
> >    org.gnome.settings-daemon.peripherals.wacom.ser-0xa500d.stylus
> > and similar, with the serial number of the tablet as an extra nesting level.
> 
> Is the schema statically defined, or can be be changed at runtime?


gsettings requires normal schemas to be statically defined (and the wacom
ones are).  "However, schemas can also be 'relocatable', i.e. not equipped
with a fixed path. This is useful e.g. when the schema describes an
'account', and you want to be able to store a arbitrary number of accounts."
http://developer.gnome.org/gio/stable/GSettings.html#g-settings-new-with-path

Not 100% sure how they work, I googled around a bit but couldn't find any
tutorials. gsettings list-relocatable-schemas shows a few though so I guess
the next step is digging into the code for those to see how they do it.

> Having not poked around that much, it looks like its static, which
> would imply (in this case, anyway) that we'd need to pre-populate the
> "wacom" node with children for every serial number out there... If the
> schema can be modified at runtime to dynamically add new child keys as
> they're needed, that would make things a lot nicer.
> 
> > What needs to be added for that though is the code that hooks into the
> > serial code (and double-checking that this code really works now, off-hand
> > I'm not sure if I finished those patches).
> 
> What is this code you're referring to? The only code I can find
> related to serial numbers is for styluses, not the tablets themselves.
> I thought you might have meant USB serial number, but lsusb isn't
> showing one for either of my tablets...

well, we've got the tablet ID (which is more a model number I guess). I
guess we could combine this with sysfs path to get something slightly more
unique.

Cheers,
  Peter

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to