GNOME Bugzilla – Bug 589474
XMPModel should emit it's own signals
Last modified: 2009-10-03 06:57:59 UTC
It would be very handy, if the XMPModel for the metadata plugin would emit it's own signals. Otherwise, the only signals a developer can subscribes are the ones emitted by the treestore.
Created attachment 139059 [details] [review] This patch adds a signal handler which emits signals if a property is changed. Additionally the XMPModel is now a GObject based object type.
You should instead derive XMPModel from GtkTreeStore. You don't need the extra signal then.
I investigated this a bit. There are two things which happen to the treemodel: a property could be set and a new schema could be set. If I'm subscribing to the row-changed event, I have to figure out in my callback what has changed: a property or a schema. By using two different signals, it would be more explicit what was changed. The entry fields for example, won't care about schema changes. For them it's only important to know when the property changed they're "watching", rather then a schema. Even if the XMPModel derives from GtkTreeStore (which is currently working for me) I still like to have a way to figure out what changed. Could be that I'm missing something here and I'd be happy for any further pointers :)
Created attachment 140835 [details] This patch adds not only a custom signal to the XMPModel. The XMPModel now inherits from GTKTreeStore, implements the GTKTreeModel interface and emits the property-changed event with a detail.
Cool, let's put this on the 2.8 milestone list
Looks good, please push these changes to the master branch.
I think this bug can be closed as FIXED, as I pushed my changes to the master branch.
Ok