X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d69225772ad1ff3952a3ee74055dc93f85c13812..25b3661bd4cb44304418b93c0dee1d0dfb99765c:/wxPython/wx/lib/pydocview.py diff --git a/wxPython/wx/lib/pydocview.py b/wxPython/wx/lib/pydocview.py index 3292f8aa91..7c9f8e00c0 100644 --- a/wxPython/wx/lib/pydocview.py +++ b/wxPython/wx/lib/pydocview.py @@ -295,7 +295,7 @@ class DocMDIParentFrameMixIn: config = wx.ConfigBase_Get() if config.ReadInt("MDIFrameMaximized", False): - # wxBug: On maximize, statusbar leaves a residual that needs to be refreshed, happens even when user does it + # wxBug: On maximize, statusbar leaves a residual that needs to be refereshed, happens even when user does it self.Maximize() self.CreateEmbeddedWindows(embeddedWindows) @@ -1478,7 +1478,7 @@ class GeneralOptionsPanel(wx.Panel): msgTitle = wx.GetApp().GetAppName() if not msgTitle: msgTitle = _("Document Options") - wx.MessageBox("Document interface changes will not appear until the application is restarted.", + wx.MessageBox(_("Document interface changes will not appear until the application is restarted."), msgTitle, wx.OK | wx.ICON_INFORMATION, self.GetParent()) @@ -1603,7 +1603,7 @@ class DocApp(wx.PySimpleApp): args = pickle.loads(data) for arg in args: if arg[0] != '/' and arg[0] != '-' and os.path.exists(arg): - self.GetDocumentManager().CreateDocument(arg, wx.lib.docview.DOC_SILENT) + self.GetDocumentManager().CreateDocument(os.path.normpath(arg), wx.lib.docview.DOC_SILENT) # force display of running app topWindow = wx.GetApp().GetTopWindow() @@ -1624,7 +1624,7 @@ class DocApp(wx.PySimpleApp): args = sys.argv[1:] for arg in args: if arg[0] != '/' and arg[0] != '-' and os.path.exists(arg): - self.GetDocumentManager().CreateDocument(arg, wx.lib.docview.DOC_SILENT) + self.GetDocumentManager().CreateDocument(os.path.normpath(arg), wx.lib.docview.DOC_SILENT) def GetDocumentManager(self): @@ -1995,10 +1995,7 @@ class DocApp(wx.PySimpleApp): if isinstance(document, ChildDocument) and document.GetParentDocument() == parentDocument: if document.GetFirstView().GetFrame(): document.GetFirstView().GetFrame().SetFocus() - if document.GetFirstView().OnClose(deleteWindow = False): - if document.GetFirstView().GetFrame(): - document.GetFirstView().GetFrame().Close() # wxBug: Need to do this for some random reason - else: + if not document.GetFirstView().OnClose(): return False return True