[gnome-music] Revert "Use Ctrl+P and Ctrl+Space as play/pause shortcut."
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Revert "Use Ctrl+P and Ctrl+Space as play/pause shortcut."
- Date: Wed, 23 Mar 2016 10:22:07 +0000 (UTC)
commit b717c270cb72a260d2aaf29ee6559b5a5bbecb01
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Mar 23 11:18:57 2016 +0100
Revert "Use Ctrl+P and Ctrl+Space as play/pause shortcut."
This reverts commit 59d029dd6e9490b47fd0eacac80960082b346784.
gnomemusic/window.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 9a7395f..7e91726 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -395,10 +395,6 @@ class Window(Gtk.ApplicationWindow):
if (event.keyval == Gdk.KEY_f and
event_and_modifiers == Gdk.ModifierType.CONTROL_MASK):
self.toolbar.searchbar.toggle_bar()
- # Play/pause on Ctrl + P and Ctrl + Space
- if (event.keyval == Gdk.KEY_p or event.keyval == Gdk.KEY_space and
- event_and_modifiers == Gdk.ModifierType.CONTROL_MASK):
- self.player.play_pause()
# Go back from Album view on Alt + Left
if (event.keyval == Gdk.KEY_Left and
event_and_modifiers == Gdk.ModifierType.MOD1_MASK):
@@ -418,11 +414,17 @@ class Window(Gtk.ApplicationWindow):
# Open search bar when typing printable chars if it not opened
# Make sure we skip unprintable chars and don't grab space press
+ # (this is used for play/pause)
if not self.toolbar.searchbar.get_reveal_child() and not event.keyval == Gdk.KEY_space:
if (event_and_modifiers == Gdk.ModifierType.SHIFT_MASK or
event_and_modifiers == 0) and \
GLib.unichar_isprint(chr(Gdk.keyval_to_unicode(event.keyval))):
self.toolbar.searchbar.show_bar(True)
+ else:
+ if not self.toolbar.searchbar.get_reveal_child():
+ if event.keyval == Gdk.KEY_space and self.player.actionbar.get_visible():
+ if self.get_focus() != self.player.playBtn:
+ self.player.play_pause()
@log
def _notify_mode_disconnect(self, data=None):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]