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 681613 - icon view doesn't emit selection changed when the model changes
icon view doesn't emit selection changed when the model changes
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkIconView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 676539
 
 
Reported: 2012-08-10 16:55 UTC by William Jon McCann
Modified: 2012-08-20 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
icon-view: emit selection-changed when changing the model (1.31 KB, patch)
2012-08-10 17:25 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-08-10 16:55:05 UTC
The icon view doesn't emit a selection changed when the model changes. The tree view does. Icon view probably should to.

My specific use case is that I'm tracking whether an item is selected in a background chooser dialog in order to set whether the default response is sensitive or not.
Comment 1 William Jon McCann 2012-08-10 17:25:09 UTC
Created attachment 220898 [details] [review]
icon-view: emit selection-changed when changing the model

Only if there was a selection active.
Comment 2 Emmanuele Bassi (:ebassi) 2012-08-11 11:09:14 UTC
Review of attachment 220898 [details] [review]:

looks good to me.
Comment 3 Matthias Clasen 2012-08-20 11:48:43 UTC
Review of attachment 220898 [details] [review]:

The one caveat is that this will likely cause signal emissions at destroy time, when the model is unset.
We already have that issue with the treeview, and people are filing bugs about it.

But it is correct that treeview and iconview should behave the same, so please commit