[Pyamp-cvs] pyamp/src mainwindow.py,1.3,1.4 mainwindow.pyc,1.3,1.4 mp3song.py,1.1.1.1,1.2 mp3song.py
Status: Alpha
Brought to you by:
sayap
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv9686/src Modified Files: mainwindow.py mainwindow.pyc mp3song.py mp3song.pyc oggsong.py oggsong.pyc playlist.py playlist.pyc song.py song.pyc Log Message: Added detailed tooltip for song Index: mainwindow.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mainwindow.py 20 Sep 2003 13:20:51 -0000 1.3 --- mainwindow.py 20 Sep 2003 17:08:48 -0000 1.4 *************** *** 32,35 **** --- 32,36 ---- from songslider import SongSlider from songtimer import SongTimer + from songfactory import SongFactory class MainWindow(KMainWindow): *************** *** 60,63 **** --- 61,65 ---- self.actions = {} self.actionCollection = KActionCollection(self) + self.selectedItem = None icons = KIconLoader() *************** *** 238,241 **** --- 240,250 ---- "about") + #~ self.actions["songInfo"] = KAction(qApp.translate("MainWindow", "Show Song Info"), + #~ "info", + #~ KShortcut(self.readConfigEntry("songInfo")), + #~ self.showSongInfo, + #~ self.actionCollection, + #~ "songInfo") + self.actions["selAll"] = KAction(qApp.translate("MainWindow", "Select All"), "", *************** *** 494,499 **** def showContextMenu(self, item, point, col): ! if item: ! self.contextMenu.popup(point) def searchChanged(self, text): --- 503,515 ---- def showContextMenu(self, item, point, col): ! self.selectedItem = item ! self.contextMenu.popup(point) ! ! #~ def showSongInfo(): ! #~ if self.selectedItem: ! #~ fullpath = self.selectedItem.getFullpath() ! #~ song = SongFactory.newSong(fullpath) ! #~ sample, bitrate, channels, format = song.getParameters() ! #~ length = song.getLength() def searchChanged(self, text): Index: mainwindow.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.pyc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs6zweH4 and /tmp/cvsYNFW4Y differ Index: mp3song.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mp3song.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** mp3song.py 10 Sep 2003 19:12:34 -0000 1.1.1.1 --- mp3song.py 20 Sep 2003 17:08:48 -0000 1.2 *************** *** 38,41 **** --- 38,44 ---- return (self.sampleRate, 16, 2, linuxaudiodev.AFMT_S16_NE) + def getBitrate(self): + return self.file.bitrate() + def getCurrentTime(self): return int(self.file.current_time() / 1000) Index: mp3song.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mp3song.pyc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsfrrKn8 and /tmp/cvsSfXVy6 differ Index: oggsong.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/oggsong.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** oggsong.py 10 Sep 2003 19:12:36 -0000 1.1.1.1 --- oggsong.py 20 Sep 2003 17:08:48 -0000 1.2 *************** *** 40,43 **** --- 40,46 ---- return (self.sampleRate, 16, 2, linuxaudiodev.AFMT_S16_NE) + def getBitrate(self): + return self.file.bitrate(0) + def getCurrentTime(self): return int(self.file.time_tell()) Index: oggsong.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/oggsong.pyc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsx5UTwc and /tmp/cvsYQPrRe differ Index: playlist.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** playlist.py 15 Sep 2003 11:38:13 -0000 1.2 --- playlist.py 20 Sep 2003 17:08:48 -0000 1.3 *************** *** 25,28 **** --- 25,29 ---- from songthread import SongThread from listitem import ListItem + from tooltip import ToolTip class PlayList(KListView): *************** *** 42,45 **** --- 43,47 ---- def __init__(self, *args): KListView.__init__(self, *args) + self.tooltip = ToolTip(self) self.songThread = SongThread(self) self.playingSong = None *************** *** 63,67 **** self.setSelectionMode(KListView.Extended) self.setItemMargin(5) - self.setShowToolTips(True) self.setAllColumnsShowFocus(True) self.setVScrollBarMode(QScrollView.AlwaysOn) --- 65,68 ---- *************** *** 269,272 **** --- 270,274 ---- def setPlayingSong(self, song): + print self.tooltip(song, 1) if self.getPlayingSong(): self.getPlayingSong().setPlaying(False) *************** *** 398,404 **** def remove(self): ! for i in self.getSelection(): ! self.removeSong(i) ! self.compress() def removeSong(self, index): --- 400,412 ---- def remove(self): ! selection = self.getSelection() ! if not selection: ! return ! elif len(selection) == len(self.songs): ! self.clear() ! else: ! for i in selection(): ! self.removeSong(i) ! self.compress() def removeSong(self, index): Index: playlist.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.pyc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsz9vfRd and /tmp/cvs8T1SKj differ Index: song.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/song.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** song.py 10 Sep 2003 19:12:35 -0000 1.1.1.1 --- song.py 20 Sep 2003 17:08:48 -0000 1.2 *************** *** 35,36 **** --- 35,39 ---- def getLength(self): return self.length + + def getBitrate(self): + return "n/a" Index: song.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/song.pyc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsXcDZlh and /tmp/cvsEW1qwo differ |