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 589474 - XMPModel should emit it's own signals
XMPModel should emit it's own signals
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other Linux
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-07-23 10:26 UTC by Róman Joost
Modified: 2009-10-03 06:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch adds a signal handler which emits signals if a property is changed. Additionally the XMPModel is now a GObject based object type. (11.97 KB, patch)
2009-07-23 10:28 UTC, Róman Joost
needs-work Details | Review
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. (6.14 KB, application/x-gzip)
2009-08-15 09:51 UTC, Róman Joost
  Details

Description Róman Joost 2009-07-23 10:26:40 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.
Comment 1 Róman Joost 2009-07-23 10:28:32 UTC
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.
Comment 2 Sven Neumann 2009-07-23 17:14:26 UTC
You should instead derive XMPModel from GtkTreeStore. You don't need the extra signal then.
Comment 3 Róman Joost 2009-07-28 06:30:02 UTC
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 :)
Comment 4 Róman Joost 2009-08-15 09:51:02 UTC
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.
Comment 5 Martin Nordholts 2009-08-15 10:23:52 UTC
Cool, let's put this on the 2.8 milestone list
Comment 6 Sven Neumann 2009-08-15 14:51:37 UTC
Looks good, please push these changes to the master branch.
Comment 7 Róman Joost 2009-10-03 03:28:46 UTC
I think this bug can be closed as FIXED, as I pushed my changes to the master branch.
Comment 8 Martin Nordholts 2009-10-03 06:57:59 UTC
Ok