pyamp-cvs Mailing List for Pyamp: yet another music player
Status: Alpha
Brought to you by:
sayap
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(25) |
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(8) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sa...@us...> - 2004-01-10 19:13:43
|
Update of /cvsroot/pyamp/pyamp/src/translations In directory sc8-pr-cvs1:/tmp/cvs-serv17929/src/translations Removed Files: pyamp.pro pyamp_zh_TW.qm pyamp_zh_TW.ts Log Message: --- pyamp.pro DELETED --- --- pyamp_zh_TW.qm DELETED --- --- pyamp_zh_TW.ts DELETED --- |
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv17929/src Removed Files: __init__.py config.py fontbutton.py listitem.py mainwindow.py mp3song.py oggsong.py optiondialog.py playlist.py pyamp.profile pyamp.py pyamp.timings searchdialog.py searchitem.py song.py songfactory.py songslider.py songthread.py songtimer.py stack.py systemtray.py tooltip.py uninstall.py wavsong.py Log Message: --- __init__.py DELETED --- --- config.py DELETED --- --- fontbutton.py DELETED --- --- listitem.py DELETED --- --- mainwindow.py DELETED --- --- mp3song.py DELETED --- --- oggsong.py DELETED --- --- optiondialog.py DELETED --- --- playlist.py DELETED --- --- pyamp.profile DELETED --- --- pyamp.py DELETED --- --- pyamp.timings DELETED --- --- searchdialog.py DELETED --- --- searchitem.py DELETED --- --- song.py DELETED --- --- songfactory.py DELETED --- --- songslider.py DELETED --- --- songthread.py DELETED --- --- songtimer.py DELETED --- --- stack.py DELETED --- --- systemtray.py DELETED --- --- tooltip.py DELETED --- --- uninstall.py DELETED --- --- wavsong.py DELETED --- |
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv17503/src Modified Files: listitem.py optiondialog.py pyamp.py songthread.py tooltip.py Added Files: pyamp.profile pyamp.timings Log Message: --- NEW FILE: pyamp.profile --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pyamp.timings --- (This appears to be a binary file; contents omitted.) Index: listitem.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/listitem.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** listitem.py 26 Sep 2003 04:51:32 -0000 1.3 --- listitem.py 10 Jan 2004 19:11:19 -0000 1.4 *************** *** 31,64 **** # Font and color settings for all ListItem's are stored as class variables # for faster access ! config = Config.config() ! transparency = False ! normalBase = QColor() ! normalText = QColor() ! normalFont = QFont() ! selectedBase = QColor() ! selectedText = QColor() ! selectedFont = QFont() ! playingBase = QColor() ! playingText = QColor() ! playingFont = QFont() ! playSelBase = QColor() ! playSelText = QColor() ! playSelFont = QFont() def readConfig(self): ! self.config.setGroup("appearance") ! self.transparency = self.config.readBoolEntry("transparency") ! self.normalBase = self.config.readColorEntry("normalBase") ! self.normalText = self.config.readColorEntry("normalText") ! self.normalFont = self.config.readFontEntry("normalFont") ! self.selectedBase = self.config.readColorEntry("selectedBase") ! self.selectedText = self.config.readColorEntry("selectedText") ! self.selectedFont = self.config.readFontEntry("selectedFont") ! self.playingBase = self.config.readColorEntry("playingBase") ! self.playingText = self.config.readColorEntry("playingText") ! self.playingFont = self.config.readFontEntry("playingFont") ! self.playSelBase = self.config.readColorEntry("playSelBase") ! self.playSelText = self.config.readColorEntry("playSelText") ! self.playSelFont = self.config.readFontEntry("playSelFont") readConfig = classmethod(readConfig) --- 31,64 ---- # Font and color settings for all ListItem's are stored as class variables # for faster access ! _transparency = False ! _normalBase = QColor() ! _normalText = QColor() ! _normalFont = QFont() ! _selectedBase = QColor() ! _selectedText = QColor() ! _selectedFont = QFont() ! _playingBase = QColor() ! _playingText = QColor() ! _playingFont = QFont() ! _playSelBase = QColor() ! _playSelText = QColor() ! _playSelFont = QFont() def readConfig(self): ! config = Config.config() ! config.setGroup("appearance") ! self._transparency = config.readBoolEntry("transparency") ! self._normalBase = config.readColorEntry("normalBase") ! self._normalText = config.readColorEntry("normalText") ! self._normalFont = config.readFontEntry("normalFont") ! self._selectedBase = config.readColorEntry("selectedBase") ! self._selectedText = config.readColorEntry("selectedText") ! self._selectedFont = config.readFontEntry("selectedFont") ! self._playingBase = config.readColorEntry("playingBase") ! self._playingText = config.readColorEntry("playingText") ! self._playingFont = config.readFontEntry("playingFont") ! self._playSelBase = config.readColorEntry("playSelBase") ! self._playSelText = config.readColorEntry("playSelText") ! self._playSelFont = config.readFontEntry("playSelFont") readConfig = classmethod(readConfig) *************** *** 105,124 **** if self.isPlaying(): if self.isSelected(): ! cg.setColor(QColorGroup.Highlight, self.playSelBase) ! cg.setColor(QColorGroup.HighlightedText, self.playSelText) ! p.setFont(self.playSelFont) else: ! cg.setColor(QColorGroup.Base, self.playingBase) ! cg.setColor(QColorGroup.Text, self.playingText) ! p.setFont(self.playingFont) elif self.isSelected(): ! cg.setColor(QColorGroup.Highlight, self.selectedBase) ! cg.setColor(QColorGroup.HighlightedText, self.selectedText) ! p.setFont(self.selectedFont) else: ! if not self.transparency: ! cg.setColor(QColorGroup.Base, self.normalBase) ! cg.setColor(QColorGroup.Text, self.normalText) ! p.setFont(self.normalFont) QListViewItem.paintCell(self, p, cg, column, width, align) --- 105,124 ---- if self.isPlaying(): if self.isSelected(): ! cg.setColor(QColorGroup.Highlight, self._playSelBase) ! cg.setColor(QColorGroup.HighlightedText, self._playSelText) ! p.setFont(self._playSelFont) else: ! cg.setColor(QColorGroup.Base, self._playingBase) ! cg.setColor(QColorGroup.Text, self._playingText) ! p.setFont(self._playingFont) elif self.isSelected(): ! cg.setColor(QColorGroup.Highlight, self._selectedBase) ! cg.setColor(QColorGroup.HighlightedText, self._selectedText) ! p.setFont(self._selectedFont) else: ! if not self._transparency: ! cg.setColor(QColorGroup.Base, self._normalBase) ! cg.setColor(QColorGroup.Text, self._normalText) ! p.setFont(self._normalFont) QListViewItem.paintCell(self, p, cg, column, width, align) Index: optiondialog.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/optiondialog.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** optiondialog.py 26 Sep 2003 04:51:32 -0000 1.1 --- optiondialog.py 10 Jan 2004 19:11:19 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- from fontbutton import FontButton from listitem import ListItem + from songthread import Devices from config import Config *************** *** 28,31 **** --- 29,37 ---- QTabDialog.__init__(self, parent) self.config = Config.config() + + self.playbackTab = QWidget(self) + self.createPlaybackTab() + self.addTab(self.playbackTab, "Playback") + self.appearanceTab = QWidget(self) self.createAppearanceTab() *************** *** 35,38 **** --- 41,45 ---- self.setApplyButton() self.connect(self, SIGNAL("applyButtonPressed()"), self.applyOptions) + self.connect(self.revertButton, SIGNAL("pressed()"), self.revertFonts) # Manually apply to initialize settings self.applyOptions() *************** *** 55,61 **** --- 62,89 ---- self.config.writeEntry("fade", self.fadeButton.color()) self.config.writeEntry("opacity", self.opacitySlider.value()) + self.config.setGroup("playback") + device = Devices.keys()[Devices.values().index(self.deviceCombo.currentText())] + self.config.writeEntry("device", device) ListItem.readConfig() self.parent().playList.readConfig() self.parent().playList.triggerUpdate() + self.parent().playList.songThread.setDevice(str(device)) + + def revertFonts(self): + self.normalBaseButton.setColor(KGlobalSettings.baseColor()) + self.normalTextButton.setColor(KGlobalSettings.textColor()) + self.normalFontButton.setFont(KGlobalSettings.generalFont()) + self.selectedBaseButton.setColor(KGlobalSettings.highlightColor()) + self.selectedTextButton.setColor(KGlobalSettings.highlightedTextColor()) + self.selectedFontButton.setFont(KGlobalSettings.generalFont()) + self.playingBaseButton.setColor(KGlobalSettings.highlightColor().dark()) + self.playingTextButton.setColor(KGlobalSettings.highlightedTextColor()) + self.playingFontButton.setFont(KGlobalSettings.generalFont()) + self.playSelBaseButton.setColor(KGlobalSettings.highlightColor()) + self.playSelTextButton.setColor(KGlobalSettings.highlightedTextColor()) + font = KGlobalSettings.generalFont() + font.setItalic(True) + self.playSelFontButton.setFont(font) + self.applyOptions() def createAppearanceTab(self): *************** *** 107,113 **** layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) - font = self.config.readFontEntry("playingFont", KGlobalSettings.generalFont()) baseColor = self.config.readColorEntry("playingBase", KGlobalSettings.highlightColor().dark()) textColor = self.config.readColorEntry("playingText", KGlobalSettings.highlightedTextColor()) self.playingBaseButton = KColorButton(baseColor, playingBox) self.playingTextButton = KColorButton(textColor, playingBox) --- 135,141 ---- layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) baseColor = self.config.readColorEntry("playingBase", KGlobalSettings.highlightColor().dark()) textColor = self.config.readColorEntry("playingText", KGlobalSettings.highlightedTextColor()) + font = self.config.readFontEntry("playingFont", KGlobalSettings.generalFont()) self.playingBaseButton = KColorButton(baseColor, playingBox) self.playingTextButton = KColorButton(textColor, playingBox) *************** *** 160,166 **** layout.addWidget(self.opacitySlider, 3, 1) boxLayout.addWidget(normalBox, 0, 0) boxLayout.addWidget(selectedBox, 0, 1) boxLayout.addWidget(playingBox, 1, 0) boxLayout.addWidget(playSelBox, 1, 1) ! boxLayout.addMultiCellWidget(transBox, 2, 2, 0, 1) --- 188,215 ---- layout.addWidget(self.opacitySlider, 3, 1) + self.revertButton = KPushButton("Revert all to KDE settings", self.appearanceTab) + boxLayout.addWidget(normalBox, 0, 0) boxLayout.addWidget(selectedBox, 0, 1) boxLayout.addWidget(playingBox, 1, 0) boxLayout.addWidget(playSelBox, 1, 1) ! boxLayout.addMultiCellWidget(self.revertButton, 2, 2, 0, 1, Qt.AlignCenter) ! boxLayout.addMultiCellWidget(transBox, 3, 3, 0, 1) ! ! def createPlaybackTab(self): ! boxLayout = QGridLayout(self.playbackTab) ! self.config.setGroup("playback") ! ! deviceBox = QGroupBox("Device", self.playbackTab) ! layout = QGridLayout(deviceBox, 2, 1, deviceBox.insideMargin(), 1) ! layout.setRowSpacing(0, 6) ! self.deviceCombo = KComboBox(deviceBox) ! self.deviceCombo.insertStrList(Devices.values()) ! try: ! deviceStr = Devices[str(self.config.readEntry("device", Devices.keys()[0]))] ! except KeyError: ! deviceStr = Devices[Devices.keys()[0]] ! self.deviceCombo.setCurrentText(deviceStr) ! layout.addWidget(self.deviceCombo, 1, 0, Qt.AlignLeft) ! ! boxLayout.addWidget(deviceBox, 0, 0, Qt.AlignTop) Index: pyamp.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/pyamp.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pyamp.py 26 Sep 2003 05:21:00 -0000 1.4 --- pyamp.py 10 Jan 2004 19:11:19 -0000 1.5 *************** *** 16,19 **** --- 16,21 ---- # along with Pyamp; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + import psyco + psyco.profile() from qt import * Index: songthread.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/songthread.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** songthread.py 5 Jan 2004 00:34:13 -0000 1.3 --- songthread.py 10 Jan 2004 19:11:19 -0000 1.4 *************** *** 18,25 **** from qt import * from time import sleep ! from ao import AudioDevice from songfactory import SongFactory class SongThread(QThread): --- 18,44 ---- from qt import * + from kdecore import * from time import sleep ! from ao import AudioDevice, aoError from songfactory import SongFactory + Devices = { + "alsa09" : "ALSA", + "oss" : "OSS", + "esd" : "Esound", + "arts" : "aRts", + "alsa" : "ALSA pre 0.9", + } + + for device in Devices.keys(): + try: + AudioDevice(device) + except aoError: + print Devices[device], "not supported" + Devices.pop(device) + if not Devices: + print "No audio device available" + KApplication.exit() + class SongThread(QThread): *************** *** 30,34 **** NEXT_EVENT = 1001 TICK_EVENT = 1002 ! def __init__(self, receiver): QThread.__init__(self) --- 49,53 ---- NEXT_EVENT = 1001 TICK_EVENT = 1002 ! def __init__(self, receiver): QThread.__init__(self) *************** *** 68,78 **** # Song factory return None for invalid song if song is not None: - #~ self.dev = ossaudiodev.open("w") - #~ apply(self.dev.setparameters, song.getParameters()) - self.dev = AudioDevice('alsa09', rate=44100) self.song = song self.fullpath = fullpath ! def terminte(self): self.terminated = True --- 87,98 ---- # Song factory return None for invalid song if song is not None: self.song = song self.fullpath = fullpath ! def setDevice(self, device): ! self.dev = AudioDevice(device, rate=44100) ! self.device = device ! ! def terminate(self): self.terminated = True Index: tooltip.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/tooltip.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tooltip.py 26 Sep 2003 04:51:32 -0000 1.2 --- tooltip.py 10 Jan 2004 19:11:19 -0000 1.3 *************** *** 26,30 **** fullpath = item.getFullpath() song = SongFactory.newSong(fullpath) - sample, bits, channels, format = song.getParameters() bitrate = song.getBitrate() length = song.getLength() --- 26,29 ---- *************** *** 34,39 **** + "\nLength: " + secondsToStr(length) \ + "\nFile size: " + str(path.getsize(fullpath)) + " bytes" \ ! + "\nSample Frequency: " + str(sample) + " Hz" \ + "\nBitrate: " + str(bitrate) + " kb/s" \ ! + "\nChannels: " + str(channels) self.tip(rect, text) --- 33,38 ---- + "\nLength: " + secondsToStr(length) \ + "\nFile size: " + str(path.getsize(fullpath)) + " bytes" \ ! + "\nSample Frequency: " + str(44100) + " Hz" \ + "\nBitrate: " + str(bitrate) + " kb/s" \ ! + "\nChannels: " + str(2) self.tip(rect, text) |
From: <sa...@us...> - 2004-01-10 19:07:37
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv16883 Modified Files: pyamp.e3p pyamp.e3s setup.py Log Message: *** Index: pyamp.e3p =================================================================== RCS file: /cvsroot/pyamp/pyamp/pyamp.e3p,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyamp.e3p 5 Jan 2004 00:36:16 -0000 1.1 --- pyamp.e3p 10 Jan 2004 19:07:34 -0000 1.2 *************** *** 1,104 **** <?xml version='1.0' encoding='UTF-8'?> <!--Project file for project pyamp--> ! <!--Saved: 2004-01-04, 18:30:56--> ! <!--Copyright (C) 2004 , --> <Project> ! <Author></Author> ! <Email></Email> <Sources> <Source> ! <Dir>src</Dir> <Name>mp3song.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>uninstall.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>searchitem.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>fontbutton.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>systemtray.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>config.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>tooltip.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>listitem.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>song.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>wavsong.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>songslider.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>pyamp.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>oggsong.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>stack.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>mainwindow.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>__init__.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>searchdialog.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>playlist.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>songthread.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>optiondialog.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>songfactory.py</Name> </Source> <Source> ! <Dir>src</Dir> <Name>songtimer.py</Name> </Source> - <Source> - <Name>sitecustomize.py</Name> - </Source> - <Source> - <Name>setup.py</Name> - </Source> </Sources> <Forms> --- 1,106 ---- <?xml version='1.0' encoding='UTF-8'?> <!--Project file for project pyamp--> ! <!--Saved: 2004-01-10, 13:06:58--> ! <!--Copyright (C) 2004 sayap, sa...@us...--> <Project> ! <Description></Description> ! <Version>0.1.3</Version> ! <Author>sayap</Author> ! <Email>sa...@us...</Email> <Sources> <Source> ! <Name>sitecustomize.py</Name> ! </Source> ! <Source> ! <Name>setup.py</Name> ! </Source> ! <Source> ! <Dir>pyamp</Dir> <Name>mp3song.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>uninstall.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>searchitem.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>fontbutton.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>systemtray.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>config.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>tooltip.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>listitem.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>song.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>wavsong.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>songslider.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>pyamp.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>oggsong.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>stack.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>mainwindow.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>__init__.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>searchdialog.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>playlist.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>songthread.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>optiondialog.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>songfactory.py</Name> </Source> <Source> ! <Dir>pyamp</Dir> <Name>songtimer.py</Name> </Source> </Sources> <Forms> *************** *** 110,113 **** --- 112,119 ---- <Others> </Others> + <MainScript> + <Dir>pyamp</Dir> + <Name>pyamp.py</Name> + </MainScript> <Vcs> <VcsType>CVS</VcsType> Index: pyamp.e3s =================================================================== RCS file: /cvsroot/pyamp/pyamp/pyamp.e3s,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pyamp.e3s 5 Jan 2004 00:41:58 -0000 1.2 --- pyamp.e3s 10 Jan 2004 19:07:34 -0000 1.3 *************** *** 2,11 **** <!--eric3 session file for project pyamp--> <!--This file was generated automatically, do not edit.--> ! <!--Saved: 2004-01-04, 18:36:57--> <Session> <Filenames> - <Filename>/home/sayap/Projects/pyamp/src/mainwindow.py</Filename> </Filenames> - <ActiveWindow>/home/sayap/Projects/pyamp/src/mainwindow.py</ActiveWindow> <Breakpoints> </Breakpoints> --- 2,9 ---- <!--eric3 session file for project pyamp--> <!--This file was generated automatically, do not edit.--> ! <!--Saved: 2004-01-10, 13:06:43--> <Session> <Filenames> </Filenames> <Breakpoints> </Breakpoints> Index: setup.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/setup.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** setup.py 5 Jan 2004 00:34:13 -0000 1.4 --- setup.py 10 Jan 2004 19:07:34 -0000 1.5 *************** *** 27,34 **** tranfiles = [] ! files = listdir("src/translations") for file in files: if file != "CVS": ! tranfiles.append("src/translations/" + file) try: --- 27,34 ---- tranfiles = [] ! files = listdir("pyamp/translations") for file in files: if file != "CVS": ! tranfiles.append("pyamp/translations/" + file) try: *************** *** 43,47 **** author_email = "sa...@us...", url = "http://pyamp.sf.net/", ! package_dir = {"pyamp" : "src"}, packages = ["pyamp"], data_files = [(icondir + '/16x16/apps', ['share/icons/16x16/pyamp.png']), --- 43,47 ---- author_email = "sa...@us...", url = "http://pyamp.sf.net/", ! package_dir = {"pyamp" : "pyamp"}, packages = ["pyamp"], data_files = [(icondir + '/16x16/apps', ['share/icons/16x16/pyamp.png']), |
From: <sa...@us...> - 2004-01-05 00:42:01
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv27195 Modified Files: pyamp.e3s Log Message: *** Index: pyamp.e3s =================================================================== RCS file: /cvsroot/pyamp/pyamp/pyamp.e3s,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyamp.e3s 5 Jan 2004 00:36:16 -0000 1.1 --- pyamp.e3s 5 Jan 2004 00:41:58 -0000 1.2 *************** *** 2,6 **** <!--eric3 session file for project pyamp--> <!--This file was generated automatically, do not edit.--> ! <!--Saved: 2004-01-04, 18:35:25--> <Session> <Filenames> --- 2,6 ---- <!--eric3 session file for project pyamp--> <!--This file was generated automatically, do not edit.--> ! <!--Saved: 2004-01-04, 18:36:57--> <Session> <Filenames> |
From: <sa...@us...> - 2004-01-05 00:36:19
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv26404 Added Files: pyamp.e3p pyamp.e3s Log Message: added eric3 project files --- NEW FILE: pyamp.e3p --- <?xml version='1.0' encoding='UTF-8'?> <!--Project file for project pyamp--> <!--Saved: 2004-01-04, 18:30:56--> <!--Copyright (C) 2004 , --> <Project> <Author></Author> <Email></Email> <Sources> <Source> <Dir>src</Dir> <Name>mp3song.py</Name> </Source> <Source> <Dir>src</Dir> <Name>uninstall.py</Name> </Source> <Source> <Dir>src</Dir> <Name>searchitem.py</Name> </Source> <Source> <Dir>src</Dir> <Name>fontbutton.py</Name> </Source> <Source> <Dir>src</Dir> <Name>systemtray.py</Name> </Source> <Source> <Dir>src</Dir> <Name>config.py</Name> </Source> <Source> <Dir>src</Dir> <Name>tooltip.py</Name> </Source> <Source> <Dir>src</Dir> <Name>listitem.py</Name> </Source> <Source> <Dir>src</Dir> <Name>song.py</Name> </Source> <Source> <Dir>src</Dir> <Name>wavsong.py</Name> </Source> <Source> <Dir>src</Dir> <Name>songslider.py</Name> </Source> <Source> <Dir>src</Dir> <Name>pyamp.py</Name> </Source> <Source> <Dir>src</Dir> <Name>oggsong.py</Name> </Source> <Source> <Dir>src</Dir> <Name>stack.py</Name> </Source> <Source> <Dir>src</Dir> <Name>mainwindow.py</Name> </Source> <Source> <Dir>src</Dir> <Name>__init__.py</Name> </Source> <Source> <Dir>src</Dir> <Name>searchdialog.py</Name> </Source> <Source> <Dir>src</Dir> <Name>playlist.py</Name> </Source> <Source> <Dir>src</Dir> <Name>songthread.py</Name> </Source> <Source> <Dir>src</Dir> <Name>optiondialog.py</Name> </Source> <Source> <Dir>src</Dir> <Name>songfactory.py</Name> </Source> <Source> <Dir>src</Dir> <Name>songtimer.py</Name> </Source> <Source> <Name>sitecustomize.py</Name> </Source> <Source> <Name>setup.py</Name> </Source> </Sources> <Forms> </Forms> <Translations> </Translations> <Interfaces> </Interfaces> <Others> </Others> <Vcs> <VcsType>CVS</VcsType> <VcsOptions>{'status': ['-v'], 'log': [''], 'global': ['-f'], 'update': ['-dP'], 'remove': ['-f'], 'add': [''], 'tag': ['-c'], 'export': [''], 'diff': ['-u3', '-p'], 'commit': [''], 'checkout': [''], 'history': ['-e', '-a']}</VcsOptions> </Vcs> </Project> --- NEW FILE: pyamp.e3s --- <?xml version='1.0' encoding='UTF-8'?> <!--eric3 session file for project pyamp--> <!--This file was generated automatically, do not edit.--> <!--Saved: 2004-01-04, 18:35:25--> <Session> <Filenames> <Filename>/home/sayap/Projects/pyamp/src/mainwindow.py</Filename> </Filenames> <ActiveWindow>/home/sayap/Projects/pyamp/src/mainwindow.py</ActiveWindow> <Breakpoints> </Breakpoints> <DebugInfo> <CommandLine></CommandLine> <WorkingDirectory></WorkingDirectory> <ReportExceptions value="1" /> <Exceptions> </Exceptions> </DebugInfo> <Bookmarks> </Bookmarks> </Session> |
From: <sa...@us...> - 2004-01-05 00:34:16
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv26053/src Modified Files: mainwindow.py mp3song.py playlist.py songthread.py Log Message: using pyao instead of python built-in audio device Index: mainwindow.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mainwindow.py 26 Sep 2003 04:51:32 -0000 1.6 --- mainwindow.py 5 Jan 2004 00:34:13 -0000 1.7 *************** *** 617,621 **** def exit(self): ! KApplication.kApplication().quit() def queryClose(self): --- 617,621 ---- def exit(self): ! KApplication.exit() def queryClose(self): Index: mp3song.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mp3song.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mp3song.py 20 Sep 2003 17:08:48 -0000 1.2 --- mp3song.py 5 Jan 2004 00:34:13 -0000 1.3 *************** *** 20,24 **** from mad import MadFile from time import sleep ! import linuxaudiodev class Mp3Song(Song): --- 20,24 ---- from mad import MadFile from time import sleep ! import ossaudiodev class Mp3Song(Song): *************** *** 36,40 **** def getParameters(self): ! return (self.sampleRate, 16, 2, linuxaudiodev.AFMT_S16_NE) def getBitrate(self): --- 36,40 ---- def getParameters(self): ! return (ossaudiodev.AFMT_S16_LE, 2, self.sampleRate) def getBitrate(self): Index: playlist.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** playlist.py 3 Oct 2003 08:29:46 -0000 1.7 --- playlist.py 5 Jan 2004 00:34:13 -0000 1.8 *************** *** 100,103 **** --- 100,105 ---- SIGNAL("backgroundUpdated(const QPixmap &)"), self.updateBackground) + color = self.config.readColorEntry("normalBase") + self.setPaletteBackgroundColor(color) except: pass *************** *** 308,311 **** --- 310,314 ---- self.getPlayingSong().setPlaying(False) if song is None: + self.setPlaying(False) self.songThread.pause() name = "" Index: songthread.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/songthread.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** songthread.py 29 Sep 2003 03:34:04 -0000 1.2 --- songthread.py 5 Jan 2004 00:34:13 -0000 1.3 *************** *** 19,23 **** from qt import * from time import sleep ! import linuxaudiodev from songfactory import SongFactory --- 19,23 ---- from qt import * from time import sleep ! from ao import AudioDevice from songfactory import SongFactory *************** *** 48,54 **** buf = self.song.read() if buf: ! while self.dev.obuffree() < len(buf): ! sleep(0.1) ! self.dev.write(buf) time = self.song.getCurrentTime() else: --- 48,55 ---- buf = self.song.read() if buf: ! #~ while self.dev.obuffree() < len(buf): ! #~ sleep(0.1) ! #~ self.dev.write(buf) ! self.dev.play(buf, len(buf)) time = self.song.getCurrentTime() else: *************** *** 67,72 **** # Song factory return None for invalid song if song is not None: ! self.dev = linuxaudiodev.open("w") ! apply(self.dev.setparameters, song.getParameters()) self.song = song self.fullpath = fullpath --- 68,74 ---- # Song factory return None for invalid song if song is not None: ! #~ self.dev = ossaudiodev.open("w") ! #~ apply(self.dev.setparameters, song.getParameters()) ! self.dev = AudioDevice('alsa09', rate=44100) self.song = song self.fullpath = fullpath |
From: <sa...@us...> - 2004-01-05 00:34:16
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv26053 Modified Files: setup.py Log Message: using pyao instead of python built-in audio device Index: setup.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/setup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** setup.py 26 Sep 2003 05:11:25 -0000 1.3 --- setup.py 5 Jan 2004 00:34:13 -0000 1.4 *************** *** 29,33 **** files = listdir("src/translations") for file in files: ! tranfiles.append("src/translations/" + file) try: --- 29,34 ---- files = listdir("src/translations") for file in files: ! if file != "CVS": ! tranfiles.append("src/translations/" + file) try: |
From: <sa...@us...> - 2003-10-03 08:29:50
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv20057/src Modified Files: playlist.py Log Message: added text drag-n-drop support Index: playlist.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** playlist.py 29 Sep 2003 03:34:04 -0000 1.6 --- playlist.py 3 Oct 2003 08:29:46 -0000 1.7 *************** *** 136,143 **** def songDropped(self, event, item): list = [] ! filelist = QStringList() ! QUriDrag.decodeLocalFiles(event, filelist) ! for fullpath in filelist: ! list.append(str(fullpath)) if self.mode != self.NOSORT: --- 136,148 ---- def songDropped(self, event, item): list = [] ! if QUriDrag.canDecode(event): ! filelist = QStringList() ! if QUriDrag.decodeLocalFiles(event, filelist): ! for fullpath in filelist: ! list.append(str(fullpath)) ! elif QTextDrag.canDecode(event): ! fullpath = QString() ! if QTextDrag.decode(event, fullpath): ! list.append(str(fullpath)) if self.mode != self.NOSORT: |
From: <sa...@us...> - 2003-09-29 03:34:21
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv32691/src Modified Files: playlist.py songthread.py Log Message: Fixed the bahavior of repeat/target mode Index: playlist.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** playlist.py 26 Sep 2003 04:51:32 -0000 1.5 --- playlist.py 29 Sep 2003 03:34:04 -0000 1.6 *************** *** 108,115 **** self.setPaletteBackgroundPixmap(pixmap) - def acceptDrag(self, event): - #~ return self.acceptDrops() and self.itemsMovable() and event.source() == self - return True - def customEvent(self, event): # We get a next event from songThread when the current song has --- 108,111 ---- *************** *** 117,125 **** if event.type() == SongThread.NEXT_EVENT: if self.isTarget(): ! # replay the same song when in target mode ! self.setPlayingSong(self.getPlayingSong()) else: self.next() ! self.songThread.play() # We get a tick event from songThread once every second when it is # playing --- 113,127 ---- if event.type() == SongThread.NEXT_EVENT: if self.isTarget(): ! # replay the same song when in target and repeat mode ! if self.isRepeat(): ! self.setPlayingSong(self.getPlayingSong()) ! self.songThread.play() ! # target - repeat = single song playing mode ! else: ! self.stop() else: self.next() ! if self.isPlaying(): ! self.songThread.play() # We get a tick event from songThread once every second when it is # playing *************** *** 128,131 **** --- 130,137 ---- self.emit(PYSIGNAL("ticked(int)"), (time,)) + def acceptDrag(self, event): + #~ return self.acceptDrops() and self.itemsMovable() and event.source() == self + return True + def songDropped(self, event, item): list = [] *************** *** 297,307 **** self.getPlayingSong().setPlaying(False) if song is None: - self.setPlaying(False) self.songThread.pause() name = "" length = 0 else: - self.played.upush(song.getIndex()) song.setPlaying(True) self.songThread.setSong(song.getFullpath()) name = song.getName() --- 303,312 ---- self.getPlayingSong().setPlaying(False) if song is None: self.songThread.pause() name = "" length = 0 else: song.setPlaying(True) + self.played.upush(song.getIndex()) self.songThread.setSong(song.getFullpath()) name = song.getName() Index: songthread.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/songthread.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** songthread.py 10 Sep 2003 19:12:38 -0000 1.1.1.1 --- songthread.py 29 Sep 2003 03:34:04 -0000 1.2 *************** *** 51,60 **** sleep(0.1) self.dev.write(buf) else: event = QCustomEvent(self.NEXT_EVENT) QApplication.postEvent(self.receiver, event) self.stopped = True ! continue ! time = self.song.getCurrentTime() if self.time != time: self.time = time --- 51,60 ---- sleep(0.1) self.dev.write(buf) + time = self.song.getCurrentTime() else: event = QCustomEvent(self.NEXT_EVENT) QApplication.postEvent(self.receiver, event) self.stopped = True ! time = self.song.getLength() if self.time != time: self.time = time |
From: <sa...@us...> - 2003-09-26 06:01:07
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv24686/src Added Files: searchdialog.py Log Message: |
From: <sa...@us...> - 2003-09-26 06:00:28
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv24438/src Removed Files: searchdialog.py Log Message: --- searchdialog.py DELETED --- |
From: <sa...@us...> - 2003-09-26 05:59:15
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv24198 Modified Files: MANIFEST NEWS Log Message: Added new news Index: MANIFEST =================================================================== RCS file: /cvsroot/pyamp/pyamp/MANIFEST,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST 15 Sep 2003 11:38:12 -0000 1.2 --- MANIFEST 26 Sep 2003 05:59:11 -0000 1.3 *************** *** 14,21 **** --- 14,24 ---- share/icons/32x32/pyamp.png src/__init__.py + src/config.py + src/fontbutton.py src/listitem.py src/mainwindow.py src/mp3song.py src/oggsong.py + src/optiondialog.py src/playlist.py src/pyamp.py *************** *** 29,32 **** --- 32,36 ---- src/stack.py src/systemtray.py + src/tooltip.py src/uninstall.py src/wavsong.py Index: NEWS =================================================================== RCS file: /cvsroot/pyamp/pyamp/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NEWS 15 Sep 2003 11:38:12 -0000 1.2 --- NEWS 26 Sep 2003 05:59:11 -0000 1.3 *************** *** 1,4 **** Pyamp 0.1.2 released - September 15, 2003 ! ======================================== This release features some UI improvements and translation support. --- 1,11 ---- + Pyamp 0.1.3 released - September 26, 2003 + ========================================= + Another release with UI improvements and bug fixed :) + You can now change the font, color, and transparency for the playlist, as + well as show/hide the menu and toolbars. This release also features a + convenient tooltip, and searching can now be done with just keyboard. + Pyamp 0.1.2 released - September 15, 2003 ! ========================================= This release features some UI improvements and translation support. |
From: <sa...@us...> - 2003-09-26 05:21:04
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv19342/src Modified Files: pyamp.py Log Message: Update version info Index: pyamp.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/pyamp.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pyamp.py 26 Sep 2003 04:51:32 -0000 1.3 --- pyamp.py 26 Sep 2003 05:21:00 -0000 1.4 *************** *** 82,86 **** def main(): setappdefaultencoding(getdefaultlocale()[1]) ! about = KAboutData("pyamp", "Pyamp", "0.1.2", "Pyamp: yet another music player", KAboutData.License_GPL, "(c) 2003, Sok Ann Yap", --- 82,86 ---- def main(): setappdefaultencoding(getdefaultlocale()[1]) ! about = KAboutData("pyamp", "Pyamp", "0.1.3", "Pyamp: yet another music player", KAboutData.License_GPL, "(c) 2003, Sok Ann Yap", |
From: <sa...@us...> - 2003-09-26 05:19:47
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv19167 Modified Files: INSTALL Log Message: Updated installation instruction Index: INSTALL =================================================================== RCS file: /cvsroot/pyamp/pyamp/INSTALL,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** INSTALL 10 Sep 2003 19:12:33 -0000 1.1.1.1 --- INSTALL 26 Sep 2003 05:19:44 -0000 1.2 *************** *** 2,6 **** ============ ! As root, go to the directory where you extract Pyamp, and type: python setup.py install --- 2,9 ---- ============ ! First, go to the directory where you extract Pyamp, and type: ! python setup.py build ! ! Then, as root, type: python setup.py install |
From: <sa...@us...> - 2003-09-26 05:19:47
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv19167/src Modified Files: uninstall.py Log Message: Updated installation instruction Index: uninstall.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/uninstall.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** uninstall.py 15 Sep 2003 11:38:13 -0000 1.2 --- uninstall.py 26 Sep 2003 05:19:44 -0000 1.3 *************** *** 32,37 **** chdir(dir) icondir = environ["KDEDIR"] + "/share/icons/default.kde" ! menudir = environ["KDEDIR"] + "/share/applnk/Multimedia" ! appsdir = environ["KDEDIR"] + "/share/apps" remove(icondir + "/16x16/apps/pyamp.png") remove(icondir + "/22x22/apps/pyamp.png") --- 32,37 ---- chdir(dir) icondir = environ["KDEDIR"] + "/share/icons/default.kde" ! menudir = environ["KDEDIRS"] + "/share/applnk/Multimedia" ! appsdir = environ["KDEDIRS"] + "/share/apps" remove(icondir + "/16x16/apps/pyamp.png") remove(icondir + "/22x22/apps/pyamp.png") |
From: <sa...@us...> - 2003-09-26 05:11:29
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv18060 Modified Files: ChangeLog setup.py Log Message: Changed some installation destinations Index: ChangeLog =================================================================== RCS file: /cvsroot/pyamp/pyamp/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChangeLog 26 Sep 2003 04:51:32 -0000 1.5 --- ChangeLog 26 Sep 2003 05:11:25 -0000 1.6 *************** *** 1,3 **** ! Version 0.1.3 - Customizable playlist font, color, and transparency - Capable to show/hide menu and toolbars --- 1,3 ---- ! Version 0.1.3 - September 26, 2003 - Customizable playlist font, color, and transparency - Capable to show/hide menu and toolbars Index: setup.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/setup.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.py 15 Sep 2003 11:38:12 -0000 1.2 --- setup.py 26 Sep 2003 05:11:25 -0000 1.3 *************** *** 22,27 **** icondir = environ["KDEDIR"] + "/share/icons/default.kde" ! menudir = environ["KDEDIR"] + "/share/applnk/Multimedia" ! appsdir = environ["KDEDIR"] + "/share/apps" pydir = prefix + "/lib/python" + version[:3] + "/site-packages" --- 22,27 ---- icondir = environ["KDEDIR"] + "/share/icons/default.kde" ! menudir = environ["KDEDIRS"] + "/share/applnk/Multimedia" ! appsdir = environ["KDEDIRS"] + "/share/apps" pydir = prefix + "/lib/python" + version[:3] + "/site-packages" *************** *** 38,42 **** setup(name = "pyamp", ! version = "0.1.2", author = "Sok Ann Yap", author_email = "sa...@us...", --- 38,42 ---- setup(name = "pyamp", ! version = "0.1.3", author = "Sok Ann Yap", author_email = "sa...@us...", |
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv15629/src Removed Files: listitem.pyc mainwindow.pyc mp3song.pyc oggsong.pyc playlist.pyc searchdialog.pyc searchitem.pyc song.pyc songfactory.pyc songslider.pyc songthread.pyc songtimer.pyc stack.pyc systemtray.pyc tooltip.pyc wavsong.pyc Log Message: remove .pyc files --- listitem.pyc DELETED --- --- mainwindow.pyc DELETED --- --- mp3song.pyc DELETED --- --- oggsong.pyc DELETED --- --- playlist.pyc DELETED --- --- searchdialog.pyc DELETED --- --- searchitem.pyc DELETED --- --- song.pyc DELETED --- --- songfactory.pyc DELETED --- --- songslider.pyc DELETED --- --- songthread.pyc DELETED --- --- songtimer.pyc DELETED --- --- stack.pyc DELETED --- --- systemtray.pyc DELETED --- --- tooltip.pyc DELETED --- --- wavsong.pyc DELETED --- |
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv14710/src Modified Files: listitem.py mainwindow.py playlist.py pyamp.py tooltip.py Added Files: config.py fontbutton.py optiondialog.py Log Message: Added GUI configuration menu, currently capable to customize playlist font, color, and transparency --- NEW FILE: config.py --- # Copyright 2003 Sok Ann Yap # # This file is part of Pyamp. # # Pyamp is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Pyamp is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Pyamp; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from kdecore import * class Config: _instance = KInstance("pyamp") _config = _instance.config() def config(self): return self._config config = classmethod(config) --- NEW FILE: fontbutton.py --- # Copyright 2003 Sok Ann Yap # # This file is part of Pyamp. # # Pyamp is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Pyamp is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Pyamp; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from qt import * from kdeui import * class FontButton(QPushButton): def __init__(self, parent, font): QPushButton.__init__(self, parent) self.font = QFont() self.dialog = KFontDialog(self) self.setFont(font) self.connect(self, SIGNAL("clicked()"), self.showFontDialog) self.connect(self.dialog, SIGNAL("okClicked()"), self.fontSelected) def showFontDialog(self): self.dialog.setFont(self.font) self.dialog.show() def fontSelected(self): self.setFont(self.dialog.font()) def setFont(self, font): QPushButton.setFont(self, font) text = str(font.family()) + " " + str(font.pointSize()) self.setText(text) self.font = font def getFont(self): return self.font --- NEW FILE: optiondialog.py --- # Copyright 2003 Sok Ann Yap # # This file is part of Pyamp. # # Pyamp is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Pyamp is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Pyamp; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from qt import * from kdeui import * from kdecore import * from fontbutton import FontButton from listitem import ListItem from config import Config class OptionDialog(QTabDialog): def __init__(self, parent): QTabDialog.__init__(self, parent) self.config = Config.config() self.appearanceTab = QWidget(self) self.createAppearanceTab() self.addTab(self.appearanceTab, "Appearance") self.setCancelButton() self.setApplyButton() self.connect(self, SIGNAL("applyButtonPressed()"), self.applyOptions) # Manually apply to initialize settings self.applyOptions() def applyOptions(self): self.config.setGroup("appearance") self.config.writeEntry("normalBase", self.normalBaseButton.color()) self.config.writeEntry("normalText", self.normalTextButton.color()) self.config.writeEntry("normalFont", self.normalFontButton.getFont()) self.config.writeEntry("selectedBase", self.selectedBaseButton.color()) self.config.writeEntry("selectedText", self.selectedTextButton.color()) self.config.writeEntry("selectedFont", self.selectedFontButton.getFont()) self.config.writeEntry("playingBase", self.playingBaseButton.color()) self.config.writeEntry("playingText", self.playingTextButton.color()) self.config.writeEntry("playingFont", self.playingFontButton.getFont()) self.config.writeEntry("playSelBase", self.playSelBaseButton.color()) self.config.writeEntry("playSelText", self.playSelTextButton.color()) self.config.writeEntry("playSelFont", self.playSelFontButton.getFont()) self.config.writeEntry("transparency", self.transCheckBox.isChecked()) self.config.writeEntry("fade", self.fadeButton.color()) self.config.writeEntry("opacity", self.opacitySlider.value()) ListItem.readConfig() self.parent().playList.readConfig() self.parent().playList.triggerUpdate() def createAppearanceTab(self): boxLayout = QGridLayout(self.appearanceTab) self.config.setGroup("appearance") normalBox = QGroupBox("Normal", self.appearanceTab) layout = QGridLayout(normalBox, 4, 2, normalBox.insideMargin(), 1) layout.setRowSpacing(0, 6) layout.setRowStretch(1, 1) layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) baseColor = self.config.readColorEntry("normalBase", KGlobalSettings.baseColor()) textColor = self.config.readColorEntry("normalText", KGlobalSettings.textColor()) font = self.config.readFontEntry("normalFont", KGlobalSettings.generalFont()) self.normalBaseButton = KColorButton(baseColor, normalBox) self.normalTextButton = KColorButton(textColor,normalBox) self.normalFontButton = FontButton(normalBox, font) layout.addWidget(QLabel("Base Color", normalBox), 1, 0) layout.addWidget(self.normalBaseButton, 1, 1) layout.addWidget(QLabel("Text Color", normalBox), 2, 0) layout.addWidget(self.normalTextButton, 2, 1) layout.addWidget(QLabel("Font", normalBox), 3, 0) layout.addWidget(self.normalFontButton, 3, 1) selectedBox = QGroupBox("Selected", self.appearanceTab) layout = QGridLayout(selectedBox, 4, 2, selectedBox.insideMargin(), 1) layout.setRowSpacing(0, 6) layout.setRowStretch(1, 1) layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) baseColor = self.config.readColorEntry("selectedBase", KGlobalSettings.highlightColor()) textColor = self.config.readColorEntry("selectedText", KGlobalSettings.highlightedTextColor()) font = self.config.readFontEntry("selectedFont", KGlobalSettings.generalFont()) self.selectedBaseButton = KColorButton(baseColor, selectedBox) self.selectedTextButton = KColorButton(textColor, selectedBox) self.selectedFontButton = FontButton(selectedBox, font) layout.addWidget(QLabel("Base Color", selectedBox), 1, 0) layout.addWidget(self.selectedBaseButton, 1, 1) layout.addWidget(QLabel("Text Color", selectedBox), 2, 0) layout.addWidget(self.selectedTextButton, 2, 1) layout.addWidget(QLabel("Font", selectedBox), 3, 0) layout.addWidget(self.selectedFontButton, 3, 1) playingBox = QGroupBox("Playing", self.appearanceTab) layout = QGridLayout(playingBox, 4, 2, playingBox.insideMargin(), 1) layout.setRowSpacing(0, 6) layout.setRowStretch(1, 1) layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) font = self.config.readFontEntry("playingFont", KGlobalSettings.generalFont()) baseColor = self.config.readColorEntry("playingBase", KGlobalSettings.highlightColor().dark()) textColor = self.config.readColorEntry("playingText", KGlobalSettings.highlightedTextColor()) self.playingBaseButton = KColorButton(baseColor, playingBox) self.playingTextButton = KColorButton(textColor, playingBox) self.playingFontButton = FontButton(playingBox, font) layout.addWidget(QLabel("Base Color", playingBox), 1, 0) layout.addWidget(self.playingBaseButton, 1, 1) layout.addWidget(QLabel("Text Color", playingBox), 2, 0) layout.addWidget(self.playingTextButton, 2, 1) layout.addWidget(QLabel("Font", playingBox), 3, 0) layout.addWidget(self.playingFontButton, 3, 1) playSelBox = QGroupBox("Playing+Selected", self.appearanceTab) layout = QGridLayout(playSelBox, 4, 2, playSelBox.insideMargin(), 1) layout.setRowSpacing(0, 6) layout.setRowStretch(1, 1) layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) baseColor = self.config.readColorEntry("playSelBase", KGlobalSettings.highlightColor()) textColor = self.config.readColorEntry("playSelText", KGlobalSettings.highlightedTextColor()) font = KGlobalSettings.generalFont() font.setItalic(True) font = self.config.readFontEntry("playSelFont", font) self.playSelBaseButton = KColorButton(baseColor, playSelBox) self.playSelTextButton = KColorButton(textColor, playSelBox) self.playSelFontButton = FontButton(playSelBox, font) layout.addWidget(QLabel("Base Color", playSelBox), 1, 0) layout.addWidget(self.playSelBaseButton, 1, 1) layout.addWidget(QLabel("Text Color", playSelBox), 2, 0) layout.addWidget(self.playSelTextButton, 2, 1) layout.addWidget(QLabel("Font", playSelBox), 3, 0) layout.addWidget(self.playSelFontButton, 3, 1) transBox = QGroupBox("Transparency", self.appearanceTab) layout = QGridLayout(transBox, 4, 2, transBox.insideMargin(), 1) layout.setRowSpacing(0, 6) layout.setRowStretch(1, 1) layout.setRowStretch(2, 1) layout.setRowStretch(3, 1) transparency = self.config.readBoolEntry("transparency", False) fade = self.config.readColorEntry("fade", QColor("black")) opacity = self.config.readNumEntry("opacity", 80) self.transCheckBox = QCheckBox("Enabled", transBox) self.transCheckBox.setChecked(transparency) self.fadeButton = KColorButton(fade, transBox) self.opacitySlider = QSlider(0, 100, 10, opacity, Qt.Horizontal, transBox) layout.addWidget(self.transCheckBox, 1, 0) layout.addWidget(QLabel("Fade to", transBox), 2, 0) layout.addWidget(self.fadeButton, 2, 1) layout.addWidget(QLabel("Opacity", transBox), 3, 0) layout.addWidget(self.opacitySlider, 3, 1) boxLayout.addWidget(normalBox, 0, 0) boxLayout.addWidget(selectedBox, 0, 1) boxLayout.addWidget(playingBox, 1, 0) boxLayout.addWidget(playSelBox, 1, 1) boxLayout.addMultiCellWidget(transBox, 2, 2, 0, 1) Index: listitem.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/listitem.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** listitem.py 15 Sep 2003 11:38:13 -0000 1.2 --- listitem.py 26 Sep 2003 04:51:32 -0000 1.3 *************** *** 19,23 **** --- 19,25 ---- from qt import * from kdeui import * + from kdecore import * from os import path + from config import Config class ListItem(QListViewItem): *************** *** 27,30 **** --- 29,66 ---- """ + # Font and color settings for all ListItem's are stored as class variables + # for faster access + config = Config.config() + transparency = False + normalBase = QColor() + normalText = QColor() + normalFont = QFont() + selectedBase = QColor() + selectedText = QColor() + selectedFont = QFont() + playingBase = QColor() + playingText = QColor() + playingFont = QFont() + playSelBase = QColor() + playSelText = QColor() + playSelFont = QFont() + + def readConfig(self): + self.config.setGroup("appearance") + self.transparency = self.config.readBoolEntry("transparency") + self.normalBase = self.config.readColorEntry("normalBase") + self.normalText = self.config.readColorEntry("normalText") + self.normalFont = self.config.readFontEntry("normalFont") + self.selectedBase = self.config.readColorEntry("selectedBase") + self.selectedText = self.config.readColorEntry("selectedText") + self.selectedFont = self.config.readFontEntry("selectedFont") + self.playingBase = self.config.readColorEntry("playingBase") + self.playingText = self.config.readColorEntry("playingText") + self.playingFont = self.config.readFontEntry("playingFont") + self.playSelBase = self.config.readColorEntry("playSelBase") + self.playSelText = self.config.readColorEntry("playSelText") + self.playSelFont = self.config.readFontEntry("playSelFont") + readConfig = classmethod(readConfig) + def __init__(self, parent, index, fullpath): QListViewItem.__init__(self, parent) *************** *** 68,76 **** cg = QColorGroup(cg) if self.isPlaying(): - cg.setColor(QColorGroup.Base, QColor(173, 235, 255)) if self.isSelected(): ! f = p.font() ! f.setItalic(True) ! p.setFont(f) QListViewItem.paintCell(self, p, cg, column, width, align) --- 104,124 ---- cg = QColorGroup(cg) if self.isPlaying(): if self.isSelected(): ! cg.setColor(QColorGroup.Highlight, self.playSelBase) ! cg.setColor(QColorGroup.HighlightedText, self.playSelText) ! p.setFont(self.playSelFont) ! else: ! cg.setColor(QColorGroup.Base, self.playingBase) ! cg.setColor(QColorGroup.Text, self.playingText) ! p.setFont(self.playingFont) ! elif self.isSelected(): ! cg.setColor(QColorGroup.Highlight, self.selectedBase) ! cg.setColor(QColorGroup.HighlightedText, self.selectedText) ! p.setFont(self.selectedFont) ! else: ! if not self.transparency: ! cg.setColor(QColorGroup.Base, self.normalBase) ! cg.setColor(QColorGroup.Text, self.normalText) ! p.setFont(self.normalFont) QListViewItem.paintCell(self, p, cg, column, width, align) Index: mainwindow.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mainwindow.py 20 Sep 2003 20:06:30 -0000 1.5 --- mainwindow.py 26 Sep 2003 04:51:32 -0000 1.6 *************** *** 28,31 **** --- 28,33 ---- from systemtray import SystemTray from playlist import PlayList + from listitem import ListItem + from optiondialog import OptionDialog from searchdialog import SearchDialog from searchitem import SearchItem *************** *** 33,37 **** from songtimer import SongTimer from songfactory import SongFactory ! class MainWindow(KMainWindow): --- 35,40 ---- from songtimer import SongTimer from songfactory import SongFactory ! from config import Config ! class MainWindow(KMainWindow): *************** *** 42,46 **** def __init__(self): KMainWindow.__init__(self) ! self.config = KSimpleConfig("pyamprc") self.tray = SystemTray(self) self.playList = PlayList(self) --- 45,49 ---- def __init__(self): KMainWindow.__init__(self) ! self.config = Config.config() self.tray = SystemTray(self) self.playList = PlayList(self) *************** *** 62,65 **** --- 65,69 ---- self.actionCollection = KActionCollection(self) self.selectedItem = None + self.optionDialog = OptionDialog(self) icons = KIconLoader() *************** *** 78,81 **** --- 82,86 ---- self.playList.setTarget( self.config.readBoolEntry("isTarget", False)) + # Load the auto-saved-on-exit playlist self.playList.load() *************** *** 102,107 **** def setupActions(self): - self.config.setGroup("shortcut") - self.actions["saveList"] = KAction(qApp.translate("MainWindow", "Save Playlist..."), "filesave", --- 107,110 ---- *************** *** 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"), "", --- 243,246 ---- *************** *** 303,306 **** --- 299,305 ---- self.actions["bindKey"] = KStdAction.keyBindings(self.showKeyDialog, self.actionCollection) self.actions["bindKey"].setShortcut(KShortcut(self.readConfigEntry("bindKey"))) + + self.actions["option"] = KStdAction.preferences(self.showOptionDialog, self.actionCollection) + self.actions["option"].setShortcut(KShortcut(self.readConfigEntry("option"))) def setupMenus(self): *************** *** 339,342 **** --- 338,342 ---- self.configureMenu.insertSeparator() self.actions["bindKey"].plug(self.configureMenu) + self.actions["option"].plug(self.configureMenu) self.actions["about"].plug(self.helpMenu) *************** *** 452,455 **** --- 452,456 ---- # with QString that has ";" (e.g. "x;y") and string that ends with # space (e.g. "Del ") + self.config.setGroup("shortcut") value = self.config.readEntry(key, default) return str(value).strip() *************** *** 538,543 **** def showKeyDialog(self): self.keyDialog.configure(self.actionCollection, True) ! def saveList(self): filename = KFileDialog.getSaveFileName( self.config.readPathEntry("saveListPath"), --- 539,548 ---- def showKeyDialog(self): self.keyDialog.configure(self.actionCollection, True) ! ! def showOptionDialog(self): ! self.optionDialog.show() ! def saveList(self): + self.config.setGroup("window") filename = KFileDialog.getSaveFileName( self.config.readPathEntry("saveListPath"), *************** *** 551,554 **** --- 556,560 ---- def loadList(self): + self.config.setGroup("window") filename = KFileDialog.getOpenFileName( self.config.readPathEntry("loadListPath"), *************** *** 562,565 **** --- 568,572 ---- def addFile(self): + self.config.setGroup("window") filenames = KFileDialog.getOpenFileNames( self.config.readPathEntry("addFilePath"), *************** *** 577,580 **** --- 584,588 ---- def addDir(self): + self.config.setGroup("window") dir = KDirSelectDialog.selectDirectory( self.config.readPathEntry("addDirPath"), Index: playlist.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** playlist.py 20 Sep 2003 17:11:06 -0000 1.4 --- playlist.py 26 Sep 2003 04:51:32 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- from listitem import ListItem from tooltip import ToolTip + from config import Config class PlayList(KListView): *************** *** 43,46 **** --- 44,48 ---- def __init__(self, *args): KListView.__init__(self, *args) + self.config = Config.config() self.tooltip = ToolTip(self) self.songThread = SongThread(self) *************** *** 59,62 **** --- 61,65 ---- self.playing = False self.draggedOrders = [] + self.root = KRootPixmap(self.viewport()) # The order column is used for ordering only, so we hide it *************** *** 71,74 **** --- 74,79 ---- self.header().setResizeEnabled(False) self.setAcceptDrops(True) + self.setStaticBackground(True) + self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.connect(self, SIGNAL("executed(QListViewItem *)"), self.userSetSong) *************** *** 79,91 **** self.songThread.start() def acceptDrag(self, event): #~ return self.acceptDrops() and self.itemsMovable() and event.source() == self return True - def minimumSizeHint(self): - # Causes the playlist to be the first one to disappear when the main - # window shrinks small enough - return QSize(0, 0) - def customEvent(self, event): # We get a next event from songThread when the current song has --- 84,115 ---- self.songThread.start() + def readConfig(self): + transparency = self.config.readBoolEntry("transparency") + if transparency: + fade = self.config.readColorEntry("fade") + opacity = self.config.readNumEntry("opacity") + self.connect(self.root, + SIGNAL("backgroundUpdated(const QPixmap &)"), + self.updateBackground) + self.root.setCustomPainting(True) + self.root.setFadeEffect(opacity / 100.0, fade) + self.root.start() + else: + try: + self.disconnect(self.root, + SIGNAL("backgroundUpdated(const QPixmap &)"), + self.updateBackground) + except: + pass + self.root.stop() + + def updateBackground(self, pixmap): + self.pixmap = pixmap + self.setPaletteBackgroundPixmap(pixmap) + def acceptDrag(self, event): #~ return self.acceptDrops() and self.itemsMovable() and event.source() == self return True def customEvent(self, event): # We get a next event from songThread when the current song has *************** *** 405,409 **** self.clear() else: ! for i in selection(): self.removeSong(i) self.compress() --- 429,433 ---- self.clear() else: ! for i in selection: self.removeSong(i) self.compress() Index: pyamp.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/pyamp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pyamp.py 15 Sep 2003 11:38:13 -0000 1.2 --- pyamp.py 26 Sep 2003 04:51:32 -0000 1.3 *************** *** 20,26 **** from kdecore import * from os import system from sys import argv, setappdefaultencoding from mainwindow import MainWindow - from playlist import PlayList class Pyamp(KUniqueApplication): --- 20,26 ---- from kdecore import * from os import system + from locale import getdefaultlocale from sys import argv, setappdefaultencoding from mainwindow import MainWindow class Pyamp(KUniqueApplication): *************** *** 81,85 **** def main(): ! setappdefaultencoding("UTF-8") about = KAboutData("pyamp", "Pyamp", "0.1.2", "Pyamp: yet another music player", --- 81,85 ---- def main(): ! setappdefaultencoding(getdefaultlocale()[1]) about = KAboutData("pyamp", "Pyamp", "0.1.2", "Pyamp: yet another music player", Index: tooltip.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/tooltip.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tooltip.py 20 Sep 2003 20:06:30 -0000 1.1 --- tooltip.py 26 Sep 2003 04:51:32 -0000 1.2 *************** *** 30,35 **** length = song.getLength() rect = self.playList.itemRect(item) ! text = fullpath \ ! +"\nLength: " + secondsToStr(length) \ + "\nFile size: " + str(path.getsize(fullpath)) + " bytes" \ + "\nSample Frequency: " + str(sample) + " Hz" \ --- 30,36 ---- length = song.getLength() rect = self.playList.itemRect(item) ! text = path.basename(fullpath) \ ! + "\n" + path.dirname(fullpath) \ ! + "\nLength: " + secondsToStr(length) \ + "\nFile size: " + str(path.getsize(fullpath)) + " bytes" \ + "\nSample Frequency: " + str(sample) + " Hz" \ |
From: <sa...@us...> - 2003-09-26 04:51:36
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv14710 Modified Files: ChangeLog README Log Message: Added GUI configuration menu, currently capable to customize playlist font, color, and transparency Index: ChangeLog =================================================================== RCS file: /cvsroot/pyamp/pyamp/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog 20 Sep 2003 20:06:30 -0000 1.4 --- ChangeLog 26 Sep 2003 04:51:32 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- Version 0.1.3 + - Customizable playlist font, color, and transparency - Capable to show/hide menu and toolbars - Detailed tooltip for song Index: README =================================================================== RCS file: /cvsroot/pyamp/pyamp/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 15 Sep 2003 11:38:12 -0000 1.2 --- README 26 Sep 2003 04:51:32 -0000 1.3 *************** *** 13,17 **** What it supports: - mp3/ogg/wav playback ! - sortable playlist editor - shuffle/repeat/target modes - system tray docking --- 13,17 ---- What it supports: - mp3/ogg/wav playback ! - customizable playlist editor - shuffle/repeat/target modes - system tray docking *************** *** 30,34 **** What it lacks: - - gui configuration menu - translation - music streaming --- 30,33 ---- |
From: <sa...@us...> - 2003-09-20 20:06:34
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv7421/src Modified Files: mainwindow.py mainwindow.pyc searchdialog.py searchdialog.pyc Added Files: tooltip.py tooltip.pyc Log Message: Keyboard navigation while searching; Added tooltip.py which I forgot to add in previous commit :P --- NEW FILE: tooltip.py --- # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # Pyamp is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Pyamp; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from qt import * from os import path from songfactory import SongFactory from songtimer import secondsToStr class ToolTip(QToolTip): def __init__(self, playList): QToolTip.__init__(self, playList.viewport()) self.playList = playList def maybeTip(self, point): item = self.playList.itemAt(point) if item: fullpath = item.getFullpath() song = SongFactory.newSong(fullpath) sample, bits, channels, format = song.getParameters() bitrate = song.getBitrate() length = song.getLength() rect = self.playList.itemRect(item) text = fullpath \ +"\nLength: " + secondsToStr(length) \ + "\nFile size: " + str(path.getsize(fullpath)) + " bytes" \ + "\nSample Frequency: " + str(sample) + " Hz" \ + "\nBitrate: " + str(bitrate) + " kb/s" \ + "\nChannels: " + str(channels) self.tip(rect, text) --- NEW FILE: tooltip.pyc --- (This appears to be a binary file; contents omitted.) Index: mainwindow.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mainwindow.py 20 Sep 2003 17:08:48 -0000 1.4 --- mainwindow.py 20 Sep 2003 20:06:30 -0000 1.5 *************** *** 417,425 **** self.connect(self.searchDialog.list, ! SIGNAL("doubleClicked(QListBoxItem *)"), ! self.playList.userSetSongFromSearch) ! ! self.connect(self.searchDialog.list, ! SIGNAL("returnPressed(QListBoxItem *)"), self.playList.userSetSongFromSearch) --- 417,421 ---- self.connect(self.searchDialog.list, ! SIGNAL("executed(QListBoxItem *)"), self.playList.userSetSongFromSearch) *************** *** 505,515 **** 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): --- 501,504 ---- Index: mainwindow.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/mainwindow.pyc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsxOoN3f and /tmp/cvsgotZNl differ Index: searchdialog.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/searchdialog.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** searchdialog.py 15 Sep 2003 11:38:13 -0000 1.2 --- searchdialog.py 20 Sep 2003 20:06:30 -0000 1.3 *************** *** 18,28 **** from qt import * class SearchDialog(QDialog): def __init__(self, parent): QDialog.__init__(self, parent) ! self.input = QLineEdit(self) self.input.setFocus() ! self.list = QListBox(self) w = QApplication.desktop().width() --- 18,29 ---- from qt import * + from kdeui import * class SearchDialog(QDialog): def __init__(self, parent): QDialog.__init__(self, parent) ! self.input = LineEdit(self) self.input.setFocus() ! self.list = KListBox(self) w = QApplication.desktop().width() *************** *** 45,46 **** --- 46,60 ---- if oldActive: self.close() + + class LineEdit(QLineEdit): + def keyPressEvent(self, event): + key = event.key() + list = self.parent().list + if key in [Qt.Key_Down, Qt.Key_Up, Qt.Key_Prior, Qt.Key_Next]: + list.keyPressEvent(event) + elif key == Qt.Key_Return: + item = list.selectedItem() + if item: + list.emitExecute(item, QPoint()) + else: + QLineEdit.keyPressEvent(self, event) \ No newline at end of file Index: searchdialog.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/searchdialog.pyc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsvQAwDj and /tmp/cvsejmk4s differ |
From: <sa...@us...> - 2003-09-20 20:06:33
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv7421 Modified Files: ChangeLog Log Message: Keyboard navigation while searching; Added tooltip.py which I forgot to add in previous commit :P Index: ChangeLog =================================================================== RCS file: /cvsroot/pyamp/pyamp/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ChangeLog 20 Sep 2003 17:08:48 -0000 1.3 --- ChangeLog 20 Sep 2003 20:06:30 -0000 1.4 *************** *** 2,5 **** --- 2,6 ---- - Capable to show/hide menu and toolbars - Detailed tooltip for song + - Keyboard navigation while searching Version 0.1.2 - September 15, 2003 |
From: <sa...@us...> - 2003-09-20 17:11:09
|
Update of /cvsroot/pyamp/pyamp/src In directory sc8-pr-cvs1:/tmp/cvs-serv10045/src Modified Files: playlist.py playlist.pyc Log Message: Removed stupid print statement Index: playlist.py =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** playlist.py 20 Sep 2003 17:08:48 -0000 1.3 --- playlist.py 20 Sep 2003 17:11:06 -0000 1.4 *************** *** 270,274 **** def setPlayingSong(self, song): - print self.tooltip(song, 1) if self.getPlayingSong(): self.getPlayingSong().setPlaying(False) --- 270,273 ---- Index: playlist.pyc =================================================================== RCS file: /cvsroot/pyamp/pyamp/src/playlist.pyc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsRIaOwy and /tmp/cvsAo2tLW differ |
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 |
From: <sa...@us...> - 2003-09-20 17:08:51
|
Update of /cvsroot/pyamp/pyamp In directory sc8-pr-cvs1:/tmp/cvs-serv9686 Modified Files: ChangeLog Log Message: Added detailed tooltip for song Index: ChangeLog =================================================================== RCS file: /cvsroot/pyamp/pyamp/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 15 Sep 2003 11:38:12 -0000 1.2 --- ChangeLog 20 Sep 2003 17:08:48 -0000 1.3 *************** *** 1,2 **** --- 1,6 ---- + Version 0.1.3 + - Capable to show/hide menu and toolbars + - Detailed tooltip for song + Version 0.1.2 - September 15, 2003 - GUI hotkey configuration |