Changeset 776:3fb8fdccbf45 in hatta-dev
- Timestamp:
- 07/13/10 13:59:48 (19 months ago)
- Branch:
- default
- File:
-
- 1 edited
-
hatta_qticon.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hatta_qticon.py
r774 r776 61 61 62 62 # For passing multithread exception in Qt. 63 exception_signal = pyqtSignal( int,str)63 exception_signal = pyqtSignal(str) 64 64 65 65 def __init__(self, config, error_handler): … … 83 83 try: 84 84 return self.wiki.application(*args, **kwargs) 85 except e: 86 print e 87 # except Exception as (errno, strerror): 88 # self.exception_signal.emit(errno, strerror) 85 except Exception as e: 86 self.exception_signal.emit(unicode(e)) 89 87 90 88 def quit(self): … … 299 297 self.should_announce = bool(self.config.get_bool('announce', 1)) 300 298 301 self.preferences_window = PreferenceWindow(self, self.hatta_icon, 299 self.preferences_window = PreferenceWindow(self, self.hatta_icon, 302 300 self.config) 303 301 self.preferences_window.config_change.connect( … … 322 320 323 321 self._prepare_default_menu() 322 self.menu.addActions(self.default_actions) 324 323 325 324 # Start Zeroconf thread … … 346 345 action = QAction(_(u'&Preferences'), self) 347 346 action.setToolTip(_(u'Lets you configure the wiki.')) 348 if sys.platform == 'darwin': 349 action.setShortcut(Qt.CTRL + Qt.Key_Comma) 347 action.setShortcut(QKeySequence.Preferences) 350 348 action.triggered.connect(self.preferences_window.show) 351 349 self.default_actions.append(action) … … 384 382 app.quit() 385 383 386 pyqtSlot( int,str)387 def on_error(self, errno,strerror):384 pyqtSlot(str) 385 def on_error(self, strerror): 388 386 """Displays errors from exceptions.""" 389 387 QMessageBox.critical(None, 'Exception', 390 _(u'Error %(error_number)d: %(error_string)s') %391 dict(error_ number=errno, error_string=strerror), 1, 2)388 _(u'Error: %(error_string)s') % 389 dict(error_string=strerror), 1, 2) 392 390 393 391 def _make_discovery_action(self, name, host, port): … … 587 585 setlocale(LC_ALL, '') 588 586 lang = str(QLocale.system().name()).split('_')[0] 589 587 590 588 localedir = os.path.join(module_path(), 'locale') 591 589 if not os.path.isdir(localedir):
Note: See TracChangeset
for help on using the changeset viewer.
