ap-python-commits Mailing List for AlsaPlayer Python Interface (Page 4)
Status: Beta
Brought to you by:
sjah
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(58) |
Aug
(27) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <sj...@us...> - 2002-07-19 07:34:09
|
Update of /cvsroot/ap-python/python/aptk
In directory usw-pr-cvs1:/tmp/cvs-serv30199
Modified Files:
playlist.py
Log Message:
New properties theme for playlist widget.
Index: playlist.py
===================================================================
RCS file: /cvsroot/ap-python/python/aptk/playlist.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** playlist.py 18 Jul 2002 09:16:46 -0000 1.2
--- playlist.py 19 Jul 2002 07:34:03 -0000 1.3
***************
*** 24,50 ****
__license__ = "GNU"
! import gtk
###########################################################################
class SmartList (gtk.GtkCList):
! def __init__ (self, titles, tr = None):
"""Initializer."""
# Remember
! self.titles = titles
!
! # Translate if needed
! if tr:
! translated = [tr.has_key (title) and tr [title] or title for title in titles]
! else:
! translated = titles
# Call base class init-er
! gtk.GtkCList.__init__ (self, len (translated), translated)
def append (self, values):
"""Append values. Where 'value' variable is a dict of titles and associated values."""
! translated = [values [title] for title in self.titles]
gtk.GtkCList.append (self, translated)
--- 24,68 ----
__license__ = "GNU"
! import gtk, GDK
###########################################################################
class SmartList (gtk.GtkCList):
! def __init__ (self, columns):
"""Initializer."""
# Remember
! self.columns = columns
# Call base class init-er
! gtk.GtkCList.__init__ (self, len (columns), columns)
!
! def set_titles (self, titles):
! """Set titles from dict."""
!
! for column in self.columns:
! if titles.has_key (column):
! value = titles [column]
!
! if type (value) is type (''):
! # This is a text label
!
! gtk.GtkCList.set_column_title (self, self.columns.index (column), value)
! else:
! # This is an xpm filename
!
! window = self.get_window ()
!
! if window is None:
! self.realize ()
! window = self.get_window ()
!
! pixmap = gtk.GtkPixmap (self, value [0])
! gtk.GtkCList.set_column_widget (self, self.columns.index (column), pixmap)
! pixmap.show ()
def append (self, values):
"""Append values. Where 'value' variable is a dict of titles and associated values."""
! translated = [values [column] for column in self.column]
gtk.GtkCList.append (self, translated)
***************
*** 53,86 ****
"""Insert values in row. Where 'value' variable is a dict of titles and associated values."""
! translated = [values [title] for title in self.titles]
gtk.GtkCList.insert (self, row, translated)
! def set_column_width (self, title, width):
! """Set width for column with this title."""
! gtk.GtkCList.set_column_width (self, self.titles.index (title), width)
def set_widthes (self, widthes):
"""Set width for columns."""
! for title in self.titles:
! self.set_column_width (title, widthes [title])
! def set_pixmap (self, r, title_name, pixmap, mask = None):
"""Set pixmap."""
! gtk.GtkCList.set_pixmap (self, r, self.titles.index (title_name), pixmap, mask)
! def set_text (self, r, title_name, text):
"""Set text."""
! gtk.GtkCList.set_text (self, r, self.titles.index (title_name), text)
###############################################################################
class PlaylistWindow (gtk.GtkWindow):
! def __init__ (self, pl, mark_xpmfile):
"""Initializer."""
# Remember
self.pl = pl
--- 71,144 ----
"""Insert values in row. Where 'value' variable is a dict of titles and associated values."""
! translated = [values [column] for column in self.columns]
gtk.GtkCList.insert (self, row, translated)
! def set_column_width (self, column, width):
! """Set width for column."""
! gtk.GtkCList.set_column_width (self, self.columns.index (column), width)
def set_widthes (self, widthes):
"""Set width for columns."""
! for column in self.columns:
! if widthes.has_key (column):
! self.set_column_width (self.columns.index (column), widthes [column])
! def set_pixmap (self, r, column, pixmap, mask = None):
"""Set pixmap."""
! gtk.GtkCList.set_pixmap (self, r, self.columns.index (column), pixmap, mask)
! def set_text (self, r, column, text):
"""Set text."""
! gtk.GtkCList.set_text (self, r, self.columns.index (column), text)
!
! def set_cell (self, r, column, value):
! """Set cell value. Could be text or a tuple where the first element is a filename with xpm data."""
!
! if type (value) is type (''):
! # This is a text label
!
! self.set_text (r, column, value)
! else:
! # This is an xpm filename
!
! window = self.get_window ()
!
! if window is None:
! self.realize ()
! window = self.get_window ()
!
! # Allocate pixmap
! p, m = gtk.create_pixmap_from_xpm (window, None, value [0])
!
! self.set_pixmap (r, column, p, m)
###############################################################################
+ default_properties = {
+ 'columns' : ['current', 'playtime', 'track', 'title', 'album', 'artist', 'year', 'genre'],
+ 'title for playtime' : 'Playtime',
+ 'title for track' : 'Track',
+ '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' : '*'
+ }
+
class PlaylistWindow (gtk.GtkWindow):
! def __init__ (self, pl, prop):
"""Initializer."""
+ # Helper function
+ def prop_value (key, prop=prop):
+ if prop.has_key (key): return prop [key]
+ else: return default_properties [key]
+
# Remember
self.pl = pl
***************
*** 92,125 ****
# Vbox
self.vbox = gtk.GtkVBox ()
- self.vbox.show ()
self.add (self.vbox)
# Scrolled window for list
self.scrolled = gtk.GtkScrolledWindow ()
self.scrolled.show ()
self.scrolled.set_policy (1, 0)
- self.vbox.add (self.scrolled)
# Create list
! self.list = SmartList (["current", "playtime", "track", "title", "album", "artist", "year", "genre"],
! {"current" : " ",
! "playtime" : "Time",
! "track" : "Track",
! "title" : "Title",
! "album" : "Album",
! "artist" : "Artist",
! "year" : "Year",
! "genre" : "Genre"})
self.list.show ()
self.list.column_titles_passive ()
- self.scrolled.add (self.list)
# Create pixmap to mark the current song
! self.realize ()
! self.np_pixmap, self.np_mask = gtk.create_pixmap_from_xpm (self, None, mark_xpmfile)
# Register new playlist interface
pl.register (self)
def cb_insert (self, items, pos):
"""Called by alsaplayer when new items arrived."""
--- 150,187 ----
# Vbox
self.vbox = gtk.GtkVBox ()
self.add (self.vbox)
+ self.vbox.show ()
# Scrolled window for list
self.scrolled = gtk.GtkScrolledWindow ()
+ self.vbox.add (self.scrolled)
self.scrolled.show ()
self.scrolled.set_policy (1, 0)
# Create list
! self.list = SmartList (prop_value ('columns'))
! self.scrolled.add (self.list)
!
! self.list.set_titles ({"current" : prop ['title for current'],
! "playtime" : prop ['title for playtime'],
! "track" : prop ['title for track'],
! "title" : prop ['title for title'],
! "album" : prop ['title for album'],
! "artist" : prop ['title for artist'],
! "year" : prop ['title for year'],
! "genre" : prop ['title for genre']})
!
self.list.show ()
self.list.column_titles_passive ()
# Create pixmap to mark the current song
! self.current_mark = prop_value ('mark for current')
# Register new playlist interface
pl.register (self)
+ # Setup callbacks
+ self.list.connect ("select_row", self.gtkcb_select_row)
+
def cb_insert (self, items, pos):
"""Called by alsaplayer when new items arrived."""
***************
*** 154,158 ****
if self.current != pos - 1:
# Blank previous mark
- print self.current
if self.current is not None:
self.list.set_text (self.current, 'current', '')
--- 216,219 ----
***************
*** 160,164 ****
# Mark row
self.current = pos - 1
! self.list.set_pixmap (self.current, 'current', self.np_pixmap, self.np_mask)
gtk.threads_leave ()
--- 221,233 ----
# Mark row
self.current = pos - 1
! self.list.set_cell (self.current, 'current', self.current_mark)
gtk.threads_leave ()
+
+ def gtkcb_select_row (self, w, row, column, event):
+ """Called by gtk, when the new row is selected."""
+
+ if event.type == GDK._2BUTTON_PRESS:
+ gtk.threads_leave ()
+ self.pl.play (row + 1)
+ gtk.threads_enter ()
|
|
From: <sj...@us...> - 2002-07-18 09:16:49
|
Update of /cvsroot/ap-python/python/aptk
In directory usw-pr-cvs1:/tmp/cvs-serv11378
Modified Files:
playlist.py
Log Message:
Add ability to mark currently playing song at playlist window.
Index: playlist.py
===================================================================
RCS file: /cvsroot/ap-python/python/aptk/playlist.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** playlist.py 16 Jul 2002 17:10:21 -0000 1.1
--- playlist.py 18 Jul 2002 09:16:46 -0000 1.2
***************
*** 47,50 ****
--- 47,51 ----
translated = [values [title] for title in self.titles]
+
gtk.GtkCList.append (self, translated)
***************
*** 53,56 ****
--- 54,58 ----
translated = [values [title] for title in self.titles]
+
gtk.GtkCList.insert (self, row, translated)
***************
*** 66,83 ****
self.set_column_width (title, widthes [title])
###############################################################################
class PlaylistWindow (gtk.GtkWindow):
! def __init__ (self, pl):
"""Initializer."""
# Remember
self.pl = pl
# Init base class
gtk.GtkWindow.__init__ (self)
# Create list
! self.list = SmartList (["playtime", "track", "title", "album", "artist", "year", "genre"],
! {"playtime" : "Time",
"track" : "Track",
"title" : "Title",
--- 68,108 ----
self.set_column_width (title, widthes [title])
+ def set_pixmap (self, r, title_name, pixmap, mask = None):
+ """Set pixmap."""
+
+ gtk.GtkCList.set_pixmap (self, r, self.titles.index (title_name), pixmap, mask)
+
+ def set_text (self, r, title_name, text):
+ """Set text."""
+
+ gtk.GtkCList.set_text (self, r, self.titles.index (title_name), text)
+
###############################################################################
class PlaylistWindow (gtk.GtkWindow):
! def __init__ (self, pl, mark_xpmfile):
"""Initializer."""
# Remember
self.pl = pl
+ self.current = None
# Init base class
gtk.GtkWindow.__init__ (self)
+ # Vbox
+ self.vbox = gtk.GtkVBox ()
+ self.vbox.show ()
+ self.add (self.vbox)
+
+ # Scrolled window for list
+ self.scrolled = gtk.GtkScrolledWindow ()
+ self.scrolled.show ()
+ self.scrolled.set_policy (1, 0)
+ self.vbox.add (self.scrolled)
+
# Create list
! self.list = SmartList (["current", "playtime", "track", "title", "album", "artist", "year", "genre"],
! {"current" : " ",
! "playtime" : "Time",
"track" : "Track",
"title" : "Title",
***************
*** 86,91 ****
"year" : "Year",
"genre" : "Genre"})
- self.add (self.list)
self.list.show ()
# Register new playlist interface
--- 111,121 ----
"year" : "Year",
"genre" : "Genre"})
self.list.show ()
+ self.list.column_titles_passive ()
+ self.scrolled.add (self.list)
+
+ # Create pixmap to mark the current song
+ self.realize ()
+ self.np_pixmap, self.np_mask = gtk.create_pixmap_from_xpm (self, None, mark_xpmfile)
# Register new playlist interface
***************
*** 96,102 ****
gtk.threads_enter ()
for item in items:
! values = {'title' : item.title,
'filename' : item.filename,
'artist' : item.artist,
--- 126,134 ----
gtk.threads_enter ()
+ self.list.freeze ()
for item in items:
! values = {'current' : '',
! 'title' : item.title,
'filename' : item.filename,
'artist' : item.artist,
***************
*** 111,114 ****
--- 143,164 ----
pos += 1
+
+ self.list.thaw ()
+ gtk.threads_leave ()
+
+ def cb_set_current (self, pos):
+ """Called by alsaplayer when the playing song changed."""
+
+ gtk.threads_enter ()
+
+ if self.current != pos - 1:
+ # Blank previous mark
+ print self.current
+ if self.current is not None:
+ self.list.set_text (self.current, 'current', '')
+ # Mark row
+ self.current = pos - 1
+ self.list.set_pixmap (self.current, 'current', self.np_pixmap, self.np_mask)
+
gtk.threads_leave ()
|
|
From: <sj...@us...> - 2002-07-18 09:16:07
|
Update of /cvsroot/ap-python/python/examples/aptk
In directory usw-pr-cvs1:/tmp/cvs-serv11195
Modified Files:
Makefile.am playlist.py
Added Files:
current_play.xpm
Log Message:
Mark currently playing song at playlist window.
--- NEW FILE: current_play.xpm ---
/* XPM */
static char * current_play_xpm[] = {
"13 12 58 1",
" c None",
". c #33475B",
"+ c #838385",
"@ c #125398",
"# c #024388",
"$ c #B3B3B5",
"% c #7E7F80",
"& c #334E69",
"* c #80C1FF",
"= c #07488D",
"- c #717B78",
"; c #8F9091",
"> c #BFC0C1",
", c #0D51A0",
"' c #0B509E",
") c #274DA1",
"! c #8DB3FF",
"~ c #79B1FE",
"{ c #0A418E",
"] c #AFAFB8",
"^ c #969798",
"/ c #777879",
"( c #1257A5",
"_ c #74B9FF",
": c #8EB3FF",
"< c #789EF2",
"[ c #649BE8",
"} c #0E4592",
"| c #3C3E3F",
"1 c #2B2C2C",
"2 c #144F9C",
"3 c #4983D1",
"4 c #4C80D6",
"5 c #4E82D8",
"6 c #3C8AD3",
"7 c #025099",
"8 c #3F3E3E",
"9 c #2C2C2C",
"0 c #084390",
"a c #13479D",
"b c #3064BA",
"c c #2473BC",
"d c #004E97",
"e c #ADB0B2",
"f c #989797",
"g c #797878",
"h c #2C435D",
"i c #2261A1",
"j c #064585",
"k c #718381",
"l c #919090",
"m c #C1C0C0",
"n c #0E4D8D",
"o c #044383",
"p c #B5B3B3",
"q c #807F7F",
"r c #3B4459",
"s c #838282",
" ",
" . + ",
" @# $% ",
" &*= - ;> ",
" ,')!~{ ]^ / ",
" (_:<[} | 1 ",
" 234567 8 9 ",
" 00abcd ef g ",
" hij k lm ",
" no pq ",
" r s ",
" "};
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ap-python/python/examples/aptk/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Makefile.am 16 Jul 2002 17:11:32 -0000 1.3
--- Makefile.am 18 Jul 2002 09:16:02 -0000 1.4
***************
*** 1,3 ****
EXTRA_DIST = c_pan.xpm f_play.xpm gtkplayer.py l_pan.xpm mute.xpm next.xpm\
pause.xpm play.xpm prev.xpm r_pan.xpm r_play.xpm stop.xpm panel.py\
! play-sm.xpm stop-sm.xpm prev-sm.xpm next-sm.xpm playlist.py
--- 1,3 ----
EXTRA_DIST = c_pan.xpm f_play.xpm gtkplayer.py l_pan.xpm mute.xpm next.xpm\
pause.xpm play.xpm prev.xpm r_pan.xpm r_play.xpm stop.xpm panel.py\
! play-sm.xpm stop-sm.xpm prev-sm.xpm next-sm.xpm playlist.py current_play.xpm
Index: playlist.py
===================================================================
RCS file: /cvsroot/ap-python/python/examples/aptk/playlist.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** playlist.py 16 Jul 2002 17:11:33 -0000 1.1
--- playlist.py 18 Jul 2002 09:16:02 -0000 1.2
***************
*** 34,38 ****
! win = aptk.playlist.PlaylistWindow (pl)
win.connect ("delete_event", delete_event)
win.show ()
--- 34,38 ----
! win = aptk.playlist.PlaylistWindow (pl, "current_play.xpm")
win.connect ("delete_event", delete_event)
win.show ()
|
|
From: <sj...@us...> - 2002-07-16 17:12:54
|
Update of /cvsroot/ap-python/python/examples/aptk In directory usw-pr-cvs1:/tmp/cvs-serv32066/examples/aptk Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ChangeLog 6 Jul 2002 16:15:41 -0000 1.7 --- ChangeLog 16 Jul 2002 17:12:46 -0000 1.8 *************** *** 1,2 **** --- 1,6 ---- + 2002-07-16 17:11 Evgeny Chukreev <co...@ec...> + + * Makefile.am, playlist.py: Add playlist example. + 2002-07-06 16:10 Evgeny Chukreev <co...@ec...> |
|
From: <sj...@us...> - 2002-07-16 17:12:52
|
Update of /cvsroot/ap-python/python/aptk In directory usw-pr-cvs1:/tmp/cvs-serv32066/aptk Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/aptk/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChangeLog 6 Jul 2002 16:15:41 -0000 1.9 --- ChangeLog 16 Jul 2002 17:12:45 -0000 1.10 *************** *** 1,2 **** --- 1,6 ---- + 2002-07-16 17:08 Evgeny Chukreev <co...@ec...> + + * Makefile.am, __init__.py, playlist.py: Add playlist module. + 2002-07-06 16:08 Evgeny Chukreev <co...@ec...> |
|
From: <sj...@us...> - 2002-07-16 17:11:39
|
Update of /cvsroot/ap-python/python/examples/aptk
In directory usw-pr-cvs1:/tmp/cvs-serv31578
Modified Files:
Makefile.am
Added Files:
playlist.py
Log Message:
Add playlist example.
--- NEW FILE: playlist.py ---
#!/usr/local/bin/alsaplayer-python -I
# playlist.py
# Copyright (C) 2002 Evgeny Chukreev <co...@ec...>
#
# This program 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.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: playlist.py,v 1.1 2002/07/16 17:11:33 sjah Exp $
#
__author__ = "Evgeny Chukreev <co...@ec...>"
__date__ = "$Date: 2002/07/16 17:11:33 $"
__version__ = "$Revision: 1.1 $"
__license__ = "GNU"
import alsaplayer, aptk, gtk
pl = alsaplayer.get_playlist ()
cp = pl.get_coreplayer ()
def delete_event (foo, bar):
gtk.mainquit ();
win = aptk.playlist.PlaylistWindow (pl)
win.connect ("delete_event", delete_event)
win.show ()
gtk.threads_enter ()
gtk.mainloop ()
gtk.threads_leave ()
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ap-python/python/examples/aptk/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.am 16 May 2002 10:22:49 -0000 1.2
--- Makefile.am 16 Jul 2002 17:11:32 -0000 1.3
***************
*** 1,3 ****
EXTRA_DIST = c_pan.xpm f_play.xpm gtkplayer.py l_pan.xpm mute.xpm next.xpm\
pause.xpm play.xpm prev.xpm r_pan.xpm r_play.xpm stop.xpm panel.py\
! play-sm.xpm stop-sm.xpm prev-sm.xpm next-sm.xpm
--- 1,3 ----
EXTRA_DIST = c_pan.xpm f_play.xpm gtkplayer.py l_pan.xpm mute.xpm next.xpm\
pause.xpm play.xpm prev.xpm r_pan.xpm r_play.xpm stop.xpm panel.py\
! play-sm.xpm stop-sm.xpm prev-sm.xpm next-sm.xpm playlist.py
|
|
From: <sj...@us...> - 2002-07-16 17:10:29
|
Update of /cvsroot/ap-python/python/aptk
In directory usw-pr-cvs1:/tmp/cvs-serv31240
Added Files:
playlist.py
Log Message:
Add playlist module.
--- NEW FILE: playlist.py ---
# playlist.py
# Copyright (C) 2002 Evgeny Chukreev <co...@ec...>
#
# This program 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.
#
# This program 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 this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id: playlist.py,v 1.1 2002/07/16 17:10:21 sjah Exp $
#
__author__ = "Evgeny Chukreev <co...@ec...>"
__date__ = "$Date: 2002/07/16 17:10:21 $"
__version__ = "$Revision: 1.1 $"
__license__ = "GNU"
import gtk
###########################################################################
class SmartList (gtk.GtkCList):
def __init__ (self, titles, tr = None):
"""Initializer."""
# Remember
self.titles = titles
# Translate if needed
if tr:
translated = [tr.has_key (title) and tr [title] or title for title in titles]
else:
translated = titles
# Call base class init-er
gtk.GtkCList.__init__ (self, len (translated), translated)
def append (self, values):
"""Append values. Where 'value' variable is a dict of titles and associated values."""
translated = [values [title] for title in self.titles]
gtk.GtkCList.append (self, translated)
def insert (self, row, values):
"""Insert values in row. Where 'value' variable is a dict of titles and associated values."""
translated = [values [title] for title in self.titles]
gtk.GtkCList.insert (self, row, translated)
def set_column_width (self, title, width):
"""Set width for column with this title."""
gtk.GtkCList.set_column_width (self, self.titles.index (title), width)
def set_widthes (self, widthes):
"""Set width for columns."""
for title in self.titles:
self.set_column_width (title, widthes [title])
###############################################################################
class PlaylistWindow (gtk.GtkWindow):
def __init__ (self, pl):
"""Initializer."""
# Remember
self.pl = pl
# Init base class
gtk.GtkWindow.__init__ (self)
# Create list
self.list = SmartList (["playtime", "track", "title", "album", "artist", "year", "genre"],
{"playtime" : "Time",
"track" : "Track",
"title" : "Title",
"album" : "Album",
"artist" : "Artist",
"year" : "Year",
"genre" : "Genre"})
self.add (self.list)
self.list.show ()
# Register new playlist interface
pl.register (self)
def cb_insert (self, items, pos):
"""Called by alsaplayer when new items arrived."""
gtk.threads_enter ()
for item in items:
values = {'title' : item.title,
'filename' : item.filename,
'artist' : item.artist,
'album' : item.album,
'genre' : item.genre,
'comment' : item.comment,
'track' : item.track,
'year' : item.year,
'playtime' : "%02u:%02u" % divmod (item.playtime, 60)}
self.list.insert (pos, values)
pos += 1
gtk.threads_leave ()
|
|
From: <sj...@us...> - 2002-07-16 17:08:57
|
Update of /cvsroot/ap-python/python/aptk In directory usw-pr-cvs1:/tmp/cvs-serv30640 Modified Files: Makefile.am __init__.py Log Message: Add playlist module. Index: Makefile.am =================================================================== RCS file: /cvsroot/ap-python/python/aptk/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 15 May 2002 00:58:40 -0000 1.2 --- Makefile.am 16 Jul 2002 17:08:45 -0000 1.3 *************** *** 1,8 **** EXTRA_DIST = control.py info.py __init__.py misc.py pan.py position.py\ ! speed.py volume.py if ENABLE_APTK aptk_DATA = $(EXTRA_DIST) control.pyc info.pyc __init__.pyc misc.pyc\ ! pan.pyc position.pyc speed.pyc volume.pyc aptkdir = @PY_MOD_DIR@/aptk endif --- 1,8 ---- EXTRA_DIST = control.py info.py __init__.py misc.py pan.py position.py\ ! speed.py volume.py playlist.py if ENABLE_APTK aptk_DATA = $(EXTRA_DIST) control.pyc info.pyc __init__.pyc misc.pyc\ ! pan.pyc position.pyc speed.pyc volume.pyc playlist.py aptkdir = @PY_MOD_DIR@/aptk endif Index: __init__.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 14 May 2002 14:16:59 -0000 1.2 --- __init__.py 16 Jul 2002 17:08:45 -0000 1.3 *************** *** 33,34 **** --- 33,35 ---- import position import info + import playlist |
|
From: <sj...@us...> - 2002-07-06 17:51:45
|
Update of /cvsroot/ap-python/python/src In directory usw-pr-cvs1:/tmp/cvs-serv25451/src Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/src/ChangeLog,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ChangeLog 2 Jun 2002 10:56:58 -0000 1.8 --- ChangeLog 6 Jul 2002 17:51:40 -0000 1.9 *************** *** 1,2 **** --- 1,8 ---- + 2002-07-06 17:40 Evgeny Chukreev <co...@ec...> + + * pycoreplayer.cpp: Add binding for CorePlayer::Pause and + CorePlayer::UnPause. Remove duplicated declaration of the Stop + method from the methods list. + 2002-06-02 09:46 Evgeny Chukreev <co...@ec...> |
|
From: <sj...@us...> - 2002-07-06 17:40:30
|
Update of /cvsroot/ap-python/python/src
In directory usw-pr-cvs1:/tmp/cvs-serv22902
Modified Files:
pycoreplayer.cpp
Log Message:
Add binding for CorePlayer::Pause and CorePlayer::UnPause.
Remove duplicated declaration of the Stop method from the methods list.
Index: pycoreplayer.cpp
===================================================================
RCS file: /cvsroot/ap-python/python/src/pycoreplayer.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pycoreplayer.cpp 2 Jun 2002 09:46:38 -0000 1.5
--- pycoreplayer.cpp 6 Jul 2002 17:40:26 -0000 1.6
***************
*** 49,52 ****
--- 49,54 ----
// Start start
// Stop stop
+ // Pause pause
+ // UnPause unpause
// Seek seek
// Load load
***************
*** 83,86 ****
--- 85,90 ----
// MAP by DEFINITIONS ---------------------------------------------------
mapsimple(Unload, unload)
+ mapsimple(Pause, pause)
+ mapsimple(UnPause, unpause)
mapsimple_with_intret (GetPosition, get_position)
***************
*** 384,388 ****
{"is_active", (PyCFunction) pyis_active, METH_VARARGS},
{"is_playing", (PyCFunction) pyis_playing, METH_VARARGS},
! {"stop", (PyCFunction) pystop, METH_VARARGS},
{NULL, NULL}
};
--- 388,393 ----
{"is_active", (PyCFunction) pyis_active, METH_VARARGS},
{"is_playing", (PyCFunction) pyis_playing, METH_VARARGS},
! {"pause", (PyCFunction) pypause, METH_VARARGS},
! {"unpause", (PyCFunction) pyunpause, METH_VARARGS},
{NULL, NULL}
};
|