def OnPreferences(evt): """Open the Preference Panel @param evt: Event fired that called this handler @type evt: wxMenuEvent """ if evt.GetId() == ID_PREF: win = wx.GetApp().GetWindowInstance(prefdlg.PreferencesDialog) if win is not None: win.Raise() else: dlg = prefdlg.PreferencesDialog(None) dlg.CenterOnParent() dlg.Show() else: evt.Skip()
def OnPreferences(evt): """Open the Preference Panel @note: The dialogs module is not imported until this is first called so the first open may lag a little. @param evt: Event fired that called this handler @type evt: wxMenuEvent """ if evt.GetId() == ID_PREF: import prefdlg win = wx.GetApp().GetWindowInstance(prefdlg.PreferencesDialog) if win is not None: win.Raise() else: dlg = prefdlg.PreferencesDialog(None) dlg.CenterOnParent() dlg.Show() else: evt.Skip()