Mercurial > traipse_dev
diff orpg/main.py @ 195:b633f4c64aae alpha
Traipse Alpha 'OpenRPG' {100219-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 (Patch-2)
New Features:
New Namespace method with two new syntaxes
Fixes:
Fix to Server GUI startup errors
Fix to Server GUI Rooms tab updating
Fix to Chat and Settings if non existant die roller is picked
Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated
Fix to Alias Lib's Export to Tree, Open, Save features
Fix to alias node, now works properly
Fix to Splitter node, minor GUI cleanup
author | sirebral |
---|---|
date | Sat, 24 Apr 2010 08:37:20 -0500 |
parents | 4b2884f29a72 |
children | 0bc44a57ae6c |
line wrap: on
line diff
--- a/orpg/main.py Fri Jan 15 22:45:51 2010 -0600 +++ b/orpg/main.py Sat Apr 24 08:37:20 2010 -0500 @@ -21,13 +21,13 @@ # File: main.py # Author: Chris Davis # Maintainer: -# Version: -# $Id: main.py,v 1.153 2008/01/24 03:52:03 digitalxero Exp $ +# Version: Traipse 'Ornery-Orc' +# $Id: main.py,v Traipse 'Ornery-Orc' prof.ebral Exp $ # # Description: This is the main entry point of the oprg application # -__version__ = "$Id: main.py,v 1.154 2009/07/19 03:52:03 madmathlabs Exp $" +__version__ = "$Id: main.py,v Traipse 'Ornery-Orc' prof.ebral Exp $" from orpg.orpg_wx import * from orpg.orpgCore import * @@ -50,24 +50,19 @@ import orpg.mapper.images import orpg.dieroller.utils - -#Update Manager# Un remark if you have Mercurial installed import upmana.updatemana -import upmana.manifest as manifest +from upmana.manifest import manifest from orpg.dirpath import dir_struct -#from orpg.dieroller.utils import DiceManager from orpg.tools.settings import settings from orpg.tools.validate import validate from orpg.tools.passtool import PassTool from orpg.tools.orpg_log import logger, crash, debug from orpg.tools.metamenus import MenuBarEx +from orpg.tools.InterParse import Parse from xml.etree.ElementTree import ElementTree, Element, parse from xml.etree.ElementTree import fromstring, tostring -## Element Tree usage will require users to convert to and from string data quite often until users of older versions update. -## This is a problem that users of older versions will need to cross as it is both Core and Traipse that will make the change. -## Older versions have a problem with correct XML. from orpg.orpg_xml import xml #to be replaced by etree @@ -77,7 +72,7 @@ class orpgFrame(wx.Frame): - + def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, wx.Point(100, 100), wx.Size(600,420), style=wx.DEFAULT_FRAME_STYLE) self.validate = component.get("validate") @@ -299,7 +294,8 @@ self.mainmenu.Insert(8, self.traipseSuite, "&Traipse Suite!") if menuitem == 'debug': if self.debugger.IsShown() == True: - self.mainmenu.Replace(8, self.traipseSuite, '&Traipse Suite') + self.mainmenu.Remove(8) + self.mainmenu.Insert(8, self.traipseSuite, "&Traipse Suite") else: self.debugConsole.SetBitmap(wx.Bitmap(dir_struct["icon"] + 'spotlight.png')) self.traipseSuite.RemoveItem(self.debugConsole) @@ -374,18 +370,15 @@ if textColor != None: wnd.SetNonActiveTabTextColour(textColor) wnd.Refresh() - def OnMB_OpenRPGNewMap(self): pass #Not Implemented yet! - def OnMB_OpenRPGTabStylesSlantedColorful(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedColorful"): settings.change('TabTheme', 'slanted&colorful') self.SetTabStyles("OpenRPGTabStylesSlantedColorful", FNB.FNB_VC8|FNB.FNB_COLORFUL_TABS) else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedColorful", True) - def OnMB_OpenRPGTabStylesSlantedBlackandWhite(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedBlackandWhite"): settings.change('TabTheme', 'slanted&bw') @@ -393,7 +386,6 @@ FNB.FNB_VC8, graidentTo=wx.WHITE, graidentFrom=wx.WHITE, textColor=wx.BLACK) else: self.mainmenu.SetMenuState("OpenRPGTabStylesSlantedBlackandWhite", True) - def OnMB_OpenRPGTabStylesSlantedAqua(self): if self.mainmenu.GetMenuState("OpenRPGTabStylesSlantedAqua"): settings.change('TabTheme', 'slanted&aqua') @@ -505,7 +497,7 @@ else: self.updateMana.Show() def OnMB_DebugConsole(self, evt): - self.TraipseSuiteWarnCleanup('debug') ### Beta ### + self.TraipseSuiteWarnCleanup('debug') if self.debugger.IsShown() == True: self.debugger.Hide() else: self.debugger.Show() @@ -514,28 +506,28 @@ if self.mainmenu.GetMenuState("ToolsLoggingLevelDebug"): lvl |= ORPG_DEBUG else: lvl &= ~ORPG_DEBUG logger.log_level = lvl - settings.set('LoggingLevel', lvl) + settings.change('LoggingLevel', lvl) def OnMB_ToolsLoggingLevelNote(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelNote"): lvl |= ORPG_DEBUG else: lvl &= ~ORPG_DEBUG logger.log_level = lvl - settings.set('LoggingLevel', lvl) + settings.change('LoggingLevel', lvl) def OnMB_ToolsLoggingLevelInfo(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelInfo"): lvl |= ORPG_INFO else: lvl &= ~ORPG_INFO logger.log_level = lvl - settings.set('LoggingLevel', lvl) + settings.change('LoggingLevel', lvl) def OnMB_ToolsLoggingLevelGeneral(self): lvl = logger.log_level if self.mainmenu.GetMenuState("ToolsLoggingLevelGeneral"): lvl |= ORPG_GENERAL else: lvl &= ~ORPG_GENERAL logger.log_level = lvl - settings.set('LoggingLevel', lvl) + settings.change('LoggingLevel', lvl) def OnMB_ToolsPasswordManager(self): if self.mainmenu.GetMenuState("ToolsPasswordManager"): self.password_manager.Enable() @@ -631,9 +623,7 @@ #self.manifest = manifest.ManifestChanges() self.updateMana = upmana.updatemana.updaterFrame(self, "OpenRPG Update Manager 1.0", component, manifest, True) - print component.get('upmana-win') component.add('upmana-win', self.updateMana) - print component.get('upmana-win') logger.debug("Menu Created") h = int(xml_dom.get("height")) w = int(xml_dom.get("width")) @@ -685,7 +675,7 @@ logger.debug("Status Window Created") # Create and show the floating dice toolbar - self.dieToolBar = orpg.tools.toolBars.DiceToolBar(self, callBack = self.chat.ParsePost) + self.dieToolBar = orpg.tools.toolBars.DiceToolBar(self, callBack = Parse.Post) wndinfo = AUI.AuiPaneInfo() menuid = wx.NewId() self.mainwindows[menuid] = "Dice Tool Bar" @@ -950,7 +940,6 @@ wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) if dlg.ShowModal() == wx.ID_YES: dlg.Destroy() - debug(child) self.tree.on_receive_data(tostring(child)) self.chat.InfoPost(display_name + " has sent you a tree node...") elif child.tag == 'map': @@ -1112,7 +1101,8 @@ 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland', 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease', 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell', - 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain'] + 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain', + 'David Vrabel'] for dev in orpg_devs: self.About.AppendText(dev+'\n')