Compare commits
2 Commits
80126440c8
...
441c47bdc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
441c47bdc2 | ||
|
|
eb1dc4c07d |
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
14
.idea/inspectionProfiles/Project_Default.xml
Normal file
14
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<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>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?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>
|
||||
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?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>
|
||||
12
.idea/musicmuster.iml
Normal file
12
.idea/musicmuster.iml
Normal file
@ -0,0 +1,12 @@
|
||||
<?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>
|
||||
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -222,21 +222,24 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.music.set_volume(volume)
|
||||
|
||||
def close_playlist_tab(self):
|
||||
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)
|
||||
self.close_tab(self.tabPlaylist.currentIndex())
|
||||
|
||||
def close_tab(self, 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)
|
||||
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)
|
||||
|
||||
def create_note(self, session, text):
|
||||
"""
|
||||
|
||||
@ -50,6 +50,7 @@ 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