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 707076 - Selecting items with some favorites sets all selected as favorites
Selecting items with some favorites sets all selected as favorites
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 706818
Blocks:
 
 
Reported: 2013-08-29 18:23 UTC by Arnel Borja
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
selectionbar: Fix selection bug on favorites (1.99 KB, patch)
2013-08-29 18:25 UTC, Arnel Borja
committed Details | Review

Description Arnel Borja 2013-08-29 18:23:31 UTC
Selecting a machine not in favorites, while there is a machine that is
in favorites and selected, adds all selected items to favorites. This
happens because the active property is changed during the check for
selection, emitting a "clicked" signal.

If all are set as favorites, selecting a machine don't work.

To reproduce:
1. Select a machine then add to favorites.
2. Close selection mode.
3. Select again the previous machine.
4. Select another machine that is not in favorites.

Result: The new selected machine gets added to favorites
Expected: The new selected machine should not be in favorites
Comment 1 Arnel Borja 2013-08-29 18:25:22 UTC
Created attachment 253542 [details] [review]
selectionbar: Fix selection bug on favorites

Selecting a machine not in favorites, while there is a machine that is
in favorites and selected, adds all selected items to favorites. This
happens because the active property is changed during the check for
selection, emitting a "clicked" signal.

This patch will block the "clicked" handler for favorite button while
changing this property.
Comment 2 Zeeshan Ali 2013-08-30 13:34:09 UTC
Review of attachment 253542 [details] [review]:

Looks good otherwise. Feel free to add comment just before pushing.

::: src/selectionbar.vala
@@ +99,3 @@
         }
 
+        SignalHandler.block (favorite_btn, favorite_btn_clicked_handler);

Please add a small comment above this line about why you are blocking the signal.
Comment 3 Arnel Borja 2013-08-30 13:55:17 UTC
Comment on attachment 253542 [details] [review]
selectionbar: Fix selection bug on favorites

Committed as 18e91d9