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 734513 - play/pause is activated twice when pressing spacebar and play/pause button is active/selected
play/pause is activated twice when pressing spacebar and play/pause button is...
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: 3.14
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-09 01:29 UTC by Sebastian Wick
Modified: 2014-11-12 20:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
checks to see if playbutton is focused before changing play state (989 bytes, patch)
2014-11-12 00:05 UTC, Agustina Hinojosa
needs-work Details | Review
adds more condensed conditional statement (954 bytes, patch)
2014-11-12 20:39 UTC, Agustina Hinojosa
none Details | Review

Description Sebastian Wick 2014-08-09 01:29:20 UTC
To reproduce, click on the play/pause button and press spacebar. The music will keep playing after a short interruption (if the music was playing before).
Comment 1 Agustina Hinojosa 2014-11-12 00:05:45 UTC
Created attachment 290451 [details] [review]
checks to see if playbutton is focused before changing play state

This is a small conditional that wont activate the shortcut if the play button already has focus.
Comment 2 Vadim Rutkovsky 2014-11-12 20:33:18 UTC
Review of attachment 290451 [details] [review]:

Good job, works for me. Some nitpicks:

::: gnomemusic/window.py
@@ +336,3 @@
             if not self.toolbar.searchbar.get_reveal_child():
                 if event.keyval == Gdk.KEY_space and self.player.actionbar.get_visible():
+                    if Gtk.Window.get_focus(self) != self.player._ui.get_object("play_button"):

Can be simplified for better readability:
1) self.get_focus() instead of Gtk.Window.get_focus(self)
2) self.player.playBtn instead of self.player._ui.get_object
Comment 3 Agustina Hinojosa 2014-11-12 20:39:25 UTC
Created attachment 290551 [details] [review]
adds more condensed conditional statement

Ok, I've made those readability changes.