|
From: Martynas J. <mj...@us...> - 2006-02-17 13:58:54
|
Update of /cvsroot/opendict/opendict/lib/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29772/lib/gui Modified Files: dicteditorwin.py helpwin.py mainwin.py pluginwin.py Log Message: 1. Several translation string bugs fixed. 2. Licence window moved to About window. Index: pluginwin.py =================================================================== RCS file: /cvsroot/opendict/opendict/lib/gui/pluginwin.py,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- pluginwin.py 16 Feb 2006 19:27:46 -0000 1.44 +++ pluginwin.py 17 Feb 2006 13:58:44 -0000 1.45 @@ -521,8 +521,8 @@ except Exception, e: traceback.print_exc() progressDialog.Destroy() - error = _("Unable to download list from %s: %s" \ - % (self.app.config.get('repository-list'), e)) + error = _("Unable to download list from %s: %s") \ + % (self.app.config.get('repository-list'), e) if not error: error = downloader.getErrorMessage() @@ -607,7 +607,7 @@ except Exception, e: traceback.print_exc() title = _("Unable to remove") - msg = _("Unable to remove dictionary \"%s\"" % dictName) + msg = _("Unable to remove dictionary \"%s\"") % dictName errorwin.showErrorMessage(title, msg) return @@ -735,10 +735,10 @@ except Exception, e: traceback.print_exc() title = _("Error") - msg = _("Unable to remove old version of \"%s\". " \ - "Error occured: \"<i>%s</i>\". New version " \ - "cannot be installed without removing old one." \ - % (dictInstance.getName(), e)) + msg = _("Unable to remove old version of \"%s\". " + "Error occured: \"<i>%s</i>\". New version " + "cannot be installed without removing old one.") \ + % (dictInstance.getName(), e) errorwin.showErrorMessage(title, msg) return @@ -758,8 +758,8 @@ except Exception, e: traceback.print_exc() title = _("Unable to install") - msg = _("Unable to install dictionary \"%s\"." \ - % dictInfo.getName()) + msg = _("Unable to install dictionary \"%s\".") \ + % dictInfo.getName() errorwin.showErrorMessage(title, msg) return Index: dicteditorwin.py =================================================================== RCS file: /cvsroot/opendict/opendict/lib/gui/dicteditorwin.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- dicteditorwin.py 21 Apr 2005 21:37:20 -0000 1.17 +++ dicteditorwin.py 17 Feb 2006 13:58:44 -0000 1.18 @@ -612,7 +612,7 @@ wx.EndBusyCursor() traceback.print_exc() title = _("Open Failed") - msg = _("Unable to open dictionary (got message: %s" % e) + msg = _("Unable to open dictionary (got message: %s)") % e errorwin.showErrorMessage(title, msg) return Index: mainwin.py =================================================================== RCS file: /cvsroot/opendict/opendict/lib/gui/mainwin.py,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- mainwin.py 15 Feb 2006 16:29:19 -0000 1.90 +++ mainwin.py 17 Feb 2006 13:58:44 -0000 1.91 @@ -94,9 +94,9 @@ systemLog(ERROR, "Unable to decode '%s': %s" % (word.encode('UTF-8'), e)) title = _("Encode Failed") - msg = _("Unable to encode text \"%s\" in %s for \"%s\"." \ + msg = _("Unable to encode text \"%s\" in %s for \"%s\".") \ % (enc.toWX(word), parent.activeDictionary.getEncoding(), - parent.activeDictionary.getName())) + parent.activeDictionary.getName()) errorwin.showErrorMessage(title, msg) @@ -330,11 +330,6 @@ # menuHelp = wxMenu() - idLicence = wx.NewId() - menuHelp.Append(idLicence, _("&License")) - - menuHelp.AppendSeparator() - idAbout = wx.NewId() menuHelp.Append(idAbout, _("&About\tCtrl-A")) @@ -496,7 +491,6 @@ EVT_MENU(self, idPrefs, self.onShowPrefsWindow) # Help menu events - EVT_MENU(self, idLicence, self.onLicence) EVT_MENU(self, idAbout, self.onAbout) # Other events @@ -593,7 +587,7 @@ try: assert result.__class__ == meta.SearchResult except: - self.SetStatusText(_(errortype.INTERNAL_ERROR.getMessage())) + self.SetStatusText(errortype.INTERNAL_ERROR.getMessage()) if self.activeDictionary.getType() == dicttype.PLUGIN: title = errortype.INTERNAL_ERROR.getMessage() @@ -638,11 +632,11 @@ systemLog(ERROR, "Unable to decode translation in %s (%s)" \ % (self.activeDictionary.getEncoding(), e)) - title = _(errortype.INVALID_ENCODING.getMessage()) + title = errortype.INVALID_ENCODING.getMessage() msg = _("Translation cannot be displayed using selected " \ "encoding %s. Please try another encoding from " \ - "View > Character Encoding menu." \ - % self.activeDictionary.getEncoding()) + "View > Character Encoding menu.") \ + % self.activeDictionary.getEncoding() self.SetStatusText(title) errorwin.showErrorMessage(title, msg) return @@ -775,11 +769,11 @@ systemLog(ERROR, "Unable to decode '%s': %s" % (word.encode('UTF-8'), e)) title = _("Encode Failed") - msg = _("Unable to encode text \"%s\" in %s for \"%s\". " \ - "That logically means the word " \ - "definition does not exist in the dictionary." \ + msg = _("Unable to encode text \"%s\" in %s for \"%s\". " + "That logically means the word " + "definition does not exist in the dictionary.") \ % (enc.toWX(word), self.activeDictionary.getEncoding(), - self.activeDictionary.getName())) + self.activeDictionary.getName()) errorwin.showErrorMessage(title, msg) @@ -1081,7 +1075,7 @@ "character encoding %s is not correct for this " \ "dictionary. Try selecting " \ "another encoding from View > Character Encoding " \ - "menu" % self.app.config.get('encoding')) + "menu") % self.app.config.get('encoding') from lib.gui import errorwin errorwin.showErrorMessage(title, msg) @@ -1097,8 +1091,8 @@ wx.EndBusyCursor() traceback.print_exc() title = _("Error") - msg = _("Unable to load dictionary index table. " \ - "Got error: %s" % e) + msg = _("Unable to load dictionary index table. " + "Got error: %s") % e from lib.gui import errorwin errorwin.showErrorMessage(title, msg) return @@ -1296,17 +1290,6 @@ systemLog(WARNING, "Manual function is not impelemented yet") - def onLicence(self, event): - """Shows 'License' window""" - - licenseWindow = LicenseWindow(self, -1, - _("License"), - size=(500, 400), - style=wxDEFAULT_FRAME_STYLE) - licenseWindow.CenterOnScreen() - licenseWindow.Show(True) - - def onAbout(self, event): """Shows 'About' window""" Index: helpwin.py =================================================================== RCS file: /cvsroot/opendict/opendict/lib/gui/helpwin.py,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- helpwin.py 28 Jan 2006 14:45:08 -0000 1.22 +++ helpwin.py 17 Feb 2006 13:58:44 -0000 1.23 @@ -93,11 +93,11 @@ # "Written by" panel writePanel = wxPanel(nb, -1) vboxWrite = wxBoxSizer(wxVERTICAL) - writtenString = unicode("Martynas Jocius <mj...@ak...>\n" \ - "Nerijus BaliÅ«nas <ner...@dt...>\n" \ + writtenString = unicode("Martynas Jocius <mj...@ak...>\n" + "Nerijus BaliÅ«nas <ner...@dt...>\n" "Mantas KriauÄiÅ«nas <ma...@ak...>", "UTF-8") - written = _(enc.toWX(writtenString)) + written = enc.toWX(writtenString) labelWrite = wxStaticText(writePanel, -1, written) vboxWrite.Add(labelWrite, 0, wxALL, 10) writePanel.SetSizer(vboxWrite) @@ -111,7 +111,7 @@ "<ire...@mi...>\n" \ "Martynas Jocius <mj...@ak...>", "UTF-8") - trans = _(enc.toWX(transString)) + trans = enc.toWX(transString) labelTP = wxStaticText(tPanel, -1, trans) vboxTP.Add(labelTP, 0, wxALL, 10) tPanel.SetSizer(vboxTP) @@ -123,7 +123,7 @@ vboxThP = wxBoxSizer(wxVERTICAL) thanksString = unicode("KÄstutis BiliÅ«nas <ke...@ka...>\n", "UTF-8") - thanks = _(enc.toWX(thanksString)) + thanks = enc.toWX(thanksString) labelThP = wxStaticText(thPanel, -1, thanks) vboxThP.Add(labelThP, 0, wxALL, 10) thPanel.SetSizer(vboxThP) @@ -161,7 +161,7 @@ vbox.Add(wxStaticBitmap(self, -1, bmp, wxPoint(-1, -1)), 0, wxALL | wxCENTRE, 5) - title = _("OpenDict %s" % info.VERSION) + title = "OpenDict %s" % info.VERSION copy = "Copyright %s 2003-2006 Martynas Jocius <mj...@ak...>" % \ unicode("\302\251", "UTF-8") desc = _("OpenDict is multiplatform dictionary.") @@ -189,6 +189,9 @@ self.buttonCredits = wxButton(self, 2004, _("Credits")) hboxButtons.Add(self.buttonCredits, 0, wxALL | wxALIGN_LEFT, 3) + self.buttonLicence = wxButton(self, 2006, _("Licence")) + hboxButtons.Add(self.buttonLicence, 0, wxALL | wxALIGN_LEFT, 3) + self.buttonOK = wxButton(self, 2003, _("Close")) hboxButtons.Add(self.buttonOK, 0, wxALL | wxALIGN_RIGHT, 3) @@ -199,6 +202,7 @@ EVT_BUTTON(self, 2003, self.onClose) EVT_BUTTON(self, 2004, self.onCredits) + EVT_BUTTON(self, 2006, self.onLicence) def onClose(self, event): @@ -210,3 +214,14 @@ size=(500, 150)) creditsWindow.CentreOnScreen() creditsWindow.Show() + + + def onLicence(self, event): + licenseWindow = LicenseWindow(self, -1, + _("Licence"), + size=(500, 400), + style=wxDEFAULT_FRAME_STYLE) + licenseWindow.CenterOnScreen() + licenseWindow.Show(True) + + |