summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2008-12-27 11:00:41 +0100
committerAnton Khirnov <wyskas@gmail.com>2008-12-27 11:00:41 +0100
commitab88d703ef13151912248825cf3b71df3543ae98 (patch)
treee60c6f19463e17f117892b020beadd8540b5e6e8
parent3588fabcf260db7a34168e041da415717d325542 (diff)
Fix some albumcover issues.
-rwxr-xr-xmontypc.py2
-rw-r--r--plugins/AlbumCover.py6
-rw-r--r--plugins/Playlist.py2
-rw-r--r--wgPlaylist.py26
4 files changed, 18 insertions, 18 deletions
diff --git a/montypc.py b/montypc.py
index a729a3f..9be04e1 100755
--- a/montypc.py
+++ b/montypc.py
@@ -12,8 +12,6 @@ try:
app = QtGui.QApplication(sys.argv)
app.setApplicationName("montypc")
- appIcon = QtGui.QIcon('gfx/icon.png')
-
wMain = winMain()
wMain.show()
app.exec_()
diff --git a/plugins/AlbumCover.py b/plugins/AlbumCover.py
index d2952ca..30759cf 100644
--- a/plugins/AlbumCover.py
+++ b/plugins/AlbumCover.py
@@ -30,7 +30,7 @@ class wgAlbumCover(QtGui.QWidget):
def mousePressEvent(self, event):
if event.button()==QtCore.Qt.RightButton:
- song=monty.getCurrentSong()
+ song=self.p.monty.getCurrentSong()
file=QtGui.QFileDialog.getOpenFileName(self
, "Select album cover for %s - %s"%(song.getArtist(), song.getAlbum())
, ""
@@ -66,7 +66,7 @@ class wgAlbumCover(QtGui.QWidget):
def refresh(self):
self.p.extended("refreshing cover")
- song=monty.getCurrentSong()
+ song = self.p.monty.getCurrentSong()
try:
song._data['file']
except:
@@ -166,12 +166,14 @@ class wgAlbumCover(QtGui.QWidget):
class pluginAlbumCover(Plugin):
o=None
+ monty = None
def __init__(self, winMain):
Plugin.__init__(self, winMain, 'AlbumCover')
self.addMontyListener('onSongChange', self.onEvent)
self.addMontyListener('onReady', self.onEvent)
self.addMontyListener('onDisconnect', self.onEvent)
self.addMontyListener('onStateChange', self.onEvent)
+ self.monty = winMain.monty
def _load(self):
self.o=wgAlbumCover(self, None)
diff --git a/plugins/Playlist.py b/plugins/Playlist.py
index f414c55..9c75b9d 100644
--- a/plugins/Playlist.py
+++ b/plugins/Playlist.py
@@ -31,7 +31,7 @@ class pluginPlaylist(Plugin):
self.clrPlstBtn.setToolTip("Clear playlist")
self.o.connect(self.clrPlstBtn, QtCore.SIGNAL('clicked()'), self.clearPlaylistPressed)
self.clrPlstBtn.palette().setColor(QtGui.QPalette.Button, self.o.palette().color(QtGui.QPalette.Window))
- self.o.filter.insertWidget(0, self.clrPlstBtn)
+ self.o.filterLayout.insertWidget(0, self.clrPlstBtn)
def _unload(self):
self.o=None
diff --git a/wgPlaylist.py b/wgPlaylist.py
index 919f10e..2d4c25c 100644
--- a/wgPlaylist.py
+++ b/wgPlaylist.py
@@ -18,8 +18,8 @@ class Playlist(QtGui.QWidget):
winMain=None # the main window
onKeyPress=None
_timerID=None
- frame = None
- filter = None
+ frameLayout = None
+ filterLayout = None
def __init__(self, parent, wMain, headers, name, onDoubleClick, onKeyPress, modes):
QtGui.QWidget.__init__(self, parent)
@@ -40,17 +40,17 @@ class Playlist(QtGui.QWidget):
self.cmbMode=QtGui.QComboBox()
self.setModes(modes)
- self.frame=QtGui.QVBoxLayout()
- self.frame.setSpacing(1)
- self.frame.setMargin(0)
- self.filter=QtGui.QHBoxLayout()
- self.filter.setSpacing(0)
- self.filter.addWidget(self.txtFilter)
- self.filter.addWidget(self.btnClearFilter)
- self.frame.addWidget(self.cmbMode)
- self.frame.addLayout(self.filter);
- self.frame.addWidget(self.lstSongs)
- self.setLayout(self.frame)
+ self.frameLayout = QtGui.QVBoxLayout()
+ self.frameLayout.setSpacing(1)
+ self.frameLayout.setMargin(0)
+ self.filterLayout = QtGui.QHBoxLayout()
+ self.filterLayout.setSpacing(0)
+ self.filterLayout.addWidget(self.txtFilter)
+ self.filterLayout.addWidget(self.btnClearFilter)
+ self.frameLayout.addWidget(self.cmbMode)
+ self.frameLayout.addLayout(self.filterLayout);
+ self.frameLayout.addWidget(self.lstSongs)
+ self.setLayout(self.frameLayout)
self.connect(self.txtFilter, QtCore.SIGNAL('textChanged(const QString&)'), self.txtFilterChange)
self.connect(self.txtFilter, QtCore.SIGNAL('editingFinished()'), self.txtFilterQuit)