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 734006 - GtkListBox: GTK_SELECTION_MULTIPLE broken for mouse clicks
GtkListBox: GTK_SELECTION_MULTIPLE broken for mouse clicks
Status: RESOLVED DUPLICATE of bug 733108
Product: gtk+
Classification: Platform
Component: .General
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-07-30 20:23 UTC by Volker Sobek (weld)
Modified: 2014-08-03 08:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (948 bytes, text/plain)
2014-07-30 20:23 UTC, Volker Sobek (weld)
Details

Description Volker Sobek (weld) 2014-07-30 20:23:45 UTC
Created attachment 282108 [details]
testcase

With GTK_SELECTION_MULTIPLE, clicking on a row with the mouse only adds the row to the selection; if the row is already selected, it won't be unselected (even when holding down Ctrl while clicking), which is what one would expect, I guess. Also, selecting ranges with Shift+LMB doesn't work. In comparison, when navigating with the arrow keys while holding Ctrl and using Space, one can select and unselect any row (and row ranges) without trouble.
Comment 1 Volker Sobek (weld) 2014-07-30 20:43:36 UTC
Setting gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (lb), FALSE); fixes this partly, as it allows to unselect rows with Ctrl+Click, but I'm not sure if this should be necessary. Wouldn't it be better if this selection could be a simple click to select/unselect? (Thinking of all the modal selection modes in many apps now).
Comment 2 Volker Sobek (weld) 2014-07-30 22:34:11 UTC
I just had a look at this and found that the if clause here happily ignores the modify and extend variables from the else clause below. Not sure how to fix this properly though. (I also don't see how gtk_list_box_select_and_activate() is useful in its current form, since it also ignores the current selection mode).

https://git.gnome.org/browse/gtk+/tree/gtk/gtklistbox.c#n1798
Comment 3 Volker Sobek (weld) 2014-07-30 22:40:19 UTC
(In reply to comment #2)

> (I also don't see how gtk_list_box_select_and_activate()
> is useful in its current form, since it also ignores the current selection
> mode).

OK, this wasn't correct, since gtk_list_box_select_row_internal() in turn does take the selection mode into account but the Ctrl and Shift modifiers get lost anyway on the way to there.
Comment 4 Matthias Clasen 2014-08-03 08:18:57 UTC

*** This bug has been marked as a duplicate of bug 733108 ***