Compare commits
No commits in common. "4a246406668a417f8fe9b17c9eca5c7e0749a7b8" and "453fe87bf91c0781721e0a26bd6d807d7133ca7c" have entirely different histories.
4a24640666
...
453fe87bf9
@ -129,10 +129,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.actionOpenPlaylist.triggered.connect(self.open_playlist)
|
self.actionOpenPlaylist.triggered.connect(self.open_playlist)
|
||||||
self.actionPlay_next.triggered.connect(self.play_next)
|
self.actionPlay_next.triggered.connect(self.play_next)
|
||||||
self.actionSearch_database.triggered.connect(self.search_database)
|
self.actionSearch_database.triggered.connect(self.search_database)
|
||||||
self.actionSelect_next_track.triggered.connect(self.select_next_track)
|
|
||||||
self.actionSelect_previous_track.triggered.connect(
|
|
||||||
self.select_previous_track)
|
|
||||||
self.actionSetNext.triggered.connect(self.set_next_track)
|
|
||||||
self.actionSkip_next.triggered.connect(self.play_next)
|
self.actionSkip_next.triggered.connect(self.play_next)
|
||||||
self.actionSkipToEnd.triggered.connect(self.test_skip_to_end)
|
self.actionSkipToEnd.triggered.connect(self.test_skip_to_end)
|
||||||
self.actionSkipToFade.triggered.connect(self.test_skip_to_fade)
|
self.actionSkipToFade.triggered.connect(self.test_skip_to_fade)
|
||||||
@ -393,16 +389,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
playlist = Playlists.open(dlg.plid)
|
playlist = Playlists.open(dlg.plid)
|
||||||
self.load_playlist(playlist)
|
self.load_playlist(playlist)
|
||||||
|
|
||||||
def select_next_track(self):
|
|
||||||
"Select next or first track in playlist"
|
|
||||||
|
|
||||||
self.visible_playlist().select_next_track()
|
|
||||||
|
|
||||||
def select_previous_track(self):
|
|
||||||
"Select previous or first track in playlist"
|
|
||||||
|
|
||||||
self.visible_playlist().select_previous_track()
|
|
||||||
|
|
||||||
def set_next_track(self, next_track_id=None):
|
def set_next_track(self, next_track_id=None):
|
||||||
"Set selected track as next"
|
"Set selected track as next"
|
||||||
|
|
||||||
|
|||||||
@ -364,71 +364,6 @@ class Playlist(QTableWidget):
|
|||||||
# Called when we change tabs
|
# Called when we change tabs
|
||||||
self._repaint(save_playlist=False)
|
self._repaint(save_playlist=False)
|
||||||
|
|
||||||
def select_next_track(self):
|
|
||||||
"""
|
|
||||||
Select next or first track. Don't select notes. Wrap at last row.
|
|
||||||
"""
|
|
||||||
|
|
||||||
selected_rows = [row for row in
|
|
||||||
set([a.row() for a in self.selectedItems()])]
|
|
||||||
# we will only handle zero or one selected rows
|
|
||||||
if len(selected_rows) > 1:
|
|
||||||
return
|
|
||||||
# select first row if none selected
|
|
||||||
if len(selected_rows) == 0:
|
|
||||||
row = 0
|
|
||||||
else:
|
|
||||||
row = selected_rows[0] + 1
|
|
||||||
if row >= self.rowCount():
|
|
||||||
row = 0
|
|
||||||
|
|
||||||
# Don't select notes
|
|
||||||
wrapped = False
|
|
||||||
while row in self._meta_get_notes():
|
|
||||||
row += 1
|
|
||||||
if row >= self.rowCount():
|
|
||||||
if wrapped:
|
|
||||||
# we're already wrapped once, so there are no
|
|
||||||
# non-notes
|
|
||||||
return
|
|
||||||
row = 0
|
|
||||||
wrapped = True
|
|
||||||
|
|
||||||
self.selectRow(row)
|
|
||||||
|
|
||||||
def select_previous_track(self):
|
|
||||||
"""
|
|
||||||
Select previous or last track. Don't select notes. Wrap at first row.
|
|
||||||
"""
|
|
||||||
|
|
||||||
selected_rows = [row for row in
|
|
||||||
set([a.row() for a in self.selectedItems()])]
|
|
||||||
# we will only handle zero or one selected rows
|
|
||||||
if len(selected_rows) > 1:
|
|
||||||
return
|
|
||||||
# select last row if none selected
|
|
||||||
last_row = self.rowCount() - 1
|
|
||||||
if len(selected_rows) == 0:
|
|
||||||
row = last_row
|
|
||||||
else:
|
|
||||||
row = selected_rows[0] - 1
|
|
||||||
if row < 0:
|
|
||||||
row = last_row
|
|
||||||
|
|
||||||
# Don't select notes
|
|
||||||
wrapped = False
|
|
||||||
while row in self._meta_get_notes():
|
|
||||||
row -= 1
|
|
||||||
if row < 0:
|
|
||||||
if wrapped:
|
|
||||||
# we're already wrapped once, so there are no
|
|
||||||
# non-notes
|
|
||||||
return
|
|
||||||
row = last_row
|
|
||||||
wrapped = True
|
|
||||||
|
|
||||||
self.selectRow(row)
|
|
||||||
|
|
||||||
def set_selected_as_next(self):
|
def set_selected_as_next(self):
|
||||||
"""
|
"""
|
||||||
Sets the selected track as the next track.
|
Sets the selected track as the next track.
|
||||||
|
|||||||
@ -760,9 +760,6 @@ border: 1px solid rgb(85, 87, 83);</string>
|
|||||||
<addaction name="actionMoveSelected"/>
|
<addaction name="actionMoveSelected"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionExport_playlist"/>
|
<addaction name="actionExport_playlist"/>
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionSelect_next_track"/>
|
|
||||||
<addaction name="actionSelect_previous_track"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_Tracks">
|
<widget class="QMenu" name="menu_Tracks">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -773,8 +770,6 @@ border: 1px solid rgb(85, 87, 83);</string>
|
|||||||
<addaction name="actionFade"/>
|
<addaction name="actionFade"/>
|
||||||
<addaction name="actionS_top"/>
|
<addaction name="actionS_top"/>
|
||||||
<addaction name="action_Resume_previous"/>
|
<addaction name="action_Resume_previous"/>
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionSetNext"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuTest">
|
<widget class="QMenu" name="menuTest">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -953,30 +948,6 @@ border: 1px solid rgb(85, 87, 83);</string>
|
|||||||
<string>E&xport playlist...</string>
|
<string>E&xport playlist...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionSetNext">
|
|
||||||
<property name="text">
|
|
||||||
<string>Set &next</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut">
|
|
||||||
<string>Ctrl+N</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionSelect_next_track">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select next track</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut">
|
|
||||||
<string>J</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionSelect_previous_track">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select previous track</string>
|
|
||||||
</property>
|
|
||||||
<property name="shortcut">
|
|
||||||
<string>K</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc"/>
|
<include location="icons.qrc"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user