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 107748 - rowrefs broken if it's row_inserted handler isn't connected first
rowrefs broken if it's row_inserted handler isn't connected first
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.2.x
Other Linux
: Normal major
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2003-03-06 18:08 UTC by Kristian Rietveld
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (852 bytes, text/plain)
2003-03-06 18:08 UTC, Kristian Rietveld
  Details
patch as sent to jrb and timj (13.70 KB, patch)
2003-07-17 11:01 UTC, Kristian Rietveld
none Details | Review

Description Kristian Rietveld 2003-03-06 18:08:23 UTC
The RowReferences handling code connects a signal handler to ::row_inserted
to keep up with inserted rows in the model. However, if this signal handler
isn't connected as the first ::row_inserted signal handler on the
TreeModel, things go horribly wrong. This happens, for example, if the user
manages to connect a signal handler first.

Attached testcase demonstrates the problem, we need a good and clean fix
for this issue. As I have no clue how to fix this cleanly, I guess Jonathan
should take a look at it (:
Comment 1 Kristian Rietveld 2003-03-06 18:08:48 UTC
Created attachment 14817 [details]
testcase
Comment 2 Jonathan Blandford 2003-03-19 04:28:51 UTC
After talking with rambokid, we decided the best way to fix this is to
have the GtkTreeModel  provide class closures in
gtk_tree_model_base_init() for row_inserted, row_deleted,
row_reordered and make all those signals RUN_FIRST.  Each closure will
then fetch all row references used with this model and update them. 
We can then remove the proxy signal connects on the model, and
gaurantee that we run the update before any other signal handler is run.
Comment 3 Kristian Rietveld 2003-05-22 22:28:11 UTC
I will write up a patch and test this ASAP. This blocks the combo work
(though I have a nasty workaround in there :).
Comment 4 Kristian Rietveld 2003-07-17 11:01:26 UTC
Created attachment 18375 [details] [review]
patch as sent to jrb and timj
Comment 5 Jonathan Blandford 2003-07-17 17:50:39 UTC
Tentatively looks fine to me, but my closure-fu aint so hot.  I'll
defer to Tim's expertice as to whether or not it's right.
Comment 6 Kristian Rietveld 2003-08-16 14:40:33 UTC
Reviewed by Tim. Committed on HEAD.