Removed some old keystrokes no longer needed
This commit is contained in:
parent
a9032602bf
commit
6bd0c10ef2
@ -11,6 +11,10 @@
|
|||||||
* the audio player module has received some improvements:
|
* the audio player module has received some improvements:
|
||||||
- When there is something being played, the label of the "play" button, located in all audio buffers, will change automatically to "pause". When pressed, it will pause the song instead of starting the playback again since the beginning.
|
- When there is something being played, the label of the "play" button, located in all audio buffers, will change automatically to "pause". When pressed, it will pause the song instead of starting the playback again since the beginning.
|
||||||
- The last change will work also in the dialog for displaying audio information. Now it's possible to play and pause an audio from such dialog.
|
- The last change will work also in the dialog for displaying audio information. Now it's possible to play and pause an audio from such dialog.
|
||||||
|
* In audio buffers, you will play the focused audio when pressing enter in the item, instead of opening the audio information dialog.
|
||||||
|
* Removed some old keystrokes in socializer buffers due to better alternatives. The reason for this change is that currently you don't need to be focusing an item in a buffer for being able to use the alternative keystrokes, which makes those a better implementation.
|
||||||
|
- Control+Enter and control+Shift+Enter: superseeded by Control+P for playing (and pausing) the currently focused audio.
|
||||||
|
- F5 and F6: superseeded by Alt+down and up arrows for modifying volume.
|
||||||
|
|
||||||
## changes in version 0.20 (25.04.2019)
|
## changes in version 0.20 (25.04.2019)
|
||||||
|
|
||||||
|
@ -304,11 +304,7 @@ class baseBuffer(object):
|
|||||||
|
|
||||||
def get_event(self, ev):
|
def get_event(self, ev):
|
||||||
""" Parses keyboard input in the ListCtrl and executes the event associated with user keypresses."""
|
""" Parses keyboard input in the ListCtrl and executes the event associated with user keypresses."""
|
||||||
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown() and ev.ShiftDown(): event = "pause_audio"
|
if ev.GetKeyCode() == wx.WXK_RETURN: event = "open_post"
|
||||||
elif ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "play_audio"
|
|
||||||
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "open_post"
|
|
||||||
elif ev.GetKeyCode() == wx.WXK_F5: event = "volume_down"
|
|
||||||
elif ev.GetKeyCode() == wx.WXK_F6: event = "volume_up"
|
|
||||||
else:
|
else:
|
||||||
event = None
|
event = None
|
||||||
ev.Skip()
|
ev.Skip()
|
||||||
@ -629,6 +625,17 @@ class audioBuffer(feedBuffer):
|
|||||||
if self.name == "me_audio":
|
if self.name == "me_audio":
|
||||||
self.tab.post.Enable(True)
|
self.tab.post.Enable(True)
|
||||||
|
|
||||||
|
def get_event(self, ev):
|
||||||
|
if ev.GetKeyCode() == wx.WXK_RETURN: event = "play_audio_from_keystroke"
|
||||||
|
else:
|
||||||
|
event = None
|
||||||
|
ev.Skip()
|
||||||
|
if event != None:
|
||||||
|
try:
|
||||||
|
getattr(self, event)()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
def connect_events(self):
|
def connect_events(self):
|
||||||
widgetUtils.connect_event(self.tab.play, widgetUtils.BUTTON_PRESSED, self.play_audio)
|
widgetUtils.connect_event(self.tab.play, widgetUtils.BUTTON_PRESSED, self.play_audio)
|
||||||
widgetUtils.connect_event(self.tab.play_all, widgetUtils.BUTTON_PRESSED, self.play_all)
|
widgetUtils.connect_event(self.tab.play_all, widgetUtils.BUTTON_PRESSED, self.play_all)
|
||||||
@ -644,6 +651,13 @@ class audioBuffer(feedBuffer):
|
|||||||
pub.sendMessage("play", object=self.session.db[self.name]["items"][selected])
|
pub.sendMessage("play", object=self.session.db[self.name]["items"][selected])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def play_audio_from_keystroke(self, *args, **kwargs):
|
||||||
|
selected = self.tab.list.get_selected()
|
||||||
|
if selected == -1:
|
||||||
|
selected = 0
|
||||||
|
pub.sendMessage("play", object=self.session.db[self.name]["items"][selected])
|
||||||
|
return True
|
||||||
|
|
||||||
def play_next(self, *args, **kwargs):
|
def play_next(self, *args, **kwargs):
|
||||||
selected = self.tab.list.get_selected()
|
selected = self.tab.list.get_selected()
|
||||||
if selected < 0:
|
if selected < 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user