Changeset 393
- Timestamp:
- 08/20/06 16:22:21 (2 years ago)
- Files:
-
- trunk/launch.sh (modified) (1 diff)
- trunk/po/es.po (modified) (9 diffs)
- trunk/po/mesk.pot (modified) (9 diffs)
- trunk/src/audio_control.py (modified) (1 diff)
- trunk/src/mesk/__init__.py (modified) (1 diff)
- trunk/src/mesk/playlist.py (modified) (4 diffs)
- trunk/src/playlist_control.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/launch.sh
r308 r393 1 1 #!/bin/sh 2 3 die() 4 { 5 echo "$1" 6 exit 1 7 } 2 8 3 9 ROOT=`dirname $0` 4 10 cd $ROOT 5 11 if test ! -e ./src/mesk/info.py; then 6 ./autogen.sh 12 ./autogen.sh || die 13 make || die 7 14 fi 8 15 trunk/po/es.po
r391 r393 8 8 "Project-Id-Version: 0.1.1\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 "POT-Creation-Date: 2006-08- 19 17:25-0600\n"10 "POT-Creation-Date: 2006-08-20 16:21-0600\n" 11 11 "PO-Revision-Date: 2006-04-15 17:38-0600\n" 12 12 "Last-Translator: Travis Shirk <travis@pobox.com>\n" … … 230 230 msgstr "" 231 231 232 #: ../src/audio_control.py:665 233 msgid "Mute Volume" 234 msgstr "" 235 232 236 #: ../src/audio_control.py:667 233 msgid "Mute Volume"234 msgstr ""235 236 #: ../src/audio_control.py:669237 237 msgid "Restore Volume" 238 238 msgstr "" … … 257 257 "DEBUG" 258 258 259 #: ../src/main.py:168 259 #. Developer options 260 #: ../src/main.py:167 261 msgid "Developer Options" 262 msgstr "" 263 264 #: ../src/main.py:170 260 265 msgid "Run using python profiler." 261 266 msgstr "" 262 267 263 #: ../src/main.py:17 1268 #: ../src/main.py:173 264 269 msgid "Run using python debugger." 265 270 msgstr "" … … 270 275 msgstr "Playlist '%s' del cargamento del error" 271 276 272 #: ../src/mesk/audio/__init__.py:8 9277 #: ../src/mesk/audio/__init__.py:88 273 278 #, python-format 274 279 msgid "Unsupported audio format: %s" … … 358 363 359 364 #: ../src/mesk/__init__.py:85 360 msgid "Display theclose button on each tab"365 msgid "Display a close button on each tab" 361 366 msgstr "" 362 367 … … 481 486 482 487 #. Text columns 483 #: ../src/playlist_control.py:17 1488 #: ../src/playlist_control.py:170 484 489 msgid "Title" 485 490 msgstr "TÃtulo" 486 491 487 #: ../src/playlist_control.py:17 2492 #: ../src/playlist_control.py:171 488 493 msgid "Artist" 489 494 msgstr "Artista" 490 495 491 #: ../src/playlist_control.py:17 3496 #: ../src/playlist_control.py:172 492 497 msgid "Album" 493 498 msgstr "Ãlbum" 494 499 495 #: ../src/playlist_control.py:17 4500 #: ../src/playlist_control.py:173 496 501 msgid "#" 497 502 msgstr "#" 498 503 499 #: ../src/playlist_control.py:17 5504 #: ../src/playlist_control.py:174 500 505 msgid "Year" 501 506 msgstr "Año" 502 507 503 #: ../src/playlist_control.py:17 6508 #: ../src/playlist_control.py:175 504 509 msgid "Time" 505 510 msgstr "Tiempo" 506 511 507 #: ../src/playlist_control.py:45 4512 #: ../src/playlist_control.py:453 508 513 #, python-format 509 514 msgid "Are you sure you want to delete playlist '%s'?" 510 515 msgstr "" 511 516 512 #: ../src/playlist_control.py:45 6517 #: ../src/playlist_control.py:455 513 518 msgid "All playlist data will be lost." 514 519 msgstr "" 515 520 516 #: ../src/playlist_control.py:63 4521 #: ../src/playlist_control.py:633 517 522 msgid "tracks" 518 523 msgstr "pistas" 519 524 520 #: ../src/playlist_control.py:98 6525 #: ../src/playlist_control.py:983 521 526 #, fuzzy, python-format 522 527 msgid "" … … 526 531 msgstr "Fuente que cae del error: %s" 527 532 528 #: ../src/playlist_control.py:99 4533 #: ../src/playlist_control.py:991 529 534 #, fuzzy, python-format 530 535 msgid "" … … 536 541 "%s" 537 542 538 #: ../src/playlist_control.py:104 9543 #: ../src/playlist_control.py:1046 539 544 msgid "Add Music" 540 545 msgstr "Agregue La Música" 541 546 547 #: ../src/playlist_control.py:1063 548 msgid "All" 549 msgstr "" 550 551 #: ../src/playlist_control.py:1065 552 msgid "Audio" 553 msgstr "" 554 542 555 #: ../src/playlist_control.py:1066 543 msgid "All"544 msgstr ""545 546 #: ../src/playlist_control.py:1068547 msgid "Audio"548 msgstr ""549 550 #: ../src/playlist_control.py:1069551 556 msgid "Playlists" 552 557 msgstr "Playlists" … … 555 560 #. the checkbox is toggles and files when not since this is not 556 561 #. possible by default 557 #: ../src/playlist_control.py:107 4562 #: ../src/playlist_control.py:1071 558 563 msgid "Make the _dialog be able/unable to select directories" 559 564 msgstr "Haga que el _diálogo es able/unable para seleccionar directorios" 560 565 561 #: ../src/playlist_control.py:119 7566 #: ../src/playlist_control.py:1194 562 567 #, python-format 563 568 msgid "'%s' string not found" trunk/po/mesk.pot
r391 r393 9 9 "Project-Id-Version: PACKAGE VERSION\n" 10 10 "Report-Msgid-Bugs-To: \n" 11 "POT-Creation-Date: 2006-08- 19 17:25-0600\n"11 "POT-Creation-Date: 2006-08-20 16:21-0600\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 224 224 msgstr "" 225 225 226 #: ../src/audio_control.py:665 227 msgid "Mute Volume" 228 msgstr "" 229 226 230 #: ../src/audio_control.py:667 227 msgid "Mute Volume"228 msgstr ""229 230 #: ../src/audio_control.py:669231 231 msgid "Restore Volume" 232 232 msgstr "" … … 247 247 msgstr "" 248 248 249 #: ../src/main.py:168 249 #. Developer options 250 #: ../src/main.py:167 251 msgid "Developer Options" 252 msgstr "" 253 254 #: ../src/main.py:170 250 255 msgid "Run using python profiler." 251 256 msgstr "" 252 257 253 #: ../src/main.py:17 1258 #: ../src/main.py:173 254 259 msgid "Run using python debugger." 255 260 msgstr "" … … 260 265 msgstr "" 261 266 262 #: ../src/mesk/audio/__init__.py:8 9267 #: ../src/mesk/audio/__init__.py:88 263 268 #, python-format 264 269 msgid "Unsupported audio format: %s" … … 343 348 344 349 #: ../src/mesk/__init__.py:85 345 msgid "Display theclose button on each tab"350 msgid "Display a close button on each tab" 346 351 msgstr "" 347 352 … … 465 470 466 471 #. Text columns 472 #: ../src/playlist_control.py:170 473 msgid "Title" 474 msgstr "" 475 467 476 #: ../src/playlist_control.py:171 468 msgid " Title"477 msgid "Artist" 469 478 msgstr "" 470 479 471 480 #: ../src/playlist_control.py:172 472 msgid "A rtist"481 msgid "Album" 473 482 msgstr "" 474 483 475 484 #: ../src/playlist_control.py:173 476 msgid " Album"485 msgid "#" 477 486 msgstr "" 478 487 479 488 #: ../src/playlist_control.py:174 480 msgid " #"489 msgid "Year" 481 490 msgstr "" 482 491 483 492 #: ../src/playlist_control.py:175 484 msgid "Year"485 msgstr ""486 487 #: ../src/playlist_control.py:176488 493 msgid "Time" 489 494 msgstr "" 490 495 491 #: ../src/playlist_control.py:45 4496 #: ../src/playlist_control.py:453 492 497 #, python-format 493 498 msgid "Are you sure you want to delete playlist '%s'?" 494 499 msgstr "" 495 500 496 #: ../src/playlist_control.py:45 6501 #: ../src/playlist_control.py:455 497 502 msgid "All playlist data will be lost." 498 503 msgstr "" 499 504 500 #: ../src/playlist_control.py:63 4505 #: ../src/playlist_control.py:633 501 506 msgid "tracks" 502 507 msgstr "" 503 508 504 #: ../src/playlist_control.py:98 6509 #: ../src/playlist_control.py:983 505 510 #, python-format 506 511 msgid "" … … 510 515 msgstr "" 511 516 512 #: ../src/playlist_control.py:99 4517 #: ../src/playlist_control.py:991 513 518 #, python-format 514 519 msgid "" … … 518 523 msgstr "" 519 524 520 #: ../src/playlist_control.py:104 9525 #: ../src/playlist_control.py:1046 521 526 msgid "Add Music" 522 527 msgstr "" 523 528 529 #: ../src/playlist_control.py:1063 530 msgid "All" 531 msgstr "" 532 533 #: ../src/playlist_control.py:1065 534 msgid "Audio" 535 msgstr "" 536 524 537 #: ../src/playlist_control.py:1066 525 msgid "All"526 msgstr ""527 528 #: ../src/playlist_control.py:1068529 msgid "Audio"530 msgstr ""531 532 #: ../src/playlist_control.py:1069533 538 msgid "Playlists" 534 539 msgstr "" … … 537 542 #. the checkbox is toggles and files when not since this is not 538 543 #. possible by default 539 #: ../src/playlist_control.py:107 4544 #: ../src/playlist_control.py:1071 540 545 msgid "Make the _dialog be able/unable to select directories" 541 546 msgstr "" 542 547 543 #: ../src/playlist_control.py:119 7548 #: ../src/playlist_control.py:1194 544 549 #, python-format 545 550 msgid "'%s' string not found" trunk/src/audio_control.py
r392 r393 531 531 position, self._duration = self.get_position() 532 532 if position != gst.CLOCK_TIME_NONE: 533 value = position * 100.0 / self._duration 533 if self._duration: 534 value = position * 100.0 / self._duration 535 else: 536 value = 0 534 537 self._set_track_scale(value) 535 538 trunk/src/mesk/__init__.py
r392 r393 82 82 'compact_main_window_pos_y': [int, -1, 83 83 _('Main window y origin in compact mode')], 84 'show_tab_close_button': [ int, 1,85 _('Display theclose button on each tab')],84 'show_tab_close_button': [bool, False, 85 _('Display a close button on each tab')], 86 86 'show_tip_window_on_startup': [bool, True, 87 87 _('Show tips window each time Mesk is ' trunk/src/mesk/playlist.py
r391 r393 22 22 23 23 import audio.source 24 import utils 25 import log 24 import utils, uri, log 26 25 27 26 # Mapping from mime types to factory classes for supported formats … … 30 29 supported_extensions = ['m3u'] 31 30 32 def load(pl_ source):31 def load(pl_uri): 33 32 '''Load a playlist, currently only m3u is supported''' 33 pl_path = uri.unescape(pl_uri.path) 34 if os.path.splitext(pl_path)[1] != '.m3u': 35 raise PlaylistException('Unsupported playlist type') 36 34 37 pl = Playlist() 35 if os.path.splitext(pl_source)[1] == '.m3u': 36 if not os.path.exists(pl_source): 37 fp = file(pl_source, 'w') 38 if pl_uri.scheme == 'file': 39 if not os.path.exists(pl_path): 40 # Create local playlist if necessary 41 fp = file(pl_path, 'w') 38 42 fp.close() 39 load_m3u(pl_source, pl) 43 else: 44 fp = file(pl_path, 'r') 45 load_m3u(fp, pl) 46 fp.close() 40 47 else: 41 raise PlaylistException('Unsupported playlist type') 48 import urllib2 49 http_pl = urllib2.urlopen(str(pl_uri)) 50 load_m3u(http_pl, pl) 51 http_pl.close() 52 42 53 return pl 43 54 44 def load_m3u(pl_ file, pl):45 fp = file(pl_file, 'r')55 def load_m3u(pl_data, pl): 56 '''Load an m3u in pl. pl_data must support readlines()''' 46 57 47 58 meta_time = 0 … … 49 60 meta_artist = u'' 50 61 51 for line in fp:62 for line in pl_data.readlines(): 52 63 line = line.strip() 53 64 if not line: … … 88 99 meta_title = u'' 89 100 meta_artist = u'' 90 fp.close()91 101 92 102 def save_m3u(pl_file, pl): trunk/src/playlist_control.py
r392 r393 176 176 177 177 # Load playlist 178 pl = mesk.playlist.load( mesk.uri.unescape(self._pl_config.uri.path))178 pl = mesk.playlist.load(self._pl_config.uri) 179 179 pl.set_shuffle(self._pl_config.shuffle) 180 180 pl.set_repeat(self._pl_config.repeat) … … 726 726 print "I'm called!!!!!!!!!!!!!!!!!!!!!" 727 727 return self._on_playlist_control_key_press_event(widget, event) 728 728 729 def _on_playlist_view_key_press_event(self, widget, event): 729 730 # This handler is for key press events on just the treeview, … … 959 960 try: 960 961 if ext == '.m3u': 961 # TODO: This may be remote, fetching would be nice962 963 962 # Playlists 964 pl = mesk.playlist.Playlist() 965 pl = mesk.playlist.load(uri_path) 963 pl = mesk.playlist.load(uri) 966 964 for src in pl: 967 965 srcs.append(src)
