Changeset 417
- Timestamp:
- 09/04/06 11:47:08 (2 years ago)
- Files:
-
- trunk/po/POTFILES.in (modified) (1 diff)
- trunk/po/es.mo (modified) (previous)
- trunk/po/es.po (modified) (3 diffs)
- trunk/po/mesk.pot (modified) (3 diffs)
- trunk/src/dialogs.py (modified) (2 diffs)
- trunk/src/main_window.py (modified) (7 diffs)
- trunk/src/mesk/__init__.py (modified) (2 diffs)
- trunk/src/playlist_control.py (modified) (2 diffs)
- trunk/src/preference_window.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/po/POTFILES.in
r397 r417 9 9 src/config.py 10 10 src/control.py 11 src/dialogs.py 11 12 src/main.py 12 13 src/main_window.py trunk/po/es.po
r411 r417 8 8 "Project-Id-Version: 0.1.1\n" 9 9 "Report-Msgid-Bugs-To: \n" 10 "POT-Creation-Date: 2006-0 8-30 20:18-0600\n"10 "POT-Creation-Date: 2006-09-03 19:57-0600\n" 11 11 "PO-Revision-Date: 2006-04-15 17:38-0600\n" 12 12 "Last-Translator: Travis Shirk <travis@pobox.com>\n" … … 241 241 msgstr "" 242 242 243 #: ../src/main.py:16 5243 #: ../src/main.py:168 244 244 #, fuzzy, python-format 245 245 msgid "Migrating config version %s to %s" 246 246 msgstr "Aumento de la versión %s de los config a %s" 247 247 248 #: ../src/main.py:18 4249 msgid "Run with a specific profile other than the default. "250 msgstr "" 251 252 #: ../src/main.py:1 88248 #: ../src/main.py:187 249 msgid "Run with a specific profile other than the default. If profile NAME is " 250 msgstr "" 251 252 #: ../src/main.py:191 253 253 #, fuzzy 254 254 msgid "" … … 260 260 261 261 #. Developer options 262 #: ../src/main.py:19 4262 #: ../src/main.py:197 263 263 msgid "Advanced Options" 264 264 msgstr "" 265 265 266 #: ../src/main.py: 197266 #: ../src/main.py:200 267 267 msgid "Break in python debugger on unhandled exceptions." 268 268 msgstr "" 269 269 270 #: ../src/main.py:20 1270 #: ../src/main.py:204 271 271 msgid "Run using python profiler." 272 272 msgstr "" 273 273 274 #: ../src/main.py:20 4275 msgid " Gstreamer command line options."276 msgstr "" 277 278 #: ../src/main_window.py:11 9274 #: ../src/main.py:207 275 msgid "Display Gstreamer command line options." 276 msgstr "" 277 278 #: ../src/main_window.py:117 279 279 #, python-format 280 280 msgid "Error loading playlist '%s'" 281 281 msgstr "Playlist '%s' del cargamento del error" 282 282 283 #: ../src/main_window.py:2 80283 #: ../src/main_window.py:278 284 284 msgid "<b>Are you sure you want to quit?</b>" 285 285 msgstr "" trunk/po/mesk.pot
r411 r417 9 9 "Project-Id-Version: PACKAGE VERSION\n" 10 10 "Report-Msgid-Bugs-To: \n" 11 "POT-Creation-Date: 2006-0 8-30 20:18-0600\n"11 "POT-Creation-Date: 2006-09-03 19:57-0600\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 236 236 msgstr "" 237 237 238 #: ../src/main.py:16 5238 #: ../src/main.py:168 239 239 #, python-format 240 240 msgid "Migrating config version %s to %s" 241 241 msgstr "" 242 242 243 #: ../src/main.py:18 4244 msgid "Run with a specific profile other than the default. "245 msgstr "" 246 247 #: ../src/main.py:1 88243 #: ../src/main.py:187 244 msgid "Run with a specific profile other than the default. If profile NAME is " 245 msgstr "" 246 247 #: ../src/main.py:191 248 248 msgid "" 249 249 "Select the amount of terminal logging. May be CRITICAL, ERROR, WARNING, " … … 252 252 253 253 #. Developer options 254 #: ../src/main.py:19 4254 #: ../src/main.py:197 255 255 msgid "Advanced Options" 256 256 msgstr "" 257 257 258 #: ../src/main.py: 197258 #: ../src/main.py:200 259 259 msgid "Break in python debugger on unhandled exceptions." 260 260 msgstr "" 261 261 262 #: ../src/main.py:20 1262 #: ../src/main.py:204 263 263 msgid "Run using python profiler." 264 264 msgstr "" 265 265 266 #: ../src/main.py:20 4267 msgid " Gstreamer command line options."268 msgstr "" 269 270 #: ../src/main_window.py:11 9266 #: ../src/main.py:207 267 msgid "Display Gstreamer command line options." 268 msgstr "" 269 270 #: ../src/main_window.py:117 271 271 #, python-format 272 272 msgid "Error loading playlist '%s'" 273 273 msgstr "" 274 274 275 #: ../src/main_window.py:2 80275 #: ../src/main_window.py:278 276 276 msgid "<b>Are you sure you want to quit?</b>" 277 277 msgstr "" trunk/src/dialogs.py
r416 r417 19 19 ################################################################################ 20 20 import gtk 21 import mesk 22 from mesk.common.i18n import _ 21 23 22 24 class MessageDialog(gtk.MessageDialog): … … 37 39 type = gtk.MESSAGE_ERROR, 38 40 buttons = gtk.BUTTONS_OK) 41 42 class ConfirmationDialog(gtk.MessageDialog): 43 def __init__(self, parent, modal = True, type=gtk.MESSAGE_QUESTION): 44 gtk.MessageDialog.__init__(self, parent=parent, flags=0, type=type) 45 self.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) 46 self.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 47 48 def confirm(self): 49 resp = self.run() 50 self.destroy() 51 return (resp == gtk.RESPONSE_OK) 52 53 class ConfirmationWithDisableOptionDialog(ConfirmationDialog): 54 def __init__(self, parent, modal=True, type=gtk.MESSAGE_QUESTION): 55 ConfirmationDialog.__init__(self, parent=parent, modal=modal, type=type) 56 self.checkbutton = gtk.CheckButton(_('Do not ask me again.')) 57 self.vbox.pack_start(self.checkbutton, expand=False, fill=False) 58 self.checkbutton.show() 59 60 def confirm(self): 61 confirmed = ConfirmationDialog.confirm(self) 62 return (confirmed, self.checkbutton.get_active()) 63 trunk/src/main_window.py
r412 r417 37 37 from preference_window import PreferenceWindow 38 38 from multi_media_keys import MultiMediaKeys 39 from dialogs import ErrorDialog, ConfirmationWithDisableOptionDialog 39 40 40 41 class MainWindow(mesk.window.Window): … … 89 90 self.add_notebook_control(self._empty_control) 90 91 self._empty_control.widget.show() 92 self._notebook.set_show_tabs(False) 91 93 elif not self._active_control: 92 94 self.set_active_control(self._controls[0]) … … 114 116 mesk.log.info('Loading playlist \'%s\'...' % name) 115 117 pl_ctrl = PlaylistControl(name) 116 except mesk.playlist.PlaylistException, ex: 117 msg = _("Error loading playlist '%s'") % name 118 d = gtk.MessageDialog(None, gtk.DIALOG_MODAL, 119 type = gtk.MESSAGE_ERROR, 120 buttons = gtk.BUTTONS_OK, 121 message_format = msg) 118 except Exception, ex: 119 msg = "<b>%s</b>" % (_("Error loading playlist '%s'") % name) 120 d = ErrorDialog(self.window) 121 d.set_markup(msg) 122 122 d.format_secondary_text(str(ex)) 123 123 d.run() … … 228 228 # Add special widget for whenever there are none 229 229 if self._notebook.get_n_pages() == 0: 230 self._notebook.set_show_tabs(False) 230 231 self.add_notebook_control(self._empty_control) 231 232 elif self._notebook.get_n_pages() == 1: 233 self._notebook.set_show_tabs(True) 232 234 self._notebook.set_show_border(False) 233 235 # DnD clean up … … 270 272 self.window.show() 271 273 272 def quit(self): 273 # Confirm the quit 274 d = gtk.MessageDialog(None, gtk.DIALOG_MODAL, 275 type = gtk.MESSAGE_QUESTION) 276 d.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) 277 d.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 278 d.set_markup(_('<b>Are you sure you want to quit?</b>')) 279 d.set_transient_for(self.window) 280 resp = d.run() 281 d.destroy() 282 if resp != gtk.RESPONSE_OK: 283 return 284 274 def quit(self, prompt=mesk.config.getboolean(mesk.CONFIG_MAIN, 275 'confirm_quit')): 276 if prompt: 277 # Confirm the quit 278 d = ConfirmationWithDisableOptionDialog(self.window) 279 d.set_markup('<b>%s</b>' % _('Are you sure you want to quit?')) 280 (confirmed, disable_prompt) = d.confirm() 281 if not confirmed: 282 return False 283 mesk.config.set(mesk.CONFIG_MAIN, 'confirm_quit', 284 str(not disable_prompt)) 285 285 286 self._save_window_attrs() 286 287 self.window.hide() … … 313 314 pass 314 315 316 return True 317 315 318 def _save_window_attrs(self): 316 319 (width, height) = self.window.get_size() … … 342 345 return True 343 346 else: 344 self.quit() 345 return False 347 if not self.quit(): 348 return True 349 else: 350 # Return yes, you may delete me 351 return False 346 352 347 353 def set_compact_mode(self, state): trunk/src/mesk/__init__.py
r409 r417 54 54 'version': [str, APP_VERSION, _('Application version')], 55 55 'playlist_dir': [str, DEFAULT_PLAYLISTS_DIR, 56 _('The directory containing playlists ')],56 _('The directory containing playlists.')], 57 57 'active_playlist': [str, '', 58 _('The foreground playlist that has audio control ')],58 _('The foreground playlist that has audio control.')], 59 59 'playlists': [str, DEFAULT_PLAYLIST_NAME, 60 _('A list of playlists to open on startup ')],60 _('A list of playlists to open on startup.')], 61 61 'log_level': [str, 'INFO', 62 62 _('Logging level. May be CRITICAL, ERROR, WARNING, INFO, ' 63 63 'VERBOSE, or DEBUG')], 64 'confirm_quit': [bool, True, 65 _('Show confirmation dialog before quitting the ' 66 'application.')], 64 67 'plugins_dir': [str, DEFAULT_PLUGINS_DIR, 65 68 _('The directory containing user installed plugins')], … … 73 76 _('If True, the main window is hidded instead of ' 74 77 'closed when the window close button is ' 75 'clicked ')],76 'main_window_width': [int, 435, _('Main window width ')],77 'main_window_height': [int, 560, _('Main window height ')],78 'main_window_pos_x': [int, -1, _('Main window x origin ')],79 'main_window_pos_y': [int, -1, _('Main window y origin ')],78 'clicked.')], 79 'main_window_width': [int, 435, _('Main window width.')], 80 'main_window_height': [int, 560, _('Main window height.')], 81 'main_window_pos_x': [int, -1, _('Main window x origin.')], 82 'main_window_pos_y': [int, -1, _('Main window y origin.')], 80 83 'compact_main_window_pos_x': [int, -1, 81 _('Main window x origin in compact mode ')],84 _('Main window x origin in compact mode.')], 82 85 'compact_main_window_pos_y': [int, -1, 83 _('Main window y origin in compact mode ')],86 _('Main window y origin in compact mode.')], 84 87 'show_tab_close_button': [bool, False, 85 _('Display a close button on each tab ')],88 _('Display a close button on each tab.')], 86 89 'show_tip_window_on_startup': [bool, True, 87 90 _('Show tips window each time Mesk is ' trunk/src/playlist_control.py
r416 r417 30 30 from mesk.audio import UnsupportedFormat 31 31 from mesk.audio.source import UnsupportedScheme 32 33 from dialogs import ConfirmationDialog 32 34 33 35 # Data model. These do not have to correspond to the column order, nor … … 463 465 def _on_delete_menuitem_activate(self, menuitem): 464 466 # Confirm 465 d = gtk.MessageDialog(None, gtk.DIALOG_MODAL, 466 type = gtk.MESSAGE_WARNING) 467 d.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) 468 d.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) 467 d = ConfirmationDialog(None, type=gtk.MESSAGE_WARNING) 469 468 d.set_markup(_('Are you sure you want to delete playlist \'%s\'?') % \ 470 469 self._pl_config.name) 471 470 d.format_secondary_text(_('All playlist data will be lost.')) 472 473 resp = d.run() 474 d.destroy() 475 if resp != gtk.RESPONSE_OK: 471 if not d.confirm(): 476 472 return 477 473 trunk/src/preference_window.py
r386 r417 23 23 _ = mesk.common.i18n._ 24 24 from mesk.plugin import PluginMgr 25 import mesk.window 25 26 26 import mesk.window 27 from dialogs import ErrorDialog 27 28 28 29 class PreferenceWindow(mesk.window.Window): … … 136 137 model[path][0] = new_state 137 138 except Exception, ex: 138 d = gtk.MessageDialog(None, gtk.DIALOG_MODAL, 139 type=gtk.MESSAGE_ERROR, 140 buttons=gtk.BUTTONS_OK) 139 d = ErrorDialog(self.window) 141 140 d.set_markup('<b>%s</b>' % state_str) 142 141 d.format_secondary_text(str(ex))
