Compare commits
No commits in common. "441c47bdc2e1ea8adf607253bde0ca985d68da27" and "80126440c84f762e0c95d5060e76eec93edfd3ed" have entirely different histories.
441c47bdc2
...
80126440c8
8
.idea/.gitignore
vendored
8
.idea/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@ -1,14 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyPep8Inspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="PyQt5.QtWidgets.customContextMenuRequested.*" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (musicmuster) (2)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/musicmuster.iml" filepath="$PROJECT_DIR$/.idea/musicmuster.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
</module>
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -222,24 +222,21 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.music.set_volume(volume)
|
||||
|
||||
def close_playlist_tab(self):
|
||||
self.close_tab(self.tabPlaylist.currentIndex())
|
||||
with Session() as session:
|
||||
playlist_db = session.query(Playlists).filter(
|
||||
Playlists.id == self.visible_playlist_tab().id).one()
|
||||
playlist_db.close(session)
|
||||
index = self.tabPlaylist.currentIndex()
|
||||
self.tabPlaylist.removeTab(index)
|
||||
|
||||
def close_tab(self, index):
|
||||
if hasattr(self.tabPlaylist.widget(index), 'is_playlist'):
|
||||
if self.tabPlaylist.widget(index) == self.current_track_playlist_tab:
|
||||
self.statusbar.showMessage("Can't close current track playlist",
|
||||
5000)
|
||||
return
|
||||
if self.tabPlaylist.widget(index) == self.next_track_playlist_tab:
|
||||
self.statusbar.showMessage("Can't close next track playlist", 5000)
|
||||
return
|
||||
# It's OK to close this playlist so remove from open playlist list
|
||||
with Session() as session:
|
||||
playlist_db = session.query(Playlists).filter(
|
||||
Playlists.id == self.visible_playlist_tab().id).one()
|
||||
playlist_db.close(session)
|
||||
# Close regardless of tab type
|
||||
self.tabPlaylist.removeTab(index)
|
||||
if self.tabPlaylist.widget(index) == self.current_track_playlist_tab:
|
||||
self.statusbar.showMessage("Can't close current track playlist",
|
||||
5000)
|
||||
elif self.tabPlaylist.widget(index) == self.next_track_playlist_tab:
|
||||
self.statusbar.showMessage("Can't close next track playlist", 5000)
|
||||
else:
|
||||
self.tabPlaylist.removeTab(index)
|
||||
|
||||
def create_note(self, session, text):
|
||||
"""
|
||||
|
||||
@ -50,7 +50,6 @@ class PlaylistTab(QTableWidget):
|
||||
|
||||
self.id = None
|
||||
self.name = None
|
||||
self.is_playlist = True
|
||||
self.master_process = self.parent()
|
||||
self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
self.setAlternatingRowColors(True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user