Mercurial > traipse_dev
comparison orpg/main.py @ 100:7ed4979cc1cf beta
Traipse Beta 'OpenRPG' {090925-00}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary:
090925-00:
Adds menu changes to draw attention to important updates, errors, or other events. (image info coming soon)
Traipse URL is not included in the repos tab and is set as default.
Fixes Copy for Windows and Linux (finally!!) users.
Fixes incomplete update to Grid and List nodes.
Fixes incomplete update to Chat Commands.
Fixes problems with Remote Image Upload.
Fixes Drop and Drag of Minis to Map.
CherryPy can now use any image in the webfiles/ folder and sub-folders.
CherryPy can now Drop and Drag Minis to the Map.
Minor changes to Update Manager's GUI.
Expert recommendation warning added to Revision Update.
Step down compatibility with open_rpg & component added to orpgCore.
Fixes CherryPit misspelling.
Makes Traipse Suite 'Attention' item portable, and executes it on 'Critical' debug notices.
Adds incomplete Shift + Enter to Text Entry, currently creates a 'Critical' warning.
New default Lobby Map, designed for Traipse. Feel free to change it.
Updates to Server GUI:
* Admin can Ban from Backend.
* Admin can Modify Ban List and Un Ban users.
* Server GUI finds your Lobby Name
* New users default as Lurker unless a Role is set
Cleaner TraipseSuiteAttention portability and clean up in Main.
Die Roll Commands addition from Core code allowing Math Ordering with ()'s
New About Dialog. A more uniform About Dialog.
Corrects image loading of duplicate images.
author | sirebral |
---|---|
date | Fri, 25 Sep 2009 20:46:02 -0500 |
parents | 118fbe111922 |
children | dcf4fbe09b70 |
comparison
equal
deleted
inserted
replaced
94:118fbe111922 | 100:7ed4979cc1cf |
---|---|
275 def TraipseSuiteWarn(self, menuitem): | 275 def TraipseSuiteWarn(self, menuitem): |
276 ### Beta ### Allows for the reuse of the 'Attention' menu. | 276 ### Beta ### Allows for the reuse of the 'Attention' menu. |
277 ### component.get('frame').TraipseSuiteWarn('item') ### Portable | 277 ### component.get('frame').TraipseSuiteWarn('item') ### Portable |
278 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite!') | 278 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite!') |
279 if menuitem == 'debug': | 279 if menuitem == 'debug': |
280 self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'spotlight.png')) | 280 if self.debugger.IsShown() == True: |
281 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite') | |
282 else: | |
283 self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'spotlight.png')) | |
284 self.traipseSuite.RemoveItem(self.debugConsole) | |
285 self.traipseSuite.AppendItem(self.debugConsole) | |
286 | |
287 def TraipseSuiteWarnCleanup(self, menuitem): | |
288 ### Beta ### Allows for portable cleanup of the 'Attention' menu. | |
289 ### component.get('frame').TraipseSuiteWarnCleanup('item') ### Portable | |
290 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite') | |
291 if menuitem == 'debug': | |
281 self.traipseSuite.RemoveItem(self.debugConsole) | 292 self.traipseSuite.RemoveItem(self.debugConsole) |
293 self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'clear.gif')) | |
282 self.traipseSuite.AppendItem(self.debugConsole) | 294 self.traipseSuite.AppendItem(self.debugConsole) |
283 | 295 |
284 | 296 |
285 ################################# | 297 ################################# |
286 ## All Menu Events | 298 ## All Menu Events |
481 if self.updateMana.IsShown() == True: self.updateMana.Hide() | 493 if self.updateMana.IsShown() == True: self.updateMana.Hide() |
482 else: self.updateMana.Show() | 494 else: self.updateMana.Show() |
483 | 495 |
484 @debugging | 496 @debugging |
485 def OnMB_DebugConsole(self, evt): | 497 def OnMB_DebugConsole(self, evt): |
486 ## Alpha ## | 498 self.TraipseSuiteWarnCleanup('debug') ### Beta ### |
487 self.traipseSuite.RemoveItem(self.debugConsole) | |
488 self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'clear.gif')) | |
489 self.traipseSuite.AppendItem(self.debugConsole) | |
490 self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite') | |
491 ########### | |
492 if self.debugger.IsShown() == True: self.debugger.Hide() | 499 if self.debugger.IsShown() == True: self.debugger.Hide() |
493 else: self.debugger.Show() | 500 else: self.debugger.Show() |
494 | 501 |
495 @debugging | 502 @debugging |
496 def OnMB_ToolsLoggingLevelDebug(self): | 503 def OnMB_ToolsLoggingLevelDebug(self): |
570 self._mgr.Update() | 577 self._mgr.Update() |
571 | 578 |
572 #Help Menu #Needs a custom Dialog because it is ugly on Windows | 579 #Help Menu #Needs a custom Dialog because it is ugly on Windows |
573 @debugging | 580 @debugging |
574 def OnMB_HelpAbout(self): | 581 def OnMB_HelpAbout(self): |
575 | 582 if self.AboutORPG.IsShown() == True: self.AboutORPG.Hide() |
576 description = "OpenRPG is a Virtual Game Table that allows users to connect via a network and play table\n" | 583 else: self.AboutORPG.Show() |
577 description += "top games with friends. 'Traipse' is an OpenRPG distro that is easy to setup and provides superb \n" | |
578 description += "functionality. OpenRPG is originally designed by Chris Davis. \n" | |
579 | |
580 license = "OpenRPG is free software; you can redistribute it and/or modify it " | |
581 license += "under the terms of the GNU General Public License as published by the Free Software Foundation; \n" | |
582 license += "either version 2 of the License, or (at your option) any later version.\n\n" | |
583 license += "OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; \n" | |
584 license += "without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n" | |
585 license += "See the GNU General Public License for more details. You should have received a copy of \n" | |
586 license += "the GNU General Public License along with Traipse 'OpenRPG'; if not, write to \n" | |
587 license += "the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n" | |
588 license += "'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories." | |
589 | |
590 info = wx.AboutDialogInfo() | |
591 info.SetIcon(wx.Icon(dir_struct["icon"]+'splash.gif', wx.BITMAP_TYPE_GIF)) | |
592 info.SetName('Traipse') | |
593 info.SetVersion('OpenRPG ' + VERSION) | |
594 info.SetDescription(description) | |
595 info.SetCopyright('(C) Copyright 2009 Mad Math Labs') | |
596 info.SetWebSite('http://www.openrpg.com') | |
597 info.SetLicence(license) | |
598 orpg_devs = ['Thomas Baleno', 'Andrew Bennett', 'Lex Berezhny', 'Ted Berg', | |
599 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland', | |
600 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease', | |
601 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell', | |
602 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain'] | |
603 for dev in orpg_devs: | |
604 info.AddDeveloper(dev) | |
605 wx.AboutBox(info) | |
606 | 584 |
607 @debugging | 585 @debugging |
608 def OnMB_HelpOnlineUserGuide(self): | 586 def OnMB_HelpOnlineUserGuide(self): |
609 wb = webbrowser.get() | 587 wb = webbrowser.get() |
610 wb.open("https://www.assembla.com/wiki/show/traipse/User_Manual") | 588 wb.open("http://www.assembla.com/wiki/show/traipse/User_Manual") |
611 | 589 |
612 @debugging | 590 @debugging |
613 def OnMB_HelpChangeLog(self): | 591 def OnMB_HelpChangeLog(self): |
614 wb = webbrowser.get() | 592 wb = webbrowser.get() |
615 wb.open("http://www.assembla.com/spaces/milestones/index/traipse_dev?spaces_tool_id=Milestones") | 593 wb.open("http://www.assembla.com/spaces/milestones/index/traipse?spaces_tool_id=Milestones") |
616 | 594 |
617 @debugging | 595 @debugging |
618 def OnMB_HelpReportaBug(self): | 596 def OnMB_HelpReportaBug(self): |
619 wb = webbrowser.get() | 597 wb = webbrowser.get() |
620 wb.open("http://www.assembla.com/spaces/tickets/index/traipse_dev?spaces_tool_id=Tickets") | 598 wb.open("http://www.assembla.com/spaces/tickets/index/traipse_dev?spaces_tool_id=Tickets") |
641 | 619 |
642 base = etree.getroot() | 620 base = etree.getroot() |
643 """ | 621 """ |
644 self.windowsmenu = wx.Menu() | 622 self.windowsmenu = wx.Menu() |
645 self.mainwindows = {} | 623 self.mainwindows = {} |
624 | |
625 # About Window | |
626 self.AboutORPG = AboutORPG(self) | |
646 | 627 |
647 #Plugins Window | 628 #Plugins Window |
648 self.pluginsFrame = pluginUI.PluginFrame(self) | 629 self.pluginsFrame = pluginUI.PluginFrame(self) |
649 component.add("plugins", self.get_activeplugins()) | 630 component.add("plugins", self.get_activeplugins()) |
650 component.add("startplugs", self.get_startplugins()) | 631 component.add("startplugs", self.get_startplugins()) |
655 posy = int(xml_dom.getAttribute("posy")) | 636 posy = int(xml_dom.getAttribute("posy")) |
656 maximized = int(xml_dom.getAttribute("maximized")) | 637 maximized = int(xml_dom.getAttribute("maximized")) |
657 self.SetDimensions(posx, posy, w, h) | 638 self.SetDimensions(posx, posy, w, h) |
658 logger.debug("Dimensions Set") | 639 logger.debug("Dimensions Set") |
659 | 640 |
660 #Update Manager | 641 # Update Manager |
661 self.manifest = manifest.ManifestChanges() | 642 self.manifest = manifest.ManifestChanges() |
662 self.updateMana = upmana.updatemana.updaterFrame(self, | 643 self.updateMana = upmana.updatemana.updaterFrame(self, |
663 "OpenRPG Update Manager Beta 0.8", component, self.manifest, True) | 644 "OpenRPG Update Manager Beta 0.8", component, self.manifest, True) |
664 logger.debug("Menu Created") | 645 logger.debug("Menu Created") |
665 h = int(xml_dom.getAttribute("height")) | 646 h = int(xml_dom.getAttribute("height")) |
668 posy = int(xml_dom.getAttribute("posy")) | 649 posy = int(xml_dom.getAttribute("posy")) |
669 maximized = int(xml_dom.getAttribute("maximized")) | 650 maximized = int(xml_dom.getAttribute("maximized")) |
670 self.SetDimensions(posx, posy, w, h) | 651 self.SetDimensions(posx, posy, w, h) |
671 logger.debug("Dimensions Set") | 652 logger.debug("Dimensions Set") |
672 | 653 |
673 #Update Manager | 654 # Debug Console |
674 self.manifest = manifest.ManifestChanges() | |
675 self.debugger = orpg.tools.orpg_log.DebugConsole(self) | 655 self.debugger = orpg.tools.orpg_log.DebugConsole(self) |
676 logger.debug("Menu Created") | 656 logger.debug("Menu Created") |
677 h = int(xml_dom.getAttribute("height")) | 657 h = int(xml_dom.getAttribute("height")) |
678 w = int(xml_dom.getAttribute("width")) | 658 w = int(xml_dom.getAttribute("width")) |
679 posx = int(xml_dom.getAttribute("posx")) | 659 posx = int(xml_dom.getAttribute("posx")) |
1163 dlg.Destroy() | 1143 dlg.Destroy() |
1164 logger.general("Server killed:", True) | 1144 logger.general("Server killed:", True) |
1165 except Exception: | 1145 except Exception: |
1166 pass | 1146 pass |
1167 | 1147 |
1148 ######################################## | |
1149 ## About Dialog class | |
1150 ######################################## | |
1151 class AboutORPG(wx.Frame): | |
1152 def __init__(self, parent): | |
1153 super(AboutORPG, self).__init__(parent, -1, "About 'Traipse' OpenRPG") | |
1154 icon = None | |
1155 icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO) | |
1156 self.SetIcon( icon ) | |
1157 sizer = wx.GridBagSizer(hgap=1, vgap=1) | |
1158 height = 425; width = 350 | |
1159 self.About = wx.TextCtrl(self, -1, size=wx.DefaultSize, style=wx.TE_MULTILINE | wx.TE_READONLY) | |
1160 img = wx.Image(dir_struct['icon']+'splash.gif', wx.BITMAP_TYPE_ANY).ConvertToBitmap() | |
1161 image = wx.StaticBitmap(self, -1, img, size=wx.DefaultSize) | |
1162 sizer.Add(image, (0,0), flag=wx.ALIGN_CENTER_HORIZONTAL|wx.ALL|wx.ADJUST_MINSIZE) | |
1163 sizer.Add(self.About, (1,0), flag=wx.EXPAND) | |
1164 self.SetSizer(sizer) | |
1165 self.SetAutoLayout(True) | |
1166 self.SetSize((width, height)) | |
1167 sizer.AddGrowableCol(0) | |
1168 sizer.AddGrowableCol(1) | |
1169 sizer.AddGrowableRow(1) | |
1170 self.Bind(wx.EVT_CLOSE, self.Min) | |
1171 self.Min(None) | |
1172 | |
1173 description = "OpenRPG is a Virtual Game Table that allows users to connect via a network and play table " | |
1174 description += "top games with friends. 'Traipse' is an OpenRPG distro that is easy to setup and provides superb " | |
1175 description += "functionality. OpenRPG is originally designed by Chris Davis." | |
1176 | |
1177 license = "OpenRPG is free software; you can redistribute it and/or modify it " | |
1178 license += "under the terms of the GNU General Public License as published by the Free Software Foundation; " | |
1179 license += "either version 2 of the License, or (at your option) any later version.\n\n" | |
1180 license += "OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY " | |
1181 license += "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. " | |
1182 license += "See the GNU General Public License for more details. You should have received a copy of " | |
1183 license += "the GNU General Public License along with Traipse 'OpenRPG'; if not, write to " | |
1184 license += "the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA \n\n" | |
1185 license += "'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories." | |
1186 | |
1187 self.About.AppendText(description+'\n\n') | |
1188 self.About.AppendText(license+'\n\n') | |
1189 self.About.AppendText('OpenRPG Developers:\n') | |
1190 orpg_devs = ['Thomas Baleno', 'Andrew Bennett', 'Lex Berezhny', 'Ted Berg', | |
1191 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland', | |
1192 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease', | |
1193 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell', | |
1194 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain'] | |
1195 for dev in orpg_devs: | |
1196 self.About.AppendText(dev+'\n') | |
1197 | |
1198 def Min(self, evt): | |
1199 self.Hide() | |
1168 | 1200 |
1169 ######################################## | 1201 ######################################## |
1170 ## Application class | 1202 ## Application class |
1171 ######################################## | 1203 ######################################## |
1172 class orpgSplashScreen(wx.SplashScreen): | 1204 class orpgSplashScreen(wx.SplashScreen): |