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 613970 - ListStore/TreeStore 2.0.x remove() again
ListStore/TreeStore 2.0.x remove() again
Status: RESOLVED OBSOLETE
Product: gnome-perl
Classification: Bindings
Component: Gtk2
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2010-03-25 23:09 UTC by Kevin Ryde
Modified: 2021-07-05 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
second attempt ListStore/TreeStore remove() on gtk 2.0.x (2.41 KB, patch)
2010-03-25 23:09 UTC, Kevin Ryde
none Details | Review

Description Kevin Ryde 2010-03-25 23:09:44 UTC
Created attachment 157122 [details] [review]
second attempt ListStore/TreeStore remove() on gtk 2.0.x

I realized what I posted before for ListStore and TreeStore remove() for gtk 2.0.x is not right in the rare case that the Store's normal stamp is 0 and thus doesn't indicate a zapping.  New attempt below, looking at a "user_data" change.
Comment 1 muppet 2010-03-25 23:59:44 UTC
This isn't really that reliable, either.  If the user_data pointer is NULL, then you're stuck.

In GtkTreeModel.xs, it looks like NULL is a perfectly valid value for user_data.

The code in gtkliststore.c in gtk+ will explicitly set the stamp to 0 to indicate removal, so i'm inclined to say that 0 is not a valid value for a user's stamp.
Comment 2 Kevin Ryde 2010-03-26 00:27:44 UTC
Ah, oops, I see gtk_tree_store_init() avoids stamp==0, so it's only ListStore to worry about -- its gtk_list_store_init() doesn't avoid stamp==0.

The user_data coming in shouldn't be NULL, it's the G_SLIST() thingie of the row being removed.  But in any case in last bit of gtk_list_store_remove() if there's a next row then it's changed and if not then it's unchanged.

Of course this is not general, it only has to be enough for the 2.0.x sources and that particular remove func.
Comment 3 GNOME Infrastructure Team 2021-07-05 12:22:25 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME?utf8=%E2%9C%93&filter=perl-

Thank you for your understanding and your help.