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 749970 - gtklistbox: allow unselecting all rows when using GTK_SELECTION_BROWSE
gtklistbox: allow unselecting all rows when using GTK_SELECTION_BROWSE
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-05-27 14:32 UTC by Carlos Soriano
Modified: 2015-05-27 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtklistbox: allow unselecting all rows when using GTK_SELECTION_BROWSE (1.28 KB, patch)
2015-05-27 14:32 UTC, Carlos Soriano
none Details | Review

Description Carlos Soriano 2015-05-27 14:32:41 UTC
See patch, it would be useful for the gtkplacesidebar that needs to unselect all rows when nautilus or filechooser is in a location different than one of the sidebar.
Comment 1 Carlos Soriano 2015-05-27 14:32:45 UTC
Created attachment 304078 [details] [review]
gtklistbox: allow unselecting all rows when using GTK_SELECTION_BROWSE

Even using GTK_SELECTION_BROWSE we expect to sometimes not having
selected any row, as the docs says, when i.e. searching or so.
What is enforced is that from any user interaction, only one row can be
selected at once.
But we could allow applications to unselect all rows, for cases when
the application needs to show that something inside the application
invalidated the selection (like when searching, etc).

For user interactions the *_internal methods are used, so it's enough
to remove the check in the public function without affecting the
internal behavior.
Comment 2 Carlos Soriano 2015-05-27 15:07:31 UTC
ok sorry, that's it what GTK_SELECTION_SINGLE is for....