--- a/Tools/TRPreviewer.py Fri Oct 18 23:00:41 2013 +0200 +++ b/Tools/TRPreviewer.py Fri Nov 01 15:48:48 2013 +0100 @@ -157,8 +157,9 @@ """ Private method to define the user interface actions. """ - self.openUIAct = QAction(UI.PixmapCache.getIcon("openUI.png"), - self.trUtf8('&Open UI Files...'), self) + self.openUIAct = QAction( + UI.PixmapCache.getIcon("openUI.png"), + self.trUtf8('&Open UI Files...'), self) self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) self.openUIAct.setWhatsThis(self.trUtf8( """<b>Open UI Files</b>""" @@ -166,8 +167,9 @@ )) self.openUIAct.triggered[()].connect(self.__openWidget) - self.openQMAct = QAction(UI.PixmapCache.getIcon("openQM.png"), - self.trUtf8('Open &Translation Files...'), self) + self.openQMAct = QAction( + UI.PixmapCache.getIcon("openQM.png"), + self.trUtf8('Open &Translation Files...'), self) self.openQMAct.setStatusTip(self.trUtf8( 'Open Translation files for display')) self.openQMAct.setWhatsThis(self.trUtf8( @@ -176,8 +178,9 @@ )) self.openQMAct.triggered[()].connect(self.__openTranslation) - self.reloadAct = QAction(UI.PixmapCache.getIcon("reload.png"), - self.trUtf8('&Reload Translations'), self) + self.reloadAct = QAction( + UI.PixmapCache.getIcon("reload.png"), + self.trUtf8('&Reload Translations'), self) self.reloadAct.setStatusTip(self.trUtf8( 'Reload the loaded translations')) self.reloadAct.setWhatsThis(self.trUtf8( @@ -187,8 +190,8 @@ )) self.reloadAct.triggered[()].connect(self.translations.reload) - self.exitAct = QAction(UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('&Quit'), self) + self.exitAct = QAction( + UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) self.exitAct.setShortcut(QKeySequence( self.trUtf8("Ctrl+Q", "File|Quit"))) self.exitAct.setStatusTip(self.trUtf8('Quit the application')) @@ -198,8 +201,9 @@ )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) - self.whatsThisAct = QAction(UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), self) + self.whatsThisAct = QAction( + UI.PixmapCache.getIcon("whatsThis.png"), + self.trUtf8('&What\'s This?'), self) self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) self.whatsThisAct.setWhatsThis(self.trUtf8( @@ -248,8 +252,8 @@ )) self.cascadeAct.triggered[()].connect(self.preview.cascadeSubWindows) - self.closeAct = QAction(UI.PixmapCache.getIcon("close.png"), - self.trUtf8('&Close'), self) + self.closeAct = QAction( + UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), self) self.closeAct.setShortcut(QKeySequence(self.trUtf8( "Ctrl+W", "File|Close"))) self.closeAct.setStatusTip(self.trUtf8('Close the current window')) @@ -346,12 +350,16 @@ """ Private slot to show the about information. """ - E5MessageBox.about(self, self.trUtf8("TR Previewer"), self.trUtf8( - """<h3> About TR Previewer </h3>""" - """<p>The TR Previewer loads and displays Qt User-Interface""" - """ files and translation files and shows dialogs for a""" - """ selected language.</p>""" - )) + E5MessageBox.about( + self, + self.trUtf8("TR Previewer"), + self.trUtf8( + """<h3> About TR Previewer </h3>""" + """<p>The TR Previewer loads and displays Qt User-Interface""" + """ files and translation files and shows dialogs for a""" + """ selected language.</p>""" + ) + ) def __aboutQt(self): """ @@ -469,9 +477,11 @@ ntr.fileName = fileName ntr.name = self.__uniqueName(fileName) if ntr.name is None: - E5MessageBox.warning(self.parent(), + E5MessageBox.warning( + self.parent(), self.trUtf8("Set Translator"), - self.trUtf8("""<p>The translation filename <b>{0}</b>""" + self.trUtf8( + """<p>The translation filename <b>{0}</b>""" """ is invalid.</p>""").format(fileName)) return @@ -497,7 +507,8 @@ if name != noTranslationName: trans = self.__findName(name) if trans is None: - E5MessageBox.warning(self.parent(), + E5MessageBox.warning( + self.parent(), self.trUtf8("Set Translator"), self.trUtf8( """<p>The translator <b>{0}</b> is not known.</p>""")\ @@ -639,7 +650,8 @@ if tr.load(transFileName): return tr - E5MessageBox.warning(self.parent(), + E5MessageBox.warning( + self.parent(), self.trUtf8("Load Translator"), self.trUtf8("""<p>The translation file <b>{0}</b> could""" """ not be loaded.</p>""").format(transFileName)) @@ -712,7 +724,8 @@ pass if not self.__widget: - E5MessageBox.warning(self, + E5MessageBox.warning( + self, self.trUtf8("Load UI File"), self.trUtf8( """<p>The file <b>{0}</b> could not be loaded.</p>""")\ @@ -767,7 +780,8 @@ if wview is None: name = os.path.basename(uiFileName) if not name: - E5MessageBox.warning(self, + E5MessageBox.warning( + self, self.trUtf8("Load UI File"), self.trUtf8( """<p>The file <b>{0}</b> could not be loaded.</p>""")\