Skip to content

Commit

Permalink
Make gui compatible with wxPy4
Browse files Browse the repository at this point in the history
* Use RuntimeError exception instead of wx.PyDeadObjectError
* Use wx.Center instead of CenterOnScreen
  • Loading branch information
nvdaes committed Apr 27, 2017
1 parent 6f8f8fc commit 7cb5cec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions addon/globalPlugins/placeMarkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def __init__(self, parent):
self.addCheckBox.Disable()
self.searchRadioBox.Disable()
self.caseSensitiveCheckBox.Disable()
self.Center(wx.BOTH | wx.CENTER_ON_SCREEN)
self.Center(wx.BOTH | wx.Center)

def onSearchEditTextChange(self, evt):
if self.searchTextEdit.Value:
Expand Down Expand Up @@ -329,7 +329,7 @@ def __init__(self, parent):
mainSizer.Add(sHelper.sizer, border=gui.guiHelper.BORDER_FOR_DIALOGS, flag=wx.ALL)
self.Sizer = mainSizer
mainSizer.Fit(self)
self.Center(wx.BOTH | wx.CENTER_ON_SCREEN)
self.Center(wx.BOTH | wx.Center)

def onCopy(self, evt):
if not self.copyDirectoryEdit.Value:
Expand Down Expand Up @@ -400,7 +400,7 @@ def __init__(self, parent):
mainSizer.Add(sHelper.sizer, border=gui.guiHelper.BORDER_FOR_DIALOGS, flag=wx.ALL)
self.Sizer = mainSizer
mainSizer.Fit(self)
self.Center(wx.BOTH | wx.CENTER_ON_SCREEN)
self.Center(wx.BOTH | wx.Center)

def onRestore(self, evt):
if not self.restoreDirectoryEdit.Value:
Expand Down Expand Up @@ -468,7 +468,7 @@ def __init__(self):
def terminate(self):
try:
self.menu.RemoveItem(self.mainItem)
except wx.PyDeadObjectError:
except RuntimeError:
pass

def onSpecificSearch(self, evt):
Expand Down
2 changes: 1 addition & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("Add-on for setting place markers on specific virtual documents"),
# version
"addon_version" : "7.2",
"addon_version" : "7.2wxPy4",
# Author(s)
"addon_author" : u"Noelia <[email protected]>, Chris <[email protected]>",
# URL for the add-on documentation support
Expand Down

0 comments on commit 7cb5cec

Please sign in to comment.