ap-python-commits Mailing List for AlsaPlayer Python Interface
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-08-21 05:43:49
|
Update of /cvsroot/ap-python/python/po In directory usw-pr-cvs1:/tmp/cvs-serv25457 Modified Files: ru.po Log Message: Update russian translation. Index: ru.po =================================================================== RCS file: /cvsroot/ap-python/python/po/ru.po,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ru.po 19 Aug 2002 16:45:37 -0000 1.1 --- ru.po 21 Aug 2002 05:43:46 -0000 1.2 *************** *** 1,3 **** --- 1,4 ---- # Russian messages for aptk module + # Copyright (C) 2001 Free Software Foundation, Inc. # Evgeny Chukreev <co...@ec...>, 2002. # *************** *** 5,10 **** msgstr "" "Project-Id-Version: APTK 0.3.0\n" ! "POT-Creation-Date: Mon Aug 19 23:36:15 2002\n" ! "PO-Revision-Date: 2002-08-19 20:52+0700\n" "Last-Translator: Evgeny Chukreev <co...@ec...>\n" "Language-Team: Russian\n" --- 6,11 ---- msgstr "" "Project-Id-Version: APTK 0.3.0\n" ! "POT-Creation-Date: 2002-08-21 12:34+0700\n" ! "PO-Revision-Date: 2002-08-21 12:36+0700\n" "Last-Translator: Evgeny Chukreev <co...@ec...>\n" "Language-Team: Russian\n" |
From: <sj...@us...> - 2002-08-21 05:32:34
|
Update of /cvsroot/ap-python/python/po In directory usw-pr-cvs1:/tmp/cvs-serv23343 Modified Files: pygettext.py Log Message: Make pygettext.py more compatibly with xgettext. Index: pygettext.py =================================================================== RCS file: /cvsroot/ap-python/python/po/pygettext.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pygettext.py 19 Aug 2002 16:45:37 -0000 1.1 --- pygettext.py 21 Aug 2002 05:32:29 -0000 1.2 *************** *** 4,8 **** # Minimally patched to make it even more xgettext compatible # by Peter Funk <pf...@ar...> ! # Modified by Evgeny Chukreev <co...@ec...> """pygettext -- Python equivalent of xgettext(1) --- 4,8 ---- # Minimally patched to make it even more xgettext compatible # by Peter Funk <pf...@ar...> ! # Patched a bit by Evgeny Chukreev <co...@ec...> """pygettext -- Python equivalent of xgettext(1) *************** *** 153,157 **** def _(s): return s ! __version__ = '1.4' default_keywords = ['_'] --- 153,157 ---- def _(s): return s ! __version__ = '1.5' default_keywords = ['_'] *************** *** 166,170 **** pot_header = _('''\ # SOME DESCRIPTIVE TITLE. ! # Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # --- 166,170 ---- pot_header = _('''\ # SOME DESCRIPTIVE TITLE. ! # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # *************** *** 332,338 **** def write(self, fp): options = self.__options ! timestamp = time.ctime(time.time()) ! # The time stamp in the header doesn't have the same format as that ! # generated by xgettext... print >> fp, pot_header % {'time': timestamp, 'version': __version__} # Sort the entries. First sort each particular entry's keys, then --- 332,338 ---- def write(self, fp): options = self.__options ! tz = time.daylight and -time.altzone/36 or 0 ! loct = time.localtime () ! timestamp = "%u-%02u-%02u %02u:%02u%+05d" % (loct [:5] + (tz,)) print >> fp, pot_header % {'time': timestamp, 'version': __version__} # Sort the entries. First sort each particular entry's keys, then |
From: <sj...@us...> - 2002-08-20 14:55:30
|
Update of /cvsroot/ap-python/python In directory usw-pr-cvs1:/tmp/cvs-serv27397 Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/ChangeLog,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ChangeLog 19 Aug 2002 16:48:24 -0000 1.29 --- ChangeLog 20 Aug 2002 14:55:27 -0000 1.30 *************** *** 1,2 **** --- 1,6 ---- + 2002-08-20 14:54 Evgeny Chukreev <co...@ec...> + + * NEWS: Add latest changes. + 2002-08-19 16:47 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-20 14:54:45
|
Update of /cvsroot/ap-python/python In directory usw-pr-cvs1:/tmp/cvs-serv26999 Modified Files: NEWS Log Message: Add latest changes. Index: NEWS =================================================================== RCS file: /cvsroot/ap-python/python/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NEWS 18 May 2002 07:42:34 -0000 1.2 --- NEWS 20 Aug 2002 14:54:39 -0000 1.3 *************** *** 1,2 **** --- 1,32 ---- + GCC 3.1 and Python 2.2 compatibility fixes. + Add short descriptions for examples dirs. + Other fixes and cleanups... + + plugin: + New StreamInfo members: year, track, comment, path. + Add CorePlayer notifiers: cb_position_notify, cb_speed_changed, + cb_volume_changed, cb_pan_changed, cb_start_notify, + cb_stop_notify. + New CorePlayer methods: pause, unpause. + New Playlist method: sort. + Remove PlaylistInterface callbacks: cb_lock, cb_unlock. + + apcontrol: + New methods: get_year, get_comment, get_track_number, is_playing, + add_and_play, set_volume, get_volume, set_pan, get_pan, + sort, get_file_path. + More examples. + + APTK: + Rewritten for PyGTK2. + New properties style for widgets. + APTK uses CorePlayer notifiers instead of polls. + TimeLabel could be linked with a position scale. + Add TagsLabel widget (shows stream info formated by a given string). + Threads fixups.. + Improve panel and gtkplayer examples. + Add playlist module and example. + I18N + Friday, May 17th 2002 16:55 EDT. AlsaPlayer-Python 0.2.0. --------------------------------------------------------- |
From: <sj...@us...> - 2002-08-19 16:48:26
|
Update of /cvsroot/ap-python/python In directory usw-pr-cvs1:/tmp/cvs-serv30702 Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/ChangeLog,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ChangeLog 19 Aug 2002 16:47:36 -0000 1.28 --- ChangeLog 19 Aug 2002 16:48:24 -0000 1.29 *************** *** 1,2 **** --- 1,6 ---- + 2002-08-19 16:47 Evgeny Chukreev <co...@ec...> + + * ChangeLog.update: Add ChangeLog for po subdir. + 2002-08-19 16:45 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-19 16:47:39
|
Update of /cvsroot/ap-python/python/examples/aptk In directory usw-pr-cvs1:/tmp/cvs-serv30410/examples/aptk Modified Files: ChangeLog Log Message: Add ChangeLog for po subdir. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ChangeLog 17 Aug 2002 09:25:31 -0000 1.15 --- ChangeLog 19 Aug 2002 16:47:36 -0000 1.16 *************** *** 1,2 **** --- 1,8 ---- + 2002-08-19 16:45 Evgeny Chukreev <co...@ec...> + + * gtkplayer.py, panel.py, playlist.py: Make __data__ and + __version__ mean what they should mean. I18N. Fix distclean and + uninstall targets. + 2002-08-16 05:36 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-19 16:47:39
|
Update of /cvsroot/ap-python/python/po In directory usw-pr-cvs1:/tmp/cvs-serv30410/po Added Files: ChangeLog Log Message: Add ChangeLog for po subdir. --- NEW FILE: ChangeLog --- 2002-08-19 16:45 Evgeny Chukreev <co...@ec...> * .cvsignore, Makefile.am, pygettext.py, ru.po: Make __data__ and __version__ mean what they should mean. I18N. Fix distclean and uninstall targets. |
From: <sj...@us...> - 2002-08-19 16:47:39
|
Update of /cvsroot/ap-python/python/docs In directory usw-pr-cvs1:/tmp/cvs-serv30410/docs Modified Files: ChangeLog Log Message: Add ChangeLog for po subdir. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/docs/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ChangeLog 21 Jul 2002 18:16:41 -0000 1.11 --- ChangeLog 19 Aug 2002 16:47:36 -0000 1.12 *************** *** 1,2 **** --- 1,7 ---- + 2002-08-19 16:45 Evgeny Chukreev <co...@ec...> + + * Makefile.am: Make __data__ and __version__ mean what they should + mean. I18N. Fix distclean and uninstall targets. + 2002-07-21 10:28 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-19 16:47:39
|
Update of /cvsroot/ap-python/python/aptk In directory usw-pr-cvs1:/tmp/cvs-serv30410/aptk Modified Files: ChangeLog Log Message: Add ChangeLog for po subdir. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/aptk/ChangeLog,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ChangeLog 17 Aug 2002 09:25:31 -0000 1.17 --- ChangeLog 19 Aug 2002 16:47:36 -0000 1.18 *************** *** 1,2 **** --- 1,9 ---- + 2002-08-19 16:45 Evgeny Chukreev <co...@ec...> + + * __init__.py, control.py, info.py, language.py, misc.py, pan.py, + playlist.py, position.py, speed.py, volume.py: Make __data__ and + __version__ mean what they should mean. I18N. Fix distclean and + uninstall targets. + 2002-08-16 05:43 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-19 16:47:38
|
Update of /cvsroot/ap-python/python In directory usw-pr-cvs1:/tmp/cvs-serv30410 Modified Files: ChangeLog ChangeLog.update Log Message: Add ChangeLog for po subdir. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/ChangeLog,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ChangeLog 24 Jul 2002 07:05:56 -0000 1.27 --- ChangeLog 19 Aug 2002 16:47:36 -0000 1.28 *************** *** 1,2 **** --- 1,8 ---- + 2002-08-19 16:45 Evgeny Chukreev <co...@ec...> + + * Makefile.am, TODO, configure.ac: Make __data__ and __version__ + mean what they should mean. I18N. Fix distclean and uninstall + targets. + 2002-07-23 09:00 Evgeny Chukreev <co...@ec...> Index: ChangeLog.update =================================================================== RCS file: /cvsroot/ap-python/python/ChangeLog.update,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChangeLog.update 15 May 2002 09:44:24 -0000 1.4 --- ChangeLog.update 19 Aug 2002 16:47:36 -0000 1.5 *************** *** 12,14 **** examples/aptk/ChangeLog\ examples/main/ChangeLog\ ! examples/apcontrol/ChangeLog --- 12,15 ---- examples/aptk/ChangeLog\ examples/main/ChangeLog\ ! examples/apcontrol/ChangeLog\ ! po/ChangeLog |
From: <sj...@us...> - 2002-08-19 16:45:40
|
Update of /cvsroot/ap-python/python/po In directory usw-pr-cvs1:/tmp/cvs-serv29642/po Added Files: .cvsignore Makefile.am pygettext.py ru.po Log Message: Make __data__ and __version__ mean what they should mean. I18N. Fix distclean and uninstall targets. --- NEW FILE: .cvsignore --- Makefile Makefile.in *.gmo aptk.pot --- NEW FILE: Makefile.am --- # Languages pofiles=ru.po mofiles=ru.gmo pomo=$(pofiles) $(mofiles) EXTRA_DIST = pygettext.py aptk.pot $(pomo) # Setuo gettext=$(top_srcdir)/po/pygettext.py gnulocaledir = $(prefix)/share/locale CATOBJEXT=.gmo PACKAGE=aptk INSTOBJEXT=.mo if ENABLE_APTK if ENABLE_PO all-local: aptk.pot $(pomo) install-data-local: all-local if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi for cat in $(mofiles); do \ cat=`basename $$cat`; \ destdir=$(DESTDIR)$(gnulocaledir); \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \ fi; \ done endif endif uninstall: for cat in $(mofiles); do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ done # General rules aptk.pot: $(top_srcdir)/aptk/*.py $(gettext) -o aptk.pot $(top_srcdir)/aptk/*.py %.po: aptk.pot @msgmergepath@ $@ aptk.pot -o $@x mv $@x $@ %.gmo: %.po @msgfmtpath@ $^ -o $@ --- NEW FILE: pygettext.py --- #! /usr/bin/env python # Originally written by Barry Warsaw <ba...@zo...> # # Minimally patched to make it even more xgettext compatible # by Peter Funk <pf...@ar...> # Modified by Evgeny Chukreev <co...@ec...> """pygettext -- Python equivalent of xgettext(1) Many systems (Solaris, Linux, Gnu) provide extensive tools that ease the internationalization of C programs. Most of these tools are independent of the programming language and can be used from within Python programs. Martin von Loewis' work[1] helps considerably in this regard. There's one problem though; xgettext is the program that scans source code looking for message strings, but it groks only C (or C++). Python introduces a few wrinkles, such as dual quoting characters, triple quoted strings, and raw strings. xgettext understands none of this. Enter pygettext, which uses Python's standard tokenize module to scan Python source code, generating .pot files identical to what GNU xgettext[2] generates for C and C++ code. From there, the standard GNU tools can be used. A word about marking Python strings as candidates for translation. GNU xgettext recognizes the following keywords: gettext, dgettext, dcgettext, and gettext_noop. But those can be a lot of text to include all over your code. C and C++ have a trick: they use the C preprocessor. Most internationalized C source includes a #define for gettext() to _() so that what has to be written in the source is much less. Thus these are both translatable strings: gettext("Translatable String") _("Translatable String") Python of course has no preprocessor so this doesn't work so well. Thus, pygettext searches only for _() by default, but see the -k/--keyword flag below for how to augment this. [1] http://www.python.org/workshops/1997-10/proceedings/loewis.html [2] http://www.gnu.org/software/gettext/gettext.html NOTE: pygettext attempts to be option and feature compatible with GNU xgettext where ever possible. However some options are still missing or are not fully implemented. Also, xgettext's use of command line switches with option arguments is broken, and in these cases, pygettext just defines additional switches. Usage: pygettext [options] inputfile ... Options: -a --extract-all Extract all strings. -d name --default-domain=name Rename the default output file from messages.pot to name.pot. -E --escape Replace non-ASCII characters with octal escape sequences. -D --docstrings Extract module, class, method, and function docstrings. These do not need to be wrapped in _() markers, and in fact cannot be for Python to consider them docstrings. (See also the -X option). -h --help Print this help message and exit. -k word --keyword=word Keywords to look for in addition to the default set, which are: %(DEFAULTKEYWORDS)s You can have multiple -k flags on the command line. -K --no-default-keywords Disable the default set of keywords (see above). Any keywords explicitly added with the -k/--keyword option are still recognized. --no-location Do not write filename/lineno location comments. -n --add-location Write filename/lineno location comments indicating where each extracted string is found in the source. These lines appear before each msgid. The style of comments is controlled by the -S/--style option. This is the default. -o filename --output=filename Rename the default output file from messages.pot to filename. If filename is `-' then the output is sent to standard out. -p dir --output-dir=dir Output files will be placed in directory dir. -S stylename --style stylename Specify which style to use for location comments. Two styles are supported: Solaris # File: filename, line: line-number GNU #: filename:line The style name is case insensitive. GNU style is the default. -v --verbose Print the names of the files being processed. -V --version Print the version of pygettext and exit. -w columns --width=columns Set width of output to columns. -x filename --exclude-file=filename Specify a file that contains a list of strings that are not be extracted from the input files. Each string to be excluded must appear on a line by itself in the file. -X filename --no-docstrings=filename Specify a file that contains a list of files (one per line) that should not have their docstrings extracted. This is only useful in conjunction with the -D option above. If `inputfile' is -, standard input is read. """ import os import sys import time import getopt import tokenize import operator # for selftesting try: import fintl _ = fintl.gettext except ImportError: def _(s): return s __version__ = '1.4' default_keywords = ['_'] DEFAULTKEYWORDS = ', '.join(default_keywords) EMPTYSTRING = '' # The normal pot-file header. msgmerge and Emacs's po-mode work better if it's # there. pot_header = _('''\ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR ORGANIZATION # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #,fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\\n" "POT-Creation-Date: %(time)s\\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n" "Language-Team: LANGUAGE <LL...@li...>\\n" "MIME-Version: 1.0\\n" "Content-Type: text/plain; charset=CHARSET\\n" "Content-Transfer-Encoding: ENCODING\\n" "Generated-By: pygettext.py %(version)s\\n" ''') def usage(code, msg=''): print >> sys.stderr, _(__doc__) % globals() if msg: print >> sys.stderr, msg sys.exit(code) escapes = [] def make_escapes(pass_iso8859): global escapes if pass_iso8859: # Allow iso-8859 characters to pass through so that e.g. 'msgid # "Höhe"' would result not result in 'msgid "H\366he"'. Otherwise we # escape any character outside the 32..126 range. mod = 128 else: mod = 256 for i in range(256): if 32 <= (i % mod) <= 126: escapes.append(chr(i)) else: escapes.append("\\%03o" % i) escapes[ord('\\')] = '\\\\' escapes[ord('\t')] = '\\t' escapes[ord('\r')] = '\\r' escapes[ord('\n')] = '\\n' escapes[ord('\"')] = '\\"' def escape(s): global escapes s = list(s) for i in range(len(s)): s[i] = escapes[ord(s[i])] return EMPTYSTRING.join(s) def safe_eval(s): # unwrap quotes, safely return eval(s, {'__builtins__':{}}, {}) def normalize(s): # This converts the various Python string types into a format that is # appropriate for .po files, namely much closer to C style. lines = s.split('\n') if len(lines) == 1: s = '"' + escape(s) + '"' else: if not lines[-1]: del lines[-1] lines[-1] = lines[-1] + '\n' for i in range(len(lines)): lines[i] = escape(lines[i]) lineterm = '\\n"\n"' s = '""\n"' + lineterm.join(lines) + '"' return s class TokenEater: def __init__(self, options): self.__options = options self.__messages = {} self.__state = self.__waiting self.__data = [] self.__lineno = -1 self.__freshmodule = 1 self.__curfile = None def __call__(self, ttype, tstring, stup, etup, line): # dispatch ## import token ## print >> sys.stderr, 'ttype:', token.tok_name[ttype], \ ## 'tstring:', tstring self.__state(ttype, tstring, stup[0]) def __waiting(self, ttype, tstring, lineno): opts = self.__options # Do docstring extractions, if enabled if opts.docstrings and not opts.nodocstrings.get(self.__curfile): # module docstring? if self.__freshmodule: if ttype == tokenize.STRING: self.__addentry(safe_eval(tstring), lineno, isdocstring=1) self.__freshmodule = 0 elif ttype not in (tokenize.COMMENT, tokenize.NL): self.__freshmodule = 0 return # class docstring? if ttype == tokenize.NAME and tstring in ('class', 'def'): self.__state = self.__suiteseen return if ttype == tokenize.NAME and tstring in opts.keywords: self.__state = self.__keywordseen def __suiteseen(self, ttype, tstring, lineno): # ignore anything until we see the colon if ttype == tokenize.OP and tstring == ':': self.__state = self.__suitedocstring def __suitedocstring(self, ttype, tstring, lineno): # ignore any intervening noise if ttype == tokenize.STRING: self.__addentry(safe_eval(tstring), lineno, isdocstring=1) self.__state = self.__waiting elif ttype not in (tokenize.NEWLINE, tokenize.INDENT, tokenize.COMMENT): # there was no class docstring self.__state = self.__waiting def __keywordseen(self, ttype, tstring, lineno): if ttype == tokenize.OP and tstring == '(': self.__data = [] self.__lineno = lineno self.__state = self.__openseen else: self.__state = self.__waiting def __openseen(self, ttype, tstring, lineno): if ttype == tokenize.OP and tstring == ')': # We've seen the last of the translatable strings. Record the # line number of the first line of the strings and update the list # of messages seen. Reset state for the next batch. If there # were no strings inside _(), then just ignore this entry. if self.__data: self.__addentry(EMPTYSTRING.join(self.__data)) self.__state = self.__waiting elif ttype == tokenize.STRING: self.__data.append(safe_eval(tstring)) # TBD: should we warn if we seen anything else? def __addentry(self, msg, lineno=None, isdocstring=0): if lineno is None: lineno = self.__lineno if not msg in self.__options.toexclude: entry = (self.__curfile, lineno) self.__messages.setdefault(msg, {})[entry] = isdocstring def set_filename(self, filename): self.__curfile = filename self.__freshmodule = 1 def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # The time stamp in the header doesn't have the same format as that # generated by xgettext... print >> fp, pot_header % {'time': timestamp, 'version': __version__} # Sort the entries. First sort each particular entry's keys, then # sort all the entries by their first item. reverse = {} for k, v in self.__messages.items(): keys = v.keys() keys.sort() reverse.setdefault(tuple(keys), []).append((k, v)) rkeys = reverse.keys() rkeys.sort() for rkey in rkeys: rentries = reverse[rkey] rentries.sort() for k, v in rentries: isdocstring = 0 # If the entry was gleaned out of a docstring, then add a # comment stating so. This is to aid translators who may wish # to skip translating some unimportant docstrings. if reduce(operator.__add__, v.values()): isdocstring = 1 # k is the message string, v is a dictionary-set of (filename, # lineno) tuples. We want to sort the entries in v first by # file name and then by line number. v = v.keys() v.sort() if not options.writelocations: pass # location comments are different b/w Solaris and GNU: elif options.locationstyle == options.SOLARIS: for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} print >>fp, _( '# File: %(filename)s, line: %(lineno)d') % d elif options.locationstyle == options.GNU: # fit as many locations on one line, as long as the # resulting line length doesn't exceeds 'options.width' locline = '#:' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: print >> fp, locline locline = "#:" + s if len(locline) > 2: print >> fp, locline if isdocstring: print >> fp, '#, docstring' print >> fp, 'msgid', normalize(k) print >> fp, 'msgstr ""\n' def main(): global default_keywords try: opts, args = getopt.getopt( sys.argv[1:], 'ad:DEhk:Kno:p:S:Vvw:x:X:', ['extract-all', 'default-domain=', 'escape', 'help', 'keyword=', 'no-default-keywords', 'add-location', 'no-location', 'output=', 'output-dir=', 'style=', 'verbose', 'version', 'width=', 'exclude-file=', 'docstrings', 'no-docstrings', ]) except getopt.error, msg: usage(1, msg) # for holding option values class Options: # constants GNU = 1 SOLARIS = 2 # defaults extractall = 0 # FIXME: currently this option has no effect at all. escape = 0 keywords = [] outpath = '' outfile = 'messages.pot' writelocations = 1 locationstyle = GNU verbose = 0 width = 78 excludefilename = '' docstrings = 0 nodocstrings = {} options = Options() locations = {'gnu' : options.GNU, 'solaris' : options.SOLARIS, } # parse options for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-a', '--extract-all'): options.extractall = 1 elif opt in ('-d', '--default-domain'): options.outfile = arg + '.pot' elif opt in ('-E', '--escape'): options.escape = 1 elif opt in ('-D', '--docstrings'): options.docstrings = 1 elif opt in ('-k', '--keyword'): options.keywords.append(arg) elif opt in ('-K', '--no-default-keywords'): default_keywords = [] elif opt in ('-n', '--add-location'): options.writelocations = 1 elif opt in ('--no-location',): options.writelocations = 0 elif opt in ('-S', '--style'): options.locationstyle = locations.get(arg.lower()) if options.locationstyle is None: usage(1, _('Invalid value for --style: %s') % arg) elif opt in ('-o', '--output'): options.outfile = arg elif opt in ('-p', '--output-dir'): options.outpath = arg elif opt in ('-v', '--verbose'): options.verbose = 1 elif opt in ('-V', '--version'): print _('pygettext.py (xgettext for Python) %s') % __version__ sys.exit(0) elif opt in ('-w', '--width'): try: options.width = int(arg) except ValueError: usage(1, _('--width argument must be an integer: %s') % arg) elif opt in ('-x', '--exclude-file'): options.excludefilename = arg elif opt in ('-X', '--no-docstrings'): fp = open(arg) try: while 1: line = fp.readline() if not line: break options.nodocstrings[line[:-1]] = 1 finally: fp.close() # calculate escapes make_escapes(options.escape) # calculate all keywords options.keywords.extend(default_keywords) # initialize list of strings to exclude if options.excludefilename: try: fp = open(options.excludefilename) options.toexclude = fp.readlines() fp.close() except IOError: print >> sys.stderr, _( "Can't read --exclude-file: %s") % options.excludefilename sys.exit(1) else: options.toexclude = [] # slurp through all the files eater = TokenEater(options) for filename in args: if filename == '-': if options.verbose: print _('Reading standard input') fp = sys.stdin closep = 0 else: if options.verbose: print _('Working on %s') % filename fp = open(filename) closep = 1 try: eater.set_filename(filename) try: tokenize.tokenize(fp.readline, eater) except tokenize.TokenError, e: print >> sys.stderr, '%s: %s, line %d, column %d' % ( e[0], filename, e[1][0], e[1][1]) finally: if closep: fp.close() # write the output if options.outfile == '-': fp = sys.stdout closep = 0 else: if options.outpath: options.outfile = os.path.join(options.outpath, options.outfile) fp = open(options.outfile, 'w') closep = 1 try: eater.write(fp) finally: if closep: fp.close() if __name__ == '__main__': main() # some more test strings _(u'a unicode string') --- NEW FILE: ru.po --- # Russian messages for aptk module # Evgeny Chukreev <co...@ec...>, 2002. # msgid "" msgstr "" "Project-Id-Version: APTK 0.3.0\n" "POT-Creation-Date: Mon Aug 19 23:36:15 2002\n" "PO-Revision-Date: 2002-08-19 20:52+0700\n" "Last-Translator: Evgeny Chukreev <co...@ec...>\n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.4\n" #: ../aptk/control.py:43 msgid "Play" msgstr "ÐгÑаÑÑ" #: ../aptk/control.py:71 msgid "Next" msgstr "ÐпеÑед" #: ../aptk/control.py:99 msgid "Prev" msgstr "Ðазад" #: ../aptk/control.py:127 msgid "Stop" msgstr "ÐÑÑановиÑÑ" #: ../aptk/control.py:157 msgid "Playlist" msgstr "ÐлÑйлиÑÑ" #: ../aptk/pan.py:120 msgid "Left" msgstr "Ðево" #: ../aptk/pan.py:121 msgid "Center" msgstr "ЦенÑÑ" #: ../aptk/pan.py:122 msgid "Right" msgstr "ÐÑаво" #: ../aptk/playlist.py:37 ../aptk/playlist.py:398 msgid "Playtime" msgstr "ÐлиÑелÑноÑÑÑ" #: ../aptk/playlist.py:38 ../aptk/playlist.py:399 msgid "Year" msgstr "Ðод" #: ../aptk/playlist.py:39 ../aptk/playlist.py:400 msgid "Track" msgstr "ТÑÑк" #: ../aptk/playlist.py:40 ../aptk/playlist.py:401 msgid "Title" msgstr "Ðазвание" #: ../aptk/playlist.py:41 ../aptk/playlist.py:402 msgid "Album" msgstr "ÐлÑбом" #: ../aptk/playlist.py:42 ../aptk/playlist.py:403 msgid "Artist" msgstr "ÐÑполниÑелÑ" #: ../aptk/playlist.py:43 ../aptk/playlist.py:404 msgid "Genre" msgstr "ÐанÑ" #: ../aptk/playlist.py:44 ../aptk/playlist.py:405 msgid "Comment" msgstr "ÐомменÑаÑий" #: ../aptk/playlist.py:45 ../aptk/playlist.py:406 msgid "Filename" msgstr "ÐÐ¼Ñ Ñайла" #: ../aptk/playlist.py:241 msgid "Clear" msgstr "ÐÑиÑÑиÑÑ" #: ../aptk/playlist.py:242 msgid "Do you want to clear playlist?" msgstr "ÐÑ Ñ Ð¾ÑиÑе оÑиÑÑиÑÑ Ð¿Ð»ÑйлиÑÑ?" #: ../aptk/playlist.py:291 msgid "Remove" msgstr "УдалиÑÑ" #: ../aptk/playlist.py:293 msgid "Do you want to remove selected items from the playlist?" msgstr "ÐÑ Ñ Ð¾ÑиÑе ÑдалиÑÑ Ð²ÑбÑаннÑе ÑÐ°Ð¹Ð»Ñ Ð¸Ð· плÑйлиÑÑа?" #: ../aptk/playlist.py:353 msgid "Sort" msgstr "СоÑÑиÑоваÑÑ" #: ../aptk/playlist.py:395 msgid "Sorting field" msgstr "Ðоле ÑоÑÑиÑовки" #: ../aptk/playlist.py:397 msgid "Sorting priorities" msgstr "ÐÑиоÑиÑеÑÑ ÑоÑÑиÑовки" |
Update of /cvsroot/ap-python/python/aptk In directory usw-pr-cvs1:/tmp/cvs-serv29642/aptk Modified Files: __init__.py control.py info.py language.py misc.py pan.py playlist.py position.py speed.py volume.py Log Message: Make __data__ and __version__ mean what they should mean. I18N. Fix distclean and uninstall targets. Index: __init__.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/__init__.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** __init__.py 16 Aug 2002 05:36:11 -0000 1.4 --- __init__.py 19 Aug 2002 16:45:37 -0000 1.5 *************** *** 22,36 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" - - import misc - import control - import volume - import speed - import pan - import position - import info - import playlist - import language --- 22,26 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" Index: control.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/control.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** control.py 28 Jul 2002 13:45:46 -0000 1.9 --- control.py 19 Aug 2002 16:45:37 -0000 1.10 *************** *** 25,34 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" ! import aptk, alsaplayer, gtk ! gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 25,36 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" ! import alsaplayer, gtk, aptk.misc, aptk.playlist, aptk.language ! ! # Setup for i18n ! _ = aptk.language.tr # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 39,43 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.play.button.label', 'Play') ]) --- 41,45 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.play.button.label', _('Play')) ]) *************** *** 56,62 **** def __gtkcb_clicked (self, w): ! gdk.threads_leave () self.__pl.play (self.__pl.get_current ()) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 58,64 ---- def __gtkcb_clicked (self, w): ! gtk.gdk.threads_leave () self.__pl.play (self.__pl.get_current ()) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 67,71 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.next.button.label', 'Next') ]) --- 69,73 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.next.button.label', _('Next')) ]) *************** *** 84,90 **** def __gtkcb_clicked (self, w): ! gdk.threads_leave () self.__pl.next () ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 86,92 ---- def __gtkcb_clicked (self, w): ! gtk.gdk.threads_leave () self.__pl.next () ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 95,99 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.prev.button.label', 'Prev') ]) --- 97,101 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.prev.button.label', _('Prev')) ]) *************** *** 112,118 **** def __gtkcb_clicked (self, w): ! gdk.threads_leave () self.__pl.prev () ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 114,120 ---- def __gtkcb_clicked (self, w): ! gtk.gdk.threads_leave () self.__pl.prev () ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 123,127 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.stop.button.label', 'Stop') ]) --- 125,129 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.stop.button.label', _('Stop')) ]) *************** *** 140,146 **** def __gtkcb_clicked (self, w): ! gdk.threads_leave () self.__pl.stop () ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 142,148 ---- def __gtkcb_clicked (self, w): ! gtk.gdk.threads_leave () self.__pl.stop () ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 153,157 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.playlist.button.label', 'Playlist') ]) --- 155,159 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.playlist.button.label', _('Playlist')) ]) Index: info.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/info.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** info.py 28 Jul 2002 13:45:46 -0000 1.10 --- info.py 19 Aug 2002 16:45:37 -0000 1.11 *************** *** 22,31 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" import aptk.misc, alsaplayer, gtk, locale - gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 22,30 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" import aptk.misc, alsaplayer, gtk, locale # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 50,56 **** # Update label ! gdk.threads_enter () self.set_text (s) ! gdk.threads_leave () return 1 --- 49,55 ---- # Update label ! gtk.gdk.threads_enter () self.set_text (s) ! gtk.gdk.threads_leave () return 1 *************** *** 93,99 **** if status: # Show status ! gdk.threads_enter () self.set_text (status) ! gdk.threads_leave () else: # Show time --- 92,98 ---- if status: # Show status ! gtk.gdk.threads_enter () self.set_text (status) ! gtk.gdk.threads_leave () else: # Show time *************** *** 107,113 **** t_m, t_s = divmod (total, 60) ! gdk.threads_enter () self.set_text ("%02u:%02u/%02u:%02u" % (m, s, t_m, t_s)) ! gdk.threads_leave () def __gtkcb_press_event (self, widget, event): --- 106,112 ---- t_m, t_s = divmod (total, 60) ! gtk.gdk.threads_enter () self.set_text ("%02u:%02u/%02u:%02u" % (m, s, t_m, t_s)) ! gtk.gdk.threads_leave () def __gtkcb_press_event (self, widget, event): *************** *** 121,125 **** # Calculate time based on a position adjustment value ! gdk.threads_leave () played = self.__cp.get_current_time (self.__adj.value) / 100 --- 120,124 ---- # Calculate time based on a position adjustment value ! gtk.gdk.threads_leave () played = self.__cp.get_current_time (self.__adj.value) / 100 *************** *** 130,134 **** t_m, t_s = divmod (total, 60) ! gdk.threads_enter () # Update label --- 129,133 ---- t_m, t_s = divmod (total, 60) ! gtk.gdk.threads_enter () # Update label *************** *** 141,154 **** # Dragging is done, so we should show now playing position ! gdk.threads_leave () self.cb_position_notify () ! gdk.threads_enter () def __gtkcb_destroy (self, widget): """Callback handler for a destroy signal.""" ! gdk.threads_leave () self.__cp.unregister_notifier (self) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 140,153 ---- # Dragging is done, so we should show now playing position ! gtk.gdk.threads_leave () self.cb_position_notify () ! gtk.gdk.threads_enter () def __gtkcb_destroy (self, widget): """Callback handler for a destroy signal.""" ! gtk.gdk.threads_leave () self.__cp.unregister_notifier (self) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 253,264 **** # Set right value ! if thread: gdk.threads_enter () self.set_text (s) ! if thread: gdk.threads_leave () def __gtkcb_destroy (self, widget): """Callback for a destroy signal.""" ! gdk.threads_leave () self.__cp.unregister_notifier (self) ! gdk.threads_enter () --- 252,263 ---- # Set right value ! if thread: gtk.gdk.threads_enter () self.set_text (s) ! if thread: gtk.gdk.threads_leave () def __gtkcb_destroy (self, widget): """Callback for a destroy signal.""" ! gtk.gdk.threads_leave () self.__cp.unregister_notifier (self) ! gtk.gdk.threads_enter () Index: language.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/language.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** language.py 16 Aug 2002 05:43:08 -0000 1.1 --- language.py 19 Aug 2002 16:45:37 -0000 1.2 *************** *** 18,64 **** # $Id$ # - # XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX - # XXX This is UTF8 encoded file. Be careful XXX - # XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" ! import locale ! ! language, charset = locale.getlocale () ! ! # All translations ! translations = { ! # Russian ! 'ru_RU' : { ! 'Sorting field' : "Ðоле ÑоÑÑиÑовки", ! 'Add' : "ÐобавиÑÑ", ! 'Remove' : "УдалиÑÑ", ! 'Playtime' : "ÐлиÑелÑноÑÑÑ", ! 'Year' : "Ðод", ! 'Track' : "ÐомеÑ", ! 'Title' : "Ðаголовок", ! 'Album' : "ÐлÑбом", ! 'Artist' : "ÐÑполниÑелÑ", ! 'Genre' : "ÐанÑ", ! 'Comment' : "ÐоменÑаÑий", ! 'Filename' : "ÐÐ¼Ñ Ñайла", ! 'Clear' : "ÐÑиÑÑиÑÑ", ! 'Do you want to clear playlist?' ! : "ÐÑ Ñ Ð¾ÑиÑе оÑиÑÑиÑÑ Ð¿Ð»ÑйлиÑÑ?", ! 'Do you want to remove selected items from the playlist?' ! : "ÐÑ Ñ Ð¾ÑиÑе ÑдалиÑÑ Ð²ÑделеннÑе композиÑии из плÑйлиÑÑа?", ! 'Sort' : "СоÑÑиÑоваÑÑ", ! 'Sorting priorities' : "ÐÑиоÑиÑеÑÑ ÑоÑÑиÑовки" ! } ! } ! ! # Select only one translation which is good for a current language ! translation = translations [language] ! del translations ! def tr (sentence): ! return translation.get (sentence, sentence) --- 18,36 ---- # $Id$ # __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" ! import gettext ! # Set translation handler ! try: ! tr = gettext.translation ("aptk").ugettext ! except IOError: ! try: ! tr = gettext.translation ("aptk", "/usr/local/share/locale").ugettext ! except IOError: ! def tr (s): ! return s Index: misc.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/misc.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** misc.py 16 Aug 2002 05:36:11 -0000 1.7 --- misc.py 19 Aug 2002 16:45:37 -0000 1.8 *************** *** 20,25 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" --- 20,25 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" Index: pan.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/pan.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** pan.py 28 Jul 2002 13:45:46 -0000 1.6 --- pan.py 19 Aug 2002 16:45:37 -0000 1.7 *************** *** 20,29 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" ! import aptk.misc, alsaplayer, gtk ! gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 20,31 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" ! import aptk.misc, alsaplayer, gtk, aptk.language ! ! # Setup for i18n ! _ = aptk.language.tr # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 54,65 **** self.connect ("destroy", self.__gtkcb_destroy) - def __gtkcb_pan_changed (self, w): """Gtk callback handler for scale changes.""" if not self.__cp_locked: ! gdk.threads_leave () self.__cp.set_pan (w.value); ! gdk.threads_enter () def cb_pan_changed (self, pan): --- 56,66 ---- self.connect ("destroy", self.__gtkcb_destroy) def __gtkcb_pan_changed (self, w): """Gtk callback handler for scale changes.""" if not self.__cp_locked: ! gtk.gdk.threads_leave () self.__cp.set_pan (w.value); ! gtk.gdk.threads_enter () def cb_pan_changed (self, pan): *************** *** 68,74 **** self.__cp_locked = 1 ! gdk.threads_enter () self.__adj.set_value (pan) ! gdk.threads_leave () self.__cp_locked = 0 --- 69,75 ---- self.__cp_locked = 1 ! gtk.gdk.threads_enter () self.__adj.set_value (pan) ! gtk.gdk.threads_leave () self.__cp_locked = 0 *************** *** 77,83 **** """Called on the destroy.""" ! gdk.threads_leave () self.__cp.unregister_notifier (self) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 78,84 ---- """Called on the destroy.""" ! gtk.gdk.threads_leave () self.__cp.unregister_notifier (self) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 109,115 **** def __gtkcb_clicked (self, w): ! gdk.threads_leave () self.__cp.set_pan (self.__value) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 110,116 ---- def __gtkcb_clicked (self, w): ! gtk.gdk.threads_leave () self.__cp.set_pan (self.__value) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 117,123 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.pan.left.button.label', 'Left'), ! ('**.pan.center.button.label', 'Center'), ! ('**.pan.right.button.label', 'Right') ]) --- 118,124 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.pan.left.button.label', _('Left')), ! ('**.pan.center.button.label', _('Center')), ! ('**.pan.right.button.label', _('Right')) ]) Index: playlist.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/playlist.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** playlist.py 16 Aug 2002 05:36:11 -0000 1.13 --- playlist.py 19 Aug 2002 16:45:37 -0000 1.14 *************** *** 20,44 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" ! import gtk, aptk, gobject, locale, aptk.language ! gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # class List (gtk.ScrolledWindow): __properties = aptk.misc.WidgetProperties ([ ! ('**.list.columns', ('current', 'playtime', 'track', 'title', 'album', ! 'artist', 'year', 'genre')), ! ('**.list.playtime.label', aptk.language.tr ('Playtime')), ! ('**.list.year.label', aptk.language.tr ('Year')), ! ('**.list.track.label', aptk.language.tr ('Track')), ! ('**.list.title.label', aptk.language.tr ('Title')), ! ('**.list.album.label', aptk.language.tr ('Album')), ! ('**.list.artist.label', aptk.language.tr ('Artist')), ! ('**.list.genre.label', aptk.language.tr ('Genre')), ! ('**.list.comment.label', aptk.language.tr ('Comment')), ! ('**.list.filename.label', aptk.language.tr ('Filename')), ('**.list.current.label', ''), ('**.list.mark.label', '-->'), --- 20,47 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" ! import gtk, gobject, locale, aptk.language ! ! # Setup for i18n ! _ = aptk.language.tr # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # class List (gtk.ScrolledWindow): __properties = aptk.misc.WidgetProperties ([ ! ('**.list.columns', ('current', 'playtime', 'track', ! 'title', 'album', 'artist', ! 'year', 'genre')), ! ('**.list.playtime.label', _('Playtime')), ! ('**.list.year.label', _('Year')), ! ('**.list.track.label', _('Track')), ! ('**.list.title.label', _('Title')), ! ('**.list.album.label', _('Album')), ! ('**.list.artist.label', _('Artist')), ! ('**.list.genre.label', _('Genre')), ! ('**.list.comment.label', _('Comment')), ! ('**.list.filename.label', _('Filename')), ('**.list.current.label', ''), ('**.list.mark.label', '-->'), *************** *** 53,59 **** # Types of the first columns ! __types = (gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, ! gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, ! gobject.TYPE_STRING) # Numbers for columns --- 56,62 ---- # Types of the first columns ! __types = (gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, ! gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, ! gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) # Numbers for columns *************** *** 70,74 **** # Blank pixbuf ! __blank_pixbuf = gdk.Pixbuf (gdk.COLORSPACE_RGB, 1, 8, 1, 1) __blank_pixbuf.fill (0) --- 73,77 ---- # Blank pixbuf ! __blank_pixbuf = gtk.gdk.Pixbuf (gtk.gdk.COLORSPACE_RGB, 1, 8, 1, 1) __blank_pixbuf.fill (0) *************** *** 94,98 **** mark_file = prop.get_value (prefix + ".mark.file") if mark_file: ! self.__mark_pixbuf = gdk.pixbuf_new_from_file (mark_file) current_column_type = gobject.TYPE_OBJECT else: --- 97,101 ---- mark_file = prop.get_value (prefix + ".mark.file") if mark_file: ! self.__mark_pixbuf = gtk.gdk.pixbuf_new_from_file (mark_file) current_column_type = gobject.TYPE_OBJECT else: *************** *** 236,241 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.clear.button.label', aptk.language.tr ('Clear')), ! ('**.clear.warning', aptk.language.tr ('Do you want to clear playlist?')), ('**.clear.confirm', 1) ]) --- 239,244 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.clear.button.label', _('Clear')), ! ('**.clear.warning', _('Do you want to clear playlist?')), ('**.clear.confirm', 1) ]) *************** *** 275,281 **** # Clear if answer is Yes ! gtk.threads_leave () self.__pl.clear () ! gtk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 278,284 ---- # Clear if answer is Yes ! gtk.gdk.threads_leave () self.__pl.clear () ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 286,293 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.remove.button.label', ! aptk.language.tr ('Remove')), ! ('**.remove.warning', ! aptk.language.tr ('Do you want to remove selected items from the playlist?')), ('**.remove.confirm', 1) ]) --- 289,295 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.remove.button.label', _('Remove')), ! ('**.remove.warning', ! _('Do you want to remove selected items from the playlist?')), ('**.remove.confirm', 1) ]) *************** *** 337,344 **** # TODO: FIx this dumb algorithm ! gdk.threads_leave () for n in list: self.__pl.remove (n+1, n+1) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 339,346 ---- # TODO: FIx this dumb algorithm ! gtk.gdk.threads_leave () for n in list: self.__pl.remove (n+1, n+1) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 349,353 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.sort.button.label', aptk.language.tr ('Sort')) ]) --- 351,355 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.sort.button.label', _('Sort')) ]) *************** *** 379,385 **** # Clear if answer is Yes ! gtk.threads_leave () self.__pl.sort (d.sequence) ! gtk.threads_enter () if rc != gtk.RESPONSE_APPLY: break --- 381,387 ---- # Clear if answer is Yes ! gtk.gdk.threads_leave () self.__pl.sort (d.sequence) ! gtk.gdk.threads_enter () if rc != gtk.RESPONSE_APPLY: break *************** *** 391,408 **** # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.dialog.list.field.label', aptk.language.tr ('Sorting field')), ('**.dialog.sequence', 'AyLNTFGPC'), ! ('**.dialog.title', aptk.language.tr ('Sorting priorities')), ! ('**.dialog.list.playtime', aptk.language.tr ('Playtime')), ! ('**.dialog.list.year', aptk.language.tr ('Year')), ! ('**.dialog.list.track', aptk.language.tr ('Track')), ! ('**.dialog.list.title', aptk.language.tr ('Title')), ! ('**.dialog.list.album', aptk.language.tr ('Album')), ! ('**.dialog.list.artist', aptk.language.tr ('Artist')), ! ('**.dialog.list.genre', aptk.language.tr ('Genre')), ! ('**.dialog.list.comment', aptk.language.tr ('Comment')), ! ('**.dialog.list.filename', aptk.language.tr ('Filename')) ]) __chars = { 'a' : ("artist", gtk.TRUE), --- 393,411 ---- # Defualt properties __properties = aptk.misc.WidgetProperties ([ ! ('**.dialog.list.field.label', _('Sorting field')), ('**.dialog.sequence', 'AyLNTFGPC'), ! ('**.dialog.title', _('Sorting priorities')), ! ('**.dialog.list.playtime', _('Playtime')), ! ('**.dialog.list.year', _('Year')), ! ('**.dialog.list.track', _('Track')), ! ('**.dialog.list.title', _('Title')), ! ('**.dialog.list.album', _('Album')), ! ('**.dialog.list.artist', _('Artist')), ! ('**.dialog.list.genre', _('Genre')), ! ('**.dialog.list.comment', _('Comment')), ! ('**.dialog.list.filename', _('Filename')) ]) + # Chars meaning __chars = { 'a' : ("artist", gtk.TRUE), *************** *** 588,592 **** """Alsaplayer's callback.""" ! gdk.threads_enter () for item in items: --- 591,595 ---- """Alsaplayer's callback.""" ! gtk.gdk.threads_enter () for item in items: *************** *** 603,612 **** pos += 1 ! gdk.threads_leave () def cb_updated (self, item, pos): """Alsaplayer's callback.""" ! gdk.threads_enter () self.__list.set (pos, --- 606,615 ---- pos += 1 ! gtk.gdk.threads_leave () def cb_updated (self, item, pos): """Alsaplayer's callback.""" ! gtk.gdk.threads_enter () self.__list.set (pos, *************** *** 621,639 **** filename = item.filename) ! gdk.threads_leave () def cb_set_current (self, row): """Alsaplayer's callback.""" ! gdk.threads_enter () self.__list.mark_row (row-1) ! gdk.threads_leave () def cb_clear (self): """Alsaplayer's callback.""" ! gdk.threads_enter () self.__list.clear () ! gdk.threads_leave () def cb_remove (self, start, end): --- 624,642 ---- filename = item.filename) ! gtk.gdk.threads_leave () def cb_set_current (self, row): """Alsaplayer's callback.""" ! gtk.gdk.threads_enter () self.__list.mark_row (row-1) ! gtk.gdk.threads_leave () def cb_clear (self): """Alsaplayer's callback.""" ! gtk.gdk.threads_enter () self.__list.clear () ! gtk.gdk.threads_leave () def cb_remove (self, start, end): *************** *** 646,657 **** """Handler for a row activated signal.""" ! gdk.threads_leave () self.__pl.play (path [0] + 1) ! gdk.threads_enter () def __gtkcb_destroy (self, widget): """Called on the destroy.""" ! gdk.threads_leave () self.__pl.unregister (self) ! gdk.threads_enter () --- 649,660 ---- """Handler for a row activated signal.""" ! gtk.gdk.threads_leave () self.__pl.play (path [0] + 1) ! gtk.gdk.threads_enter () def __gtkcb_destroy (self, widget): """Called on the destroy.""" ! gtk.gdk.threads_leave () self.__pl.unregister (self) ! gtk.gdk.threads_enter () Index: position.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/position.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** position.py 21 Jul 2002 18:15:43 -0000 1.4 --- position.py 19 Aug 2002 16:45:37 -0000 1.5 *************** *** 20,29 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" import alsaplayer, gtk, aptk.misc - gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 20,28 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" import alsaplayer, gtk, aptk.misc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 60,69 **** can_seek = self.__cp.can_seek () ! if thread: gdk.threads_enter () self.__adj.upper = float (self.__cp.get_frames () - 34) self.set_sensitive (can_seek) ! if thread: gdk.threads_leave () def cb_position_notify (self, pos): --- 59,68 ---- can_seek = self.__cp.can_seek () ! if thread: gtk.gdk.threads_enter () self.__adj.upper = float (self.__cp.get_frames () - 34) self.set_sensitive (can_seek) ! if thread: gtk.gdk.threads_leave () def cb_position_notify (self, pos): *************** *** 75,81 **** # FIXME: # Hack derived from Andy's gtk_interface.cpp. Why 34 is here? ;) ! gdk.threads_enter () self.__adj.set_value (pos) ! gdk.threads_leave () def __gtkcb_press_event (self, widget, event): --- 74,80 ---- # FIXME: # Hack derived from Andy's gtk_interface.cpp. Why 34 is here? ;) ! gtk.gdk.threads_enter () self.__adj.set_value (pos) ! gtk.gdk.threads_leave () def __gtkcb_press_event (self, widget, event): *************** *** 94,100 **** if self.__motion: ! gdk.threads_leave () self.__cp.seek (self.__adj.value) ! gdk.threads_enter () self.__dragging = 0 --- 93,99 ---- if self.__motion: ! gtk.gdk.threads_leave () self.__cp.seek (self.__adj.value) ! gtk.gdk.threads_enter () self.__dragging = 0 *************** *** 103,109 **** """Called on the destroy.""" ! gdk.threads_leave () self.__cp.unregister_notifier (self) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 102,108 ---- """Called on the destroy.""" ! gtk.gdk.threads_leave () self.__cp.unregister_notifier (self) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Index: speed.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/speed.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** speed.py 28 Jul 2002 13:45:47 -0000 1.6 --- speed.py 19 Aug 2002 16:45:37 -0000 1.7 *************** *** 20,29 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" import alsaplayer, gtk, aptk.misc - gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 20,28 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" import alsaplayer, gtk, aptk.misc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 58,64 **** if not self.__cp_locked: ! gdk.threads_leave () self.__cp.set_speed (w.value/100) ! gdk.threads_enter () def cb_speed_changed (self, speed): --- 57,63 ---- if not self.__cp_locked: ! gtk.gdk.threads_leave () self.__cp.set_speed (w.value/100) ! gtk.gdk.threads_enter () def cb_speed_changed (self, speed): *************** *** 67,73 **** self.__cp_locked = 1 ! gdk.threads_enter () self.__adj.set_value (speed*100) ! gdk.threads_leave () self.__cp_locked = 0 --- 66,72 ---- self.__cp_locked = 1 ! gtk.gdk.threads_enter () self.__adj.set_value (speed*100) ! gtk.gdk.threads_leave () self.__cp_locked = 0 *************** *** 76,82 **** """Called on the destroy.""" ! gdk.threads_leave () self.__cp.unregister_notifier (self) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 75,81 ---- """Called on the destroy.""" ! gtk.gdk.threads_leave () self.__cp.unregister_notifier (self) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 108,114 **** def __gtkcb_clicked (self, w): ! gdk.threads_leave () self.__cp.set_speed (self.__value) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 107,113 ---- def __gtkcb_clicked (self, w): ! gtk.gdk.threads_leave () self.__cp.set_speed (self.__value) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Index: volume.py =================================================================== RCS file: /cvsroot/ap-python/python/aptk/volume.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** volume.py 21 Jul 2002 18:15:43 -0000 1.4 --- volume.py 19 Aug 2002 16:45:37 -0000 1.5 *************** *** 20,29 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" import alsaplayer, gtk, aptk.misc - gdk = gtk.gdk # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 20,28 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" import alsaplayer, gtk, aptk.misc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # *************** *** 58,64 **** if not self.__cp_locked: ! gdk.threads_leave () self.__cp.set_volume (w.value); ! gdk.threads_enter () def cb_volume_changed (self, volume): --- 57,63 ---- if not self.__cp_locked: ! gtk.gdk.threads_leave () self.__cp.set_volume (w.value); ! gtk.gdk.threads_enter () def cb_volume_changed (self, volume): *************** *** 67,73 **** self.__cp_locked = 1 ! gdk.threads_enter () self.__adj.set_value (volume) ! gdk.threads_leave () self.__cp_locked = 0 --- 66,72 ---- self.__cp_locked = 1 ! gtk.gdk.threads_enter () self.__adj.set_value (volume) ! gtk.gdk.threads_leave () self.__cp_locked = 0 *************** *** 76,82 **** """Called on the destroy.""" ! gdk.threads_leave () self.__cp.unregister_notifier (self) ! gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --- 75,81 ---- """Called on the destroy.""" ! gtk.gdk.threads_leave () self.__cp.unregister_notifier (self) ! gtk.gdk.threads_enter () # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
From: <sj...@us...> - 2002-08-19 16:45:40
|
Update of /cvsroot/ap-python/python/examples/aptk In directory usw-pr-cvs1:/tmp/cvs-serv29642/examples/aptk Modified Files: gtkplayer.py panel.py playlist.py Log Message: Make __data__ and __version__ mean what they should mean. I18N. Fix distclean and uninstall targets. Index: gtkplayer.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/gtkplayer.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gtkplayer.py 21 Jul 2002 18:15:43 -0000 1.7 --- gtkplayer.py 19 Aug 2002 16:45:37 -0000 1.8 *************** *** 21,34 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" # Load modules ! import alsaplayer, aptk, gtk ! gdk = gtk.gdk # Init GDK threads ! gdk.threads_init () # Properties --- 21,36 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" # Load modules ! import alsaplayer, gtk ! import aptk.misc, aptk.position, aptk.info ! import aptk.control, aptk.speed, aptk.pan ! import aptk.volume # Init GDK threads ! gtk.gdk.threads_init () # Properties *************** *** 103,107 **** win.show () ! gdk.threads_enter () gtk.mainloop () ! gdk.threads_leave () --- 105,109 ---- win.show () ! gtk.gdk.threads_enter () gtk.mainloop () ! gtk.gdk.threads_leave () Index: panel.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/panel.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** panel.py 28 Jul 2002 13:45:47 -0000 1.11 --- panel.py 19 Aug 2002 16:45:37 -0000 1.12 *************** *** 26,34 **** # Load modules ! import alsaplayer, aptk, gtk ! gdk = gtk.gdk # Init GDK threads ! gdk.threads_init () # Get general playlist --- 26,36 ---- # Load modules ! import alsaplayer, gtk ! import aptk.misc, aptk.position, aptk.info ! import aptk.control, aptk.speed, aptk.pan ! import aptk.volume # Init GDK threads ! gtk.gdk.threads_init () # Get general playlist *************** *** 68,72 **** # Setup window win.set_title ("AlsaPlayer-Python Panel") ! win.set_size_request (gdk.screen_width (), 22) win.move (0, 0) win.stick () --- 70,74 ---- # Setup window win.set_title ("AlsaPlayer-Python Panel") ! win.set_size_request (gtk.gdk.screen_width (), 22) win.move (0, 0) win.stick () *************** *** 221,225 **** global mode, newmode ! gdk.threads_enter () if newmode == 0: --- 223,227 ---- global mode, newmode ! gtk.gdk.threads_enter () if newmode == 0: *************** *** 230,234 **** hbox.add (info_page) ! gdk.threads_leave () mode = newmode --- 232,236 ---- hbox.add (info_page) ! gtk.gdk.threads_leave () mode = newmode *************** *** 257,261 **** win.show () ! gdk.threads_enter () gtk.mainloop () ! gdk.threads_leave () --- 259,263 ---- win.show () ! gtk.gdk.threads_enter () gtk.mainloop () ! gtk.gdk.threads_leave () Index: playlist.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/playlist.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** playlist.py 16 Aug 2002 05:36:11 -0000 1.10 --- playlist.py 19 Aug 2002 16:45:37 -0000 1.11 *************** *** 21,33 **** __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$" ! __version__ = "$Revision$" __license__ = "GNU" ! import alsaplayer, aptk, gtk ! gdk = gtk.gdk # Init GDK threads ! gdk.threads_init () # Properties --- 21,32 ---- __author__ = "Evgeny Chukreev <co...@ec...>" ! __date__ = "$Date$".split()[1] ! __version__ = "$Revision$".split()[1] __license__ = "GNU" ! import alsaplayer, aptk.misc, aptk.playlist, gtk # Init GDK threads ! gtk.gdk.threads_init () # Properties *************** *** 48,52 **** win.show () ! gdk.threads_enter () gtk.mainloop () ! gdk.threads_leave () --- 47,51 ---- win.show () ! gtk.gdk.threads_enter () gtk.mainloop () ! gtk.gdk.threads_leave () |
From: <sj...@us...> - 2002-08-19 16:45:40
|
Update of /cvsroot/ap-python/python/docs In directory usw-pr-cvs1:/tmp/cvs-serv29642/docs Modified Files: Makefile.am Log Message: Make __data__ and __version__ mean what they should mean. I18N. Fix distclean and uninstall targets. Index: Makefile.am =================================================================== RCS file: /cvsroot/ap-python/python/docs/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 21 Jul 2002 10:28:21 -0000 1.7 --- Makefile.am 19 Aug 2002 16:45:37 -0000 1.8 *************** *** 33,36 **** rm -r -f happydoc ! uninstall-local: happydoc-build.stamp rm -f -r $(DOC_DIR)/aptk --- 33,38 ---- rm -r -f happydoc ! distclean-local: ! ! uninstall-local: rm -f -r $(DOC_DIR)/aptk |
From: <sj...@us...> - 2002-08-19 16:45:39
|
Update of /cvsroot/ap-python/python In directory usw-pr-cvs1:/tmp/cvs-serv29642 Modified Files: Makefile.am TODO configure.ac Log Message: Make __data__ and __version__ mean what they should mean. I18N. Fix distclean and uninstall targets. Index: Makefile.am =================================================================== RCS file: /cvsroot/ap-python/python/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 11 May 2002 00:14:21 -0000 1.7 --- Makefile.am 19 Aug 2002 16:45:36 -0000 1.8 *************** *** 1,3 **** ! SUBDIRS = src docs apcontrol examples aptk if ENABLE_INTERFACE --- 1,3 ---- ! SUBDIRS = src docs apcontrol examples aptk po if ENABLE_INTERFACE Index: TODO =================================================================== RCS file: /cvsroot/ap-python/python/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TODO 23 Jul 2002 09:00:31 -0000 1.1 --- TODO 19 Aug 2002 16:45:36 -0000 1.2 *************** *** 1,2 **** APTK: ! Widgets shouldn't eat resources when they are not visible. --- 1,2 ---- APTK: ! Widgets shouldn't waste resources when they are not visible. Index: configure.ac =================================================================== RCS file: /cvsroot/ap-python/python/configure.ac,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** configure.ac 21 Jul 2002 18:15:42 -0000 1.18 --- configure.ac 19 Aug 2002 16:45:36 -0000 1.19 *************** *** 127,130 **** --- 127,149 ---- AM_CONDITIONAL(ENABLE_APTK,test "$enable_aptk" = "yes") + dnl po files + AC_PATH_PROG(msgmergepath, "msgmerge") + if test "_$msgmergepath" = _ ; then + AC_MSG_ERROR([** msgmerge not installed or broken. Disable mo file generation. **]) + enable_po="no" + else + AC_SUBST(msgmergepath) + AC_PATH_PROG(msgfmtpath, "msgfmt") + if test "_$msgfmtpath" = _ ; then + AC_MSG_ERROR([** msgfmt not installed or broken. Disable mo file generation. **]) + enable_po="no" + else + AC_SUBST(msgfmtpath) + enable_po="yes" + fi + fi + + AM_CONDITIONAL(ENABLE_PO,test "$enable_po" = "yes") + dnl interface AC_ARG_ENABLE(interface, *************** *** 184,187 **** --- 203,207 ---- examples/aptk/Makefile aptk/Makefile + po/Makefile ]) |
From: <sj...@us...> - 2002-08-19 16:44:00
|
Update of /cvsroot/ap-python/python/po In directory usw-pr-cvs1:/tmp/cvs-serv29225/po Log Message: Directory /cvsroot/ap-python/python/po added to the repository |
From: <sj...@us...> - 2002-08-17 09:25:35
|
Update of /cvsroot/ap-python/python/examples/apcontrol In directory usw-pr-cvs1:/tmp/cvs-serv21002/examples/apcontrol Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/examples/apcontrol/ChangeLog,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ChangeLog 6 Jul 2002 16:18:54 -0000 1.11 --- ChangeLog 17 Aug 2002 09:25:31 -0000 1.12 *************** *** 1,2 **** --- 1,11 ---- + 2002-08-17 09:24 Evgeny Chukreev <co...@ec...> + + * info.py, info2.py: Bind ap_get_file_path. Add path member in + StreamInfo object. + + 2002-07-29 12:38 Evgeny Chukreev <co...@ec...> + + * Makefile.am, README, sort.py: Bind Playlist::Sort method. + 2002-07-06 16:17 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-17 09:25:34
|
Update of /cvsroot/ap-python/python/aptk In directory usw-pr-cvs1:/tmp/cvs-serv21002/aptk Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/aptk/ChangeLog,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ChangeLog 26 Jul 2002 14:33:44 -0000 1.16 --- ChangeLog 17 Aug 2002 09:25:31 -0000 1.17 *************** *** 1,2 **** --- 1,24 ---- + 2002-08-16 05:43 Evgeny Chukreev <co...@ec...> + + * language.py: add language.py + + 2002-08-16 05:36 Evgeny Chukreev <co...@ec...> + + * Makefile.am, __init__.py, misc.py, playlist.py: aptk.misc.Button + could be created from stock. More i18n. Add sort dialog. + + 2002-07-28 13:45 Evgeny Chukreev <co...@ec...> + + * control.py, info.py, misc.py, pan.py, playlist.py, speed.py: Add + ** regexp to property key and changed meaning of a * regexp. + + 2002-07-28 13:32 Evgeny Chukreev <co...@ec...> + + * control.py, playlist.py: Simplerify playlist widget structure. + + 2002-07-27 16:23 Evgeny Chukreev <co...@ec...> + + * playlist.py: Handle remove button. + 2002-07-26 14:32 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-17 09:25:34
|
Update of /cvsroot/ap-python/python/examples/aptk In directory usw-pr-cvs1:/tmp/cvs-serv21002/examples/aptk Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/examples/aptk/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ChangeLog 26 Jul 2002 14:33:44 -0000 1.14 --- ChangeLog 17 Aug 2002 09:25:31 -0000 1.15 *************** *** 1,2 **** --- 1,16 ---- + 2002-08-16 05:36 Evgeny Chukreev <co...@ec...> + + * playlist.py: aptk.misc.Button could be created from stock. More + i18n. Add sort dialog. + + 2002-07-29 12:38 Evgeny Chukreev <co...@ec...> + + * playlist.py: Bind Playlist::Sort method. + + 2002-07-28 13:45 Evgeny Chukreev <co...@ec...> + + * panel.py: Add ** regexp to property key and changed meaning of a + * regexp. + 2002-07-26 14:32 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-17 09:25:34
|
Update of /cvsroot/ap-python/python/apcontrol In directory usw-pr-cvs1:/tmp/cvs-serv21002/apcontrol Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/apcontrol/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ChangeLog 2 Jun 2002 17:09:02 -0000 1.12 --- ChangeLog 17 Aug 2002 09:25:31 -0000 1.13 *************** *** 1,2 **** --- 1,11 ---- + 2002-08-17 09:24 Evgeny Chukreev <co...@ec...> + + * apcontrol.c, pysession.c: Bind ap_get_file_path. Add path member + in StreamInfo object. + + 2002-07-29 12:38 Evgeny Chukreev <co...@ec...> + + * apcontrol.c, pysession.c: Bind Playlist::Sort method. + 2002-06-02 17:07 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-17 09:25:34
|
Update of /cvsroot/ap-python/python/src In directory usw-pr-cvs1:/tmp/cvs-serv21002/src Modified Files: ChangeLog Log Message: ChangeLog updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/ap-python/python/src/ChangeLog,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ChangeLog 26 Jul 2002 14:33:43 -0000 1.12 --- ChangeLog 17 Aug 2002 09:25:31 -0000 1.13 *************** *** 1,2 **** --- 1,11 ---- + 2002-08-17 09:24 Evgeny Chukreev <co...@ec...> + + * pystreaminfo.cpp: Bind ap_get_file_path. Add path member in + StreamInfo object. + + 2002-07-29 12:38 Evgeny Chukreev <co...@ec...> + + * pyplaylist.cpp: Bind Playlist::Sort method. + 2002-07-26 06:18 Evgeny Chukreev <co...@ec...> |
From: <sj...@us...> - 2002-08-17 09:24:37
|
Update of /cvsroot/ap-python/python/src In directory usw-pr-cvs1:/tmp/cvs-serv20799/src Modified Files: pystreaminfo.cpp Log Message: Bind ap_get_file_path. Add path member in StreamInfo object. Index: pystreaminfo.cpp =================================================================== RCS file: /cvsroot/ap-python/python/src/pystreaminfo.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pystreaminfo.cpp 31 May 2002 19:28:42 -0000 1.5 --- pystreaminfo.cpp 17 Aug 2002 09:24:34 -0000 1.6 *************** *** 54,60 **** // MEMBERS if (!strcmp (name, "__members__")) ! return Py_BuildValue ("(s,s,s,s,s,s)", "stream_type", "title", "artist", "status", "album", "genre", ! "year", "track", "comment"); // -- filename member --- 54,60 ---- // MEMBERS if (!strcmp (name, "__members__")) ! return Py_BuildValue ("(s,s,s,s,s,s,s)", "stream_type", "title", "artist", "status", "album", "genre", ! "year", "track", "comment", "path"); // -- filename member *************** *** 86,89 **** --- 86,93 ---- return Py_BuildValue ("s", self->cstruct.comment); + // -- comment member + if (!strcmp (name, "path")) + return Py_BuildValue ("s", self->cstruct.path); + // -- track member if (!strcmp (name, "track")) *************** *** 121,124 **** --- 125,129 ---- pystreaminfo->cstruct.status[0] = '\0'; pystreaminfo->cstruct.stream_type[0] = '\0'; + pystreaminfo->cstruct.path[0] = '\0'; return pystreaminfo; |
From: <sj...@us...> - 2002-08-17 09:24:37
|
Update of /cvsroot/ap-python/python/apcontrol In directory usw-pr-cvs1:/tmp/cvs-serv20799/apcontrol Modified Files: apcontrol.c pysession.c Log Message: Bind ap_get_file_path. Add path member in StreamInfo object. Index: apcontrol.c =================================================================== RCS file: /cvsroot/ap-python/python/apcontrol/apcontrol.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** apcontrol.c 29 Jul 2002 12:38:52 -0000 1.14 --- apcontrol.c 17 Aug 2002 09:24:34 -0000 1.15 *************** *** 194,197 **** --- 194,198 ---- MAP_RET_FLOAT (get_speed) MAP_RET_STRING (get_title, AP_TITLE_MAX) + MAP_RET_STRING (get_file_path, AP_FILE_PATH_MAX) MAP_RET_STRING (get_album, AP_ALBUM_MAX) MAP_RET_STRING (get_genre, AP_GENRE_MAX) *************** *** 304,307 **** --- 305,309 ---- {"get_pan", pyget_pan, METH_VARARGS}, {"get_title", pyget_title, METH_VARARGS}, + {"get_file_path", pyget_file_path, METH_VARARGS}, {"get_album", pyget_album, METH_VARARGS}, {"get_genre", pyget_genre, METH_VARARGS}, Index: pysession.c =================================================================== RCS file: /cvsroot/ap-python/python/apcontrol/pysession.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pysession.c 29 Jul 2002 12:38:52 -0000 1.14 --- pysession.c 17 Aug 2002 09:24:34 -0000 1.15 *************** *** 213,216 **** --- 213,217 ---- MAP_FLOAT (set_speed) MAP_RET_FLOAT (get_speed) + MAP_RET_STRING (get_file_path, AP_FILE_PATH_MAX) MAP_RET_STRING (get_title, AP_TITLE_MAX) MAP_RET_STRING (get_album, AP_ALBUM_MAX) *************** *** 277,280 **** --- 278,282 ---- {"set_pan", pyset_pan, METH_VARARGS}, {"get_pan", pyget_pan, METH_VARARGS}, + {"get_file_path", pyget_file_path, METH_VARARGS}, {"get_track_number", pyget_track_number, METH_VARARGS}, {"get_position", pyget_position, METH_VARARGS}, |
From: <sj...@us...> - 2002-08-17 09:24:37
|
Update of /cvsroot/ap-python/python/examples/apcontrol In directory usw-pr-cvs1:/tmp/cvs-serv20799/examples/apcontrol Modified Files: info.py info2.py Log Message: Bind ap_get_file_path. Add path member in StreamInfo object. Index: info.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/apcontrol/info.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** info.py 2 Jun 2002 17:08:02 -0000 1.6 --- info.py 17 Aug 2002 09:24:34 -0000 1.7 *************** *** 9,12 **** --- 9,13 ---- if s.is_running (): print 'Session name:', s.get_session_name () + print 'File path:', s.get_file_path () print 'Playing:', s.is_playing () and "Yes" or "No" print 'Status:', s.get_status () Index: info2.py =================================================================== RCS file: /cvsroot/ap-python/python/examples/apcontrol/info2.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** info2.py 2 Jun 2002 17:08:02 -0000 1.6 --- info2.py 17 Aug 2002 09:24:34 -0000 1.7 *************** *** 7,10 **** --- 7,11 ---- if apcontrol.session_running (0): print 'Session name:', apcontrol.get_session_name (0) + print 'File path:', apcontrol.get_file_path (0) print 'Playing:', apcontrol.is_playing (0) and "Yes" or "No" print 'Status:', apcontrol.get_status (0) |
From: <sj...@us...> - 2002-08-16 05:43:11
|
Update of /cvsroot/ap-python/python/aptk In directory usw-pr-cvs1:/tmp/cvs-serv25336 Added Files: language.py Log Message: add language.py --- NEW FILE: language.py --- # language.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: language.py,v 1.1 2002/08/16 05:43:08 sjah Exp $ # # XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX # XXX This is UTF8 encoded file. Be careful XXX # XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX __author__ = "Evgeny Chukreev <co...@ec...>" __date__ = "$Date: 2002/08/16 05:43:08 $" __version__ = "$Revision: 1.1 $" __license__ = "GNU" import locale language, charset = locale.getlocale () # All translations translations = { # Russian 'ru_RU' : { 'Sorting field' : "Ðоле ÑоÑÑиÑовки", 'Add' : "ÐобавиÑÑ", 'Remove' : "УдалиÑÑ", 'Playtime' : "ÐлиÑелÑноÑÑÑ", 'Year' : "Ðод", 'Track' : "ÐомеÑ", 'Title' : "Ðаголовок", 'Album' : "ÐлÑбом", 'Artist' : "ÐÑполниÑелÑ", 'Genre' : "ÐанÑ", 'Comment' : "ÐоменÑаÑий", 'Filename' : "ÐÐ¼Ñ Ñайла", 'Clear' : "ÐÑиÑÑиÑÑ", 'Do you want to clear playlist?' : "ÐÑ Ñ Ð¾ÑиÑе оÑиÑÑиÑÑ Ð¿Ð»ÑйлиÑÑ?", 'Do you want to remove selected items from the playlist?' : "ÐÑ Ñ Ð¾ÑиÑе ÑдалиÑÑ Ð²ÑделеннÑе композиÑии из плÑйлиÑÑа?", 'Sort' : "СоÑÑиÑоваÑÑ", 'Sorting priorities' : "ÐÑиоÑиÑеÑÑ ÑоÑÑиÑовки" } } # Select only one translation which is good for a current language translation = translations [language] del translations def tr (sentence): return translation.get (sentence, sentence) |