[Ap-python-commits] python/examples/aptk gtkplayer.py,1.5,1.6 panel.py,1.3,1.4 playlist.py,1.3,1.4
Status: Beta
Brought to you by:
sjah
From: <sj...@us...> - 2002-07-19 18:05:04
|
Update of /cvsroot/ap-python/python/examples/aptk In directory usw-pr-cvs1:/tmp/cvs-serv25233 Modified Files: gtkplayer.py panel.py playlist.py Log Message: Rewrite for new properties theme. Index: gtkplayer.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/gtkplayer.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gtkplayer.py 6 Jul 2002 16:09:36 -0000 1.5 --- gtkplayer.py 19 Jul 2002 18:04:56 -0000 1.6 *************** *** 27,30 **** --- 27,55 ---- import alsaplayer, aptk, gtk, GTK + # Properties for widgets + properties = { + "control.play.button.xpmfile" : "play-sm.xpm", + "control.play.button.relief" : GTK.RELIEF_NONE, + "control.next.button.xpmfile" : "next-sm.xpm", + "control.next.button.relief" : GTK.RELIEF_NONE, + "control.prev.button.xpmfile" : "prev-sm.xpm", + "control.prev.button.relief" : GTK.RELIEF_NONE, + "control.stop.button.xpmfile" : "prev-sm.xpm", + "control.stop.button.relief" : GTK.RELIEF_NONE, + "tagslabel.format" : "%a - %t", + "speed.pause.button.xpmfile" : "pause.xpm", + "speed.pause.button.relief" : GTK.RELIEF_NONE, + "speed.forward.button.xpmfile" : "f_play.xpm", + "speed.forward.button.relief" : GTK.RELIEF_NONE, + "speed.backward.button.xpmfile" : "r_play.xpm", + "speed.backward.button.relief" : GTK.RELIEF_NONE, + "pan.left.button.xpmfile" : "l_pan.xpm", + "pan.left.button.relief" : GTK.RELIEF_NONE, + "pan.center.button.xpmfile" : "c_pan.xpm", + "pan.center.button.relief" : GTK.RELIEF_NONE, + "pan.right.button.xpmfile" : "r_pan.xpm", + "pan.right.button.relief" : GTK.RELIEF_NONE, + } + pl = alsaplayer.get_playlist () cp = pl.get_coreplayer () *************** *** 42,69 **** ########################################################## position = aptk.position.HScale (cp) ! ! tagslabel = aptk.info.TagsLabel (cp, "%a - %t") ! fullstatusbox = aptk.info.FullStatusHBox (cp, position) ! ! control = aptk.control.HControl (pl, play_xpmfile = "play.xpm", ! next_xpmfile = "next.xpm", ! prev_xpmfile = "prev.xpm", ! stop_xpmfile = "stop.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) ! ! speed = aptk.speed.HSpeed (cp, pause_xpmfile = "pause.xpm", ! forward_xpmfile = "f_play.xpm", ! backward_xpmfile = "r_play.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) ! ! pan = aptk.pan.HPan (cp, left_xpmfile="l_pan.xpm", ! right_xpmfile="r_pan.xpm", ! center_xpmfile="c_pan.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) ! volume = aptk.volume.HVolume (cp) --- 67,75 ---- ########################################################## position = aptk.position.HScale (cp) ! tagslabel = aptk.info.TagsLabel (cp, properties) fullstatusbox = aptk.info.FullStatusHBox (cp, position) ! control = aptk.control.HControl (pl, properties) ! speed = aptk.speed.HSpeed (cp, properties) ! pan = aptk.pan.HPan (cp, properties) volume = aptk.volume.HVolume (cp) Index: panel.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/panel.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** panel.py 6 Jul 2002 16:10:29 -0000 1.3 --- panel.py 19 Jul 2002 18:04:56 -0000 1.4 *************** *** 29,32 **** --- 29,58 ---- pl = alsaplayer.get_playlist () + ############################################################################## + # Properties for widgets + properties = { + "control.play.button.xpmfile" : "play-sm.xpm", + "control.play.button.relief" : GTK.RELIEF_NONE, + "control.next.button.xpmfile" : "next-sm.xpm", + "control.next.button.relief" : GTK.RELIEF_NONE, + "control.prev.button.xpmfile" : "prev-sm.xpm", + "control.prev.button.relief" : GTK.RELIEF_NONE, + "control.stop.button.xpmfile" : "prev-sm.xpm", + "control.stop.button.relief" : GTK.RELIEF_NONE, + "tagslabel.format" : "%a - %t (%y - %l)", + "speed.pause.button.xpmfile" : "pause.xpm", + "speed.pause.button.relief" : GTK.RELIEF_NONE, + "speed.forward.button.xpmfile" : "f_play.xpm", + "speed.forward.button.relief" : GTK.RELIEF_NONE, + "speed.backward.button.xpmfile" : "r_play.xpm", + "speed.backward.button.relief" : GTK.RELIEF_NONE, + "pan.left.button.xpmfile" : "l_pan.xpm", + "pan.left.button.relief" : GTK.RELIEF_NONE, + "pan.center.button.xpmfile" : "c_pan.xpm", + "pan.center.button.relief" : GTK.RELIEF_NONE, + "pan.right.button.xpmfile" : "r_pan.xpm", + "pan.right.button.relief" : GTK.RELIEF_NONE, + } + ########################################################## # Main window *************** *** 53,68 **** # - - - - - aptk widgets ! control = aptk.control.HControl (pl, play_xpmfile = "play-sm.xpm", ! next_xpmfile = "next-sm.xpm", ! prev_xpmfile = "prev-sm.xpm", ! stop_xpmfile = "stop-sm.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) ! ! tagslabel = aptk.info.TagsLabel (cp, "%a - %t (%y - %l)") status = aptk.info.FullStatusHBox (cp) status.set_spacing (20) - self.control_widget = control # - - - - Frames --- 79,87 ---- # - - - - - aptk widgets ! control = aptk.control.HControl (pl, properties) ! tagslabel = aptk.info.TagsLabel (cp, properties) status = aptk.info.FullStatusHBox (cp) status.set_spacing (20) # - - - - Frames *************** *** 89,92 **** --- 108,114 ---- status_frame.show () + # Remember + self.control_widget = control + ############################################################################## ############################################################################## *************** *** 101,126 **** # - - - - - aptk widgets ! control = aptk.control.HControl (pl, play_xpmfile = "play-sm.xpm", ! next_xpmfile = "next-sm.xpm", ! prev_xpmfile = "prev-sm.xpm", ! stop_xpmfile = "stop-sm.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) ! position = aptk.position.HScale (cp) ! ! time_label = aptk.info.TimeLabel (cp, position) ! ! speed = aptk.speed.HSpeed (cp, pause_xpmfile = "pause.xpm", ! forward_xpmfile = "f_play.xpm", ! backward_xpmfile = "r_play.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) ! ! pan = aptk.pan.HPan (cp, left_xpmfile="l_pan.xpm", ! right_xpmfile="r_pan.xpm", ! center_xpmfile="c_pan.xpm", ! relief=GTK.RELIEF_NONE, ! window=win) volume = aptk.volume.HVolume (cp) --- 123,131 ---- # - - - - - aptk widgets ! control = aptk.control.HControl (pl, properties) position = aptk.position.HScale (cp) ! time_label = aptk.info.TimeLabel (cp, position) ! speed = aptk.speed.HSpeed (cp, properties) ! pan = aptk.pan.HPan (cp, properties) volume = aptk.volume.HVolume (cp) Index: playlist.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/playlist.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** playlist.py 19 Jul 2002 07:36:11 -0000 1.3 --- playlist.py 19 Jul 2002 18:04:56 -0000 1.4 *************** *** 28,42 **** ##################################################################### ! playlist_properties = { ! 'columns' : ['current', 'playtime', 'track', 'title', 'album', 'artist', 'year', 'genre'], ! 'title for playtime' : ("playtime.xpm",), ! 'title for track' : ("track.xpm",), ! 'title for title' : 'Title', ! 'title for current' : ' ', ! 'title for album' : 'Album', ! 'title for artist' : 'Artist', ! 'title for year' : 'Year', ! 'title for genre' : 'Genre', ! 'mark for current' : ("current_play.xpm",) } --- 28,43 ---- ##################################################################### ! properties = { ! 'playlist.columns' : ['current', 'playtime', 'track', 'title', ! 'album', 'artist', 'year', 'genre'], ! 'playlist.title.playtime' : ("playtime.xpm",), ! 'playlist.title.track' : ("track.xpm",), ! 'playlist.title.title' : 'Title', ! 'playlist.title.current' : ' ', ! 'playlist.title.album' : 'Album', ! 'playlist.title.artist' : 'Artist', ! 'playlist.title.year' : 'Year', ! 'playlist.title.genre' : 'Genre', ! 'playlist.current.mark' : ("current_play.xpm",) } *************** *** 48,52 **** gtk.mainquit (); ! win = aptk.playlist.PlaylistWindow (pl, playlist_properties) win.connect ("delete_event", delete_event) win.show () --- 49,53 ---- gtk.mainquit (); ! win = aptk.playlist.PlaylistWindow (pl, properties) win.connect ("delete_event", delete_event) win.show () |