From dbd5c27c05c5d87e8faacba7d65e0f797aebb9a3 Mon Sep 17 00:00:00 2001 From: khayber Date: Sun, 23 Jan 2005 16:52:37 +0000 Subject: [PATCH] Latest version --- .DirIcon | 8 +- AppInfo.xml | 45 ++++++----- AppRun | 49 +++++++----- CDLow.py | 18 ++--- CDROM.py | 4 +- Messages/dist | 8 ++ Messages/en_US.po | 202 +++++++++++++++++++++++++++++++++++++++++++++++++ Messages/it.po | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Messages/make_tips | 41 ++++++++++ Messages/update-po | 17 +++++ genres.py | 31 ++++++++ messages.pot | 197 ++++++++++++++++++++++++++++++++++++++++++++++++ ripper.py | 40 +++++----- tips | 32 ++++++++ 14 files changed, 839 insertions(+), 69 deletions(-) rewrite AppInfo.xml (93%) rewrite AppRun (72%) create mode 100755 Messages/dist create mode 100644 Messages/en_US.po create mode 100644 Messages/it.po create mode 100755 Messages/make_tips create mode 100755 Messages/update-po create mode 100644 genres.py create mode 100644 messages.pot create mode 100644 tips diff --git a/.DirIcon b/.DirIcon index 99491bb..c184648 100644 --- a/.DirIcon +++ b/.DirIcon @@ -3,15 +3,15 @@ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> - - MP3/OGG CD Ripper - MP3/OGG CD Ripper - - MP3/OGG CD Ripper - Ken Hayber - 004 (15-May-2004) - GNU General Public License - http://khayber.dyndns.org/wiki/index.php/Ripper - - - - - - - - - + + + + + + + + + + MP3/OGG CD Ripper + MP3/OGG CD Ripper + + MP3/OGG CD Ripper + Ken Hayber + 005 (15-Feb-2005) + GNU General Public License + http://www.hayber.us/wiki/index.php/ROX/Ripper + + + + + + + + + diff --git a/AppRun b/AppRun dissimilarity index 72% index e3b0403..90d3184 100755 --- a/AppRun +++ b/AppRun @@ -1,18 +1,31 @@ -#!/usr/bin/env python -import findrox; findrox.version(1, 9, 8) -import rox, gtk - -import ripper - -try: - gtk.threads_init() -except: - rox.croak("Ripper needs threads support and you don't have it") - -try: - theapp = ripper.Ripper() - theapp.show() - - rox.mainloop() -except: - rox.report_exception() +#!/usr/bin/env python +try: + import findrox; findrox.version(1, 9, 13) + import rox, gtk, os + + __builtins__._ = rox.i18n.translation(os.path.join(rox.app_dir, 'Messages')) + + from optparse import OptionParser + + parser = OptionParser() + parser.add_option("--options", + action="store_true", dest="options", default=False, + help="display options dialog without running application") + + (options, args) = parser.parse_args() + + import ripper + if options.options: + rox.edit_options() + else: + try: + gtk.threads_init() + except: + rox.croak("Ripper needs threads support and you don't have it") + + theapp = ripper.Ripper() + theapp.show() + + rox.mainloop() +except: + rox.report_exception() diff --git a/CDLow.py b/CDLow.py index d123a1a..a0baed5 100644 --- a/CDLow.py +++ b/CDLow.py @@ -1,12 +1,12 @@ """ CDLow - Low level CDROM interface - Written to replace CDAudio, CDDB and PyGAME.CD and + Written to replace CDAudio, CDDB and PyGAME.CD and add functionality (skipping) Originally from the Gryphon CD player (http://gryphon.sourceforge.net/) - + Copyright 2001 (c) Christian Storgaard. - Changes made by Ron Kuslak , 2003-2004 - + Changes made by Ron Kuslak , 2003-2004 + 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 @@ -66,7 +66,7 @@ def cd_open(): cd.status = NODISC trayopen = 1 return 1 - + def cd_close(): if cd.cd < 1: cd.open = 0 @@ -170,7 +170,7 @@ def eject(): ioctl(cd.cd, CDROMEJECT_SW, 0) ioctl(cd.cd, CDROMEJECT) # cd_close() - + def close(): # cd_open() try: @@ -211,7 +211,7 @@ def get_volume(): # cd_open() try: return struct.unpack("BBBB",ioctl(cd.cd, CDROMVOLREAD, struct.pack("BBBB",0,0,0,0))) - + except: return (0,0,0,0) # cd_close() @@ -221,7 +221,7 @@ def set_volume(frontleft,frontright=None,backleft=0,backright=0): if frontright == None: frontright = frontleft try: return struct.unpack("BBBB",ioctl(cd.cd, CDROMVOLCTRL, struct.pack("BBBB",frontleft,frontright,backleft,backright))) - + except: return 1 # cd_close() @@ -308,7 +308,7 @@ def get_track_length(first,last=None): if last==None: last=first+1 off1min, off1sec, off1frm, off1, data1 = get_track_time(first) off2min, off2sec, off2frm, off2, data2 = get_track_time(last) - + lenmin,lensec,lenfrm=frm2msf(off2-off1) return off1min,off1sec,off1frm,lenmin,lensec,lenfrm,off1,data1 diff --git a/CDROM.py b/CDROM.py index e670a62..33e7723 100644 --- a/CDROM.py +++ b/CDROM.py @@ -2,8 +2,8 @@ CDROM.py Constants for CDLow.py Copyright 2003 Christian Storgaard - Changes made by Ron Kuslak , 12/15/2003, - and are limited to the formating of this message. + Changes made by Ron Kuslak , 12/15/2003, + and are limited to the formating of this message. 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 diff --git a/Messages/dist b/Messages/dist new file mode 100755 index 0000000..a637e09 --- /dev/null +++ b/Messages/dist @@ -0,0 +1,8 @@ +#!/bin/sh + +echo Making all .mo files... +echo + +for FILE in *.po; do + msgfmt $FILE -o ${FILE%.po}.gmo && echo Created file $OUT OK +done diff --git a/Messages/en_US.po b/Messages/en_US.po new file mode 100644 index 0000000..7d5c189 --- /dev/null +++ b/Messages/en_US.po @@ -0,0 +1,202 @@ +# Ripper. +# Copyright (C) 2004 Kenneth D. Hayber +# Ken Hayber " +msgstr "" + +#: tips:17 tips:18 +msgid "Eject CD after ripping is complete (Encoding may still be running)." +msgstr "" + +#: tips:7 tips:8 +msgid "Ripper" +msgstr "" + +#: tips:26 +msgid "Options for the encoder. For example: vbr, id3 tags, min bitrate." +msgstr "" + +#: ripper.py:204 +msgid "Genre" +msgstr "" + +#: ripper.py:418 +msgid "Got Track Info" +msgstr "" + +#: tips:23 +msgid "MP3 Encoder" +msgstr "" + +#: tips:14 tips:25 tips:29 +msgid "Options" +msgstr "" + +#: ripper.py:177 ripper.py:233 +msgid "Settings" +msgstr "" + +#: ripper.py:183 ripper.py:230 +msgid "Reload CD" +msgstr "" + +#: ripper.py:703 ripper.py:706 +msgid "error" +msgstr "" + +#: tips:24 +msgid "" +"The application used for encoding to MP3.\n" +"If this is not in your PATH you need to give the full path to the " +"executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice lame')" +msgstr "" + +#: tips:10 +msgid "Device" +msgstr "" + +#: tips:3 +msgid "The (optional) default location of your music." +msgstr "" + +#: tips:28 +msgid "" +"The application used for encoding to OGG.\n" +"If this is not in your PATH you need to give the full path to the " +"executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice oggenc')" +msgstr "" + +#: ripper.py:158 +msgid "Time" +msgstr "" + +#: tips:5 tips:6 +msgid "" +"The full url to reach freedb or equivalent. By default this is 'http://" +"freedb.freedb.org/~cddb/cddb.cgi', but there are mirrors. Leave blank to " +"disable CDDB queries." +msgstr "" + +#: tips:11 +msgid "Device name of cdrom. For example: /dev/cdrom." +msgstr "" + +#: tips:15 +msgid "Options for the encoder. For example: quality, speed, etc." +msgstr "" + +#: tips:13 +msgid "SCSI-style device name. For example: 0,0,1 or ATAPI:0,1,0." +msgstr "" + +#: tips:27 +msgid "OGG Encoder" +msgstr "" + +#: ripper.py:698 ripper.py:700 ripper.py:706 +msgid "Encoding" +msgstr "" + +#: tips:22 +msgid "ogg" +msgstr "" + +#: tips:1 +msgid "Locations" +msgstr "" + +#: ripper.py:181 ripper.py:229 +msgid "Rip & Encode" +msgstr "" + +#: tips:19 tips:20 +msgid "Encoder" +msgstr "" + +#: ripper.py:209 +msgid "Year" +msgstr "" + +#: tips:2 +msgid "Music" +msgstr "" + +#: ripper.py:408 +msgid "Got Disc Info" +msgstr "" + +#: ripper.py:692 ripper.py:694 ripper.py:703 +msgid "Ripping" +msgstr "" + diff --git a/Messages/it.po b/Messages/it.po new file mode 100644 index 0000000..79350a0 --- /dev/null +++ b/Messages/it.po @@ -0,0 +1,216 @@ +# Ripper. +# Copyright (C) 2004 Kenneth D. Hayber +# Ken Hayber " +msgstr "" + +#: tips:17 tips:18 +msgid "Eject CD after ripping is complete (Encoding may still be running)." +msgstr "" +"Espelle il cd quando il rip finito (la codifica potrebbe non essere ancora " +"terminata)." + +#: tips:7 tips:8 +msgid "Ripper" +msgstr "Ripper" + +#: tips:26 +msgid "Options for the encoder. For example: vbr, id3 tags, min bitrate." +msgstr "Opzioni per l'encoder. Per esempio: vbr, id3 tags, min bitrate." + +#: ripper.py:204 +msgid "Genre" +msgstr "Genere" + +#: ripper.py:418 +msgid "Got Track Info" +msgstr "Sono state prese le informazioni della traccia" + +#: tips:23 +msgid "MP3 Encoder" +msgstr "Encoder mp3" + +#: tips:14 tips:25 tips:29 +msgid "Options" +msgstr "Opzioni" + +#: ripper.py:177 ripper.py:233 +msgid "Settings" +msgstr "Impostazioni" + +#: ripper.py:183 ripper.py:230 +msgid "Reload CD" +msgstr "Ricarica CD" + +#: ripper.py:703 ripper.py:706 +msgid "error" +msgstr "errore" + +#: tips:24 +msgid "" +"The application used for encoding to MP3.\n" +"If this is not in your PATH you need to give the full path to the " +"executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice lame')" +msgstr "" +"L'applicazione usata per codificare gli mp3.\n" +"Se non nel PATH necessario specificare il percorso completo.\n" +"Per eseguirla a bassa priorit, usare nice (ad es. nice lame)." + +#: tips:10 +msgid "Device" +msgstr "Device" + +#: tips:3 +msgid "The (optional) default location of your music." +msgstr "La posizione predefinita (opzionale) dei brani musicali." + +#: tips:28 +msgid "" +"The application used for encoding to OGG.\n" +"If this is not in your PATH you need to give the full path to the " +"executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice oggenc')" +msgstr "" +"L'applicazione usata per codificare gli ogg.\n" +"Se non nel PATH necessario specificare il percorso completo.\n" +"Per eseguirla a bassa priorit, usare nice (ad es. nice oggenc)." + +#: ripper.py:158 +msgid "Time" +msgstr "Tempo" + +#: tips:5 tips:6 +msgid "" +"The full url to reach freedb or equivalent. By default this is 'http://" +"freedb.freedb.org/~cddb/cddb.cgi', but there are mirrors. Leave blank to " +"disable CDDB queries." +msgstr "" +"L'url per raggiungere freedb o uno simile. Normalmente http://freedb.freedb." +"org/~cddb/cddb.cgi, ma ci sono anche i mirror. Lasciarlo bianco per " +"disabilitare le interrogazioni CDDB." + +#: tips:11 +msgid "Device name of cdrom. For example: /dev/cdrom." +msgstr "Il nome di device del cdrom. Per esempio: /dev/cdrom." + +#: tips:15 +msgid "Options for the encoder. For example: quality, speed, etc." +msgstr "Le opzioni dell'encoder. Per esempio: quality, speed, ecc..." + +#: tips:13 +msgid "SCSI-style device name. For example: 0,0,1 or ATAPI:0,1,0." +msgstr "Il nome del device SCSI. Per esempio: 0,0,1 o ATAPI:0,1,0." + +#: tips:27 +msgid "OGG Encoder" +msgstr "Encoder ogg" + +#: ripper.py:698 ripper.py:700 ripper.py:706 +msgid "Encoding" +msgstr "Codifica" + +#: tips:22 +msgid "ogg" +msgstr "ogg" + +#: tips:1 +msgid "Locations" +msgstr "Collocazioni" + +#: ripper.py:181 ripper.py:229 +msgid "Rip & Encode" +msgstr "Fa il rip e codifica" + +#: tips:19 tips:20 +msgid "Encoder" +msgstr "Encoder" + +#: ripper.py:209 +msgid "Year" +msgstr "Anno" + +#: tips:2 +msgid "Music" +msgstr "Brani" + +#: ripper.py:408 +msgid "Got Disc Info" +msgstr "Sono state prese le informazioni del disco" + +#: ripper.py:692 ripper.py:694 ripper.py:703 +msgid "Ripping" +msgstr "Rip" + diff --git a/Messages/make_tips b/Messages/make_tips new file mode 100755 index 0000000..b54f704 --- /dev/null +++ b/Messages/make_tips @@ -0,0 +1,41 @@ +#!/bin/env python + +from xmllib import * +import string, os + +print "Extracting translatable bits from Options.xml..." + +class Parser(XMLParser): + data = "" + + def unknown_starttag(self, tag, attrs): + for x in ['title', 'label', 'end', 'unit']: + if attrs.has_key(x): + self.trans(attrs[x]) + self.data = "" + + def handle_data(self, data): + self.data = self.data + data + + def unknown_endtag(self, tag): + data = string.strip(self.data) + if data: + self.trans(data) + + def trans(self, data): + data = string.join(string.split(data, '\n'), '\\n') + if data: + out.write('_("%s")\n' % data) + +try: + os.chdir("po") +except OSError: + pass + +file = open('../Options.xml', 'rb') +out = open('../tips', 'wb') +parser = Parser() +parser.feed(file.read()) +file.close() +parser.close() +out.close() diff --git a/Messages/update-po b/Messages/update-po new file mode 100755 index 0000000..dba7ff2 --- /dev/null +++ b/Messages/update-po @@ -0,0 +1,17 @@ +#!/bin/sh + +echo Extracting messages from source files... +echo + +python ./tips.py +(cd ..; pygettext *.py tips) + +echo +echo Updating all .po files... +echo + +for FILE in *.po; do + echo -n "Updating '$FILE' translation" + mv $FILE $FILE.old + msgmerge $FILE.old ../messages.pot > $FILE +done diff --git a/genres.py b/genres.py new file mode 100644 index 0000000..fa64843 --- /dev/null +++ b/genres.py @@ -0,0 +1,31 @@ +# Just a genre list for now. + + +genre_list = [ "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", + "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", + "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", + "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", + "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", + "Trance", "Classical", "Instrumental", "Acid", "House", "Game", + "Sound Clip", "Gospel", "Noise", "Alt. Rock", "Bass", "Soul", + "Punk", "Space", "Meditative", "Instrum. Pop", "Instrum. Rock", + "Ethnic", "Gothic", "Darkwave", "Techno-Indust.", "Electronic", + "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", + "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", + "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", + "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", + "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", + "Folk/Rock", "National Folk", "Swing", "Fusion", "Bebob", "Latin", + "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", + "Progress. Rock", "Psychadel. Rock", "Symphonic Rock", "Slow Rock", + "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", + "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", + "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", + "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", + "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", + "A Capella", "Euro-House", "Dance Hall", "Goa", "Drum & Bass", + "Club-House", "Hardcore", "Terror", "Indie", "BritPop", "Negerpunk", + "Polsk Punk", "Beat", "Christian Gangsta Rap", "Heavy Metal", + "Black Metal", "Crossover", "Contemporary Christian", "Christian Rock", + "Merengue", "Salsa", "Thrash Metal", "Anime", "Jpop", "Synthpop"] + diff --git a/messages.pot b/messages.pot new file mode 100644 index 0000000..d458e4d --- /dev/null +++ b/messages.pot @@ -0,0 +1,197 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: Fri May 14 19:03:45 2004\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" +"Generated-By: pygettext.py 1.1\n" + + +#: ripper.py:197 +msgid "Album" +msgstr "" + +#: ripper.py:234 +msgid "Quit" +msgstr "" + +#: ripper.py:694 ripper.py:700 +msgid "done" +msgstr "" + +#: tips:21 +msgid "mp3" +msgstr "" + +#: tips:4 +msgid "CDDB" +msgstr "" + +#: tips:9 +msgid "" +"The application used for ripping from CD.\n" +"If this is not in your PATH you need to give the full path to the executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice cdda2wav')" +msgstr "" + +#: tips:12 +msgid "LUN" +msgstr "" + +#: ripper.py:164 +msgid "Status" +msgstr "" + +#: tips:30 tips:31 tips:32 +msgid "Options for the encoder. For example: ???." +msgstr "" + +#: tips:16 +msgid "Eject after Rip" +msgstr "" + +#: ripper.py:151 ripper.py:400 +msgid "Track" +msgstr "" + +#: ripper.py:192 +msgid "Artist" +msgstr "" + +#: ripper.py:179 ripper.py:231 +msgid "Stop" +msgstr "" + +#: ripper.py:325 +msgid "" +msgstr "" + +#: tips:17 tips:18 +msgid "Eject CD after ripping is complete (Encoding may still be running)." +msgstr "" + +#: tips:7 tips:8 +msgid "Ripper" +msgstr "" + +#: tips:26 +msgid "Options for the encoder. For example: vbr, id3 tags, min bitrate." +msgstr "" + +#: ripper.py:204 +msgid "Genre" +msgstr "" + +#: ripper.py:418 +msgid "Got Track Info" +msgstr "" + +#: tips:23 +msgid "MP3 Encoder" +msgstr "" + +#: tips:14 tips:25 tips:29 +msgid "Options" +msgstr "" + +#: ripper.py:177 ripper.py:233 +msgid "Settings" +msgstr "" + +#: ripper.py:183 ripper.py:230 +msgid "Reload CD" +msgstr "" + +#: ripper.py:703 ripper.py:706 +msgid "error" +msgstr "" + +#: tips:24 +msgid "" +"The application used for encoding to MP3.\n" +"If this is not in your PATH you need to give the full path to the executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice lame')" +msgstr "" + +#: tips:10 +msgid "Device" +msgstr "" + +#: tips:3 +msgid "The (optional) default location of your music." +msgstr "" + +#: tips:28 +msgid "" +"The application used for encoding to OGG.\n" +"If this is not in your PATH you need to give the full path to the executable.\n" +"To run at lower priority run with 'nice'. (e.g. 'nice oggenc')" +msgstr "" + +#: ripper.py:158 +msgid "Time" +msgstr "" + +#: tips:5 tips:6 +msgid "The full url to reach freedb or equivalent. By default this is 'http://freedb.freedb.org/~cddb/cddb.cgi', but there are mirrors. Leave blank to disable CDDB queries." +msgstr "" + +#: tips:11 +msgid "Device name of cdrom. For example: /dev/cdrom." +msgstr "" + +#: tips:15 +msgid "Options for the encoder. For example: quality, speed, etc." +msgstr "" + +#: tips:13 +msgid "SCSI-style device name. For example: 0,0,1 or ATAPI:0,1,0." +msgstr "" + +#: tips:27 +msgid "OGG Encoder" +msgstr "" + +#: ripper.py:698 ripper.py:700 ripper.py:706 +msgid "Encoding" +msgstr "" + +#: tips:22 +msgid "ogg" +msgstr "" + +#: tips:1 +msgid "Locations" +msgstr "" + +#: ripper.py:181 ripper.py:229 +msgid "Rip & Encode" +msgstr "" + +#: tips:19 tips:20 +msgid "Encoder" +msgstr "" + +#: ripper.py:209 +msgid "Year" +msgstr "" + +#: tips:2 +msgid "Music" +msgstr "" + +#: ripper.py:408 +msgid "Got Disc Info" +msgstr "" + +#: ripper.py:692 ripper.py:694 ripper.py:703 +msgid "Ripping" +msgstr "" + diff --git a/ripper.py b/ripper.py index a25c5d5..0657cbc 100644 --- a/ripper.py +++ b/ripper.py @@ -25,7 +25,7 @@ from random import Random from threading import * import rox -from rox import i18n, app_options, Menu, filer +from rox import i18n, app_options, Menu, filer, InfoWin from rox.options import Option import PyCDDB, cd_logic, CDROM, genres @@ -40,11 +40,14 @@ _ = rox.i18n.translation(os.path.join(rox.app_dir, 'Messages')) #Who am I and how did I get here? APP_NAME = 'Ripper' #I could call it Mr. Giles, but that would be gay. -APP_PATH = os.path.split(os.path.abspath(sys.argv[0]))[0] +APP_PATH = rox.app_dir #Options.xml processing -rox.setup_app_options(APP_NAME) +from rox import choices +choices.migrate(APP_NAME, 'hayber.us') +rox.setup_app_options(APP_NAME, site='hayber.us') +Menu.set_save_name(APP_NAME, site='hayber.us') #assume that everyone puts their music in ~/Music LIBRARY = Option('library', '~/Music') @@ -230,13 +233,13 @@ class Ripper(rox.Window): view.add_events(gtk.gdk.BUTTON_PRESS_MASK) view.connect('button-press-event', self.button_press) - Menu.set_save_name(APP_NAME) self.menu = Menu.Menu('main', [ Menu.Action(_('Rip & Encode'), 'rip_n_encode', '', gtk.STOCK_EXECUTE), Menu.Action(_('Reload CD'), 'do_get_tracks', '', gtk.STOCK_REFRESH), Menu.Action(_('Stop'), 'stop', '', gtk.STOCK_STOP), Menu.Separator(), - Menu.Action(_('Settings'), 'show_options', '', gtk.STOCK_PREFERENCES), + Menu.Action(_('Options'), 'show_options', '', gtk.STOCK_PREFERENCES), + Menu.Action(_('Info'), 'get_info', '', gtk.STOCK_DIALOG_INFO), Menu.Action(_("Quit"), 'close', '', gtk.STOCK_CLOSE), ]) self.menu.attach(self,self) @@ -377,11 +380,11 @@ class Ripper(rox.Window): '''Query cddb for track and cd info''' gtk.threads_enter() dlg = gtk.MessageDialog(buttons=gtk.BUTTONS_CANCEL, message_format="Getting Track Info.") - dlg.set_position(gtk.WIN_POS_NONE) - (a, b) = dlg.get_size() - (x, y) = self.get_position() - (dx, dy) = self.get_size() - dlg.move(x+dx/2-a/2, y+dy/2-b/2) +# dlg.set_position(gtk.WIN_POS_NONE) +# (a, b) = dlg.get_size() +# (x, y) = self.get_position() +# (dx, dy) = self.get_size() +# dlg.move(x+dx/2-a/2, y+dy/2-b/2) dlg.show() gtk.threads_leave() @@ -389,7 +392,7 @@ class Ripper(rox.Window): tracklist = [] tracktime = [] - #Note: all the nested try statements are to ensure that as much + #Note: all the nested try|except|pass statements are to ensure that as much #info is processed as possible. One exception should not stop #the whole thing and return nothing. @@ -726,17 +729,17 @@ class Ripper(rox.Window): if iter: track = model.get_value(iter, COL_TRACK) dlg = gtk.Dialog(APP_NAME) - dlg.set_position(gtk.WIN_POS_NONE) +# dlg.set_position(gtk.WIN_POS_NONE) dlg.set_default_size(350, 100) - (a, b) = dlg.get_size() - (x, y) = self.get_position() - (dx, dy) = self.get_size() - dlg.move(x+dx/2-a/2, y+dy/2-b/2) +# (a, b) = dlg.get_size() +# (x, y) = self.get_position() +# (dx, dy) = self.get_size() +# dlg.move(x+dx/2-a/2, y+dy/2-b/2) dlg.show() entry = gtk.Entry() entry.set_text(track) - dlg.set_position(gtk.WIN_POS_MOUSE) +# dlg.set_position(gtk.WIN_POS_MOUSE) entry.show() entry.set_activates_default(True) dlg.vbox.pack_start(entry) @@ -783,6 +786,9 @@ class Ripper(rox.Window): '''Get changed Options''' pass + def get_info(self): + InfoWin.infowin(APP_NAME) + def delete_event(self, ev, e1): '''Bye-bye''' self.close() diff --git a/tips b/tips new file mode 100644 index 0000000..ff9f9cf --- /dev/null +++ b/tips @@ -0,0 +1,32 @@ +_("Locations") +_("Music") +_("The (optional) default location of your music.") +_("CDDB") +_("The full url to reach freedb or equivalent. By default this is 'http://freedb.freedb.org/~cddb/cddb.cgi', but there are mirrors. Leave blank to disable CDDB queries.") +_("The full url to reach freedb or equivalent. By default this is 'http://freedb.freedb.org/~cddb/cddb.cgi', but there are mirrors. Leave blank to disable CDDB queries.") +_("Ripper") +_("Ripper") +_("The application used for ripping from CD.\nIf this is not in your PATH you need to give the full path to the executable.\nTo run at lower priority run with 'nice'. (e.g. 'nice cdda2wav')") +_("Device") +_("Device name of cdrom. For example: /dev/cdrom.") +_("LUN") +_("SCSI-style device name. For example: 0,0,1 or ATAPI:0,1,0.") +_("Options") +_("Options for the encoder. For example: quality, speed, etc.") +_("Eject after Rip") +_("Eject CD after ripping is complete (Encoding may still be running).") +_("Eject CD after ripping is complete (Encoding may still be running).") +_("Encoder") +_("Encoder") +_("mp3") +_("ogg") +_("MP3 Encoder") +_("The application used for encoding to MP3.\nIf this is not in your PATH you need to give the full path to the executable.\nTo run at lower priority run with 'nice'. (e.g. 'nice lame')") +_("Options") +_("Options for the encoder. For example: vbr, id3 tags, min bitrate.") +_("OGG Encoder") +_("The application used for encoding to OGG.\nIf this is not in your PATH you need to give the full path to the executable.\nTo run at lower priority run with 'nice'. (e.g. 'nice oggenc')") +_("Options") +_("Options for the encoder. For example: ???.") +_("Options for the encoder. For example: ???.") +_("Options for the encoder. For example: ???.") -- 2.11.4.GIT