def MessageBox(message, caption=eg.APP_NAME, style=wx.OK, parent=None): if parent is None: style |= wx.STAY_ON_TOP dialog = eg.MessageDialog(parent, message, caption, style) result = dialog.ShowModal() dialog.Destroy() return result
def on_left_up(evt): if self.HasCapture(): self.ReleaseMouse() self.click_count += 1 if self.click_count == 2: self.click_count = 0 dialog = eg.MessageDialog( parent=None, message= ('Warning: This process cannot be undone so make\n' ' a backup copy of your save file now.\n\n' 'This process will modify and save all EventGhost Data!!\n' 'Enable using GUID\'s?\n\n'), style=wx.YES_NO | wx.STAY_ON_TOP) if dialog.ShowModal() == wx.ID_YES: eg.useTreeItemGUID = True eg.document.SetIsDirty(True) eg.document.Save() eg.config.Save() dialog.Destroy() evt.Skip()