diff orpg/tools/aliaslib.py @ 66:c54768cffbd4 ornery-dev

Traipse Dev 'OpenRPG' {090818-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: *Unstable* This is the first wave of Code Refinement updates. Includes new material from Core Beta; new debugger material (partially implemented), beginnings of switch to etree, TerminalWriter, and a little more. open_rpg has been renamed to component; functioning now as component.get(), component.add(), component.delete(). This version has known bugs, specifically with the gametree and nodes. I think the XML files where not removed during testing of Core and switching back.
author sirebral
date Tue, 18 Aug 2009 06:33:37 -0500
parents c160f26ecf65
children 7b752c9d0c28
line wrap: on
line diff
--- a/orpg/tools/aliaslib.py	Mon Aug 17 06:56:31 2009 -0500
+++ b/orpg/tools/aliaslib.py	Tue Aug 18 06:33:37 2009 -0500
@@ -33,24 +33,24 @@
 from orpg.orpg_windows import createMaskedButton, orpgMultiCheckBoxDlg
 from orpg.tools.rgbhex import RGBHex
 import orpg.tools.orpg_log
-import orpg.dirpath
+from orpg.dirpath import dir_struct
 import orpg.orpg_xml
 import orpg.tools.validate
-import orpg.tools.orpg_settings
+#import orpg.tools.orpg_settings
 
 class AliasLib(wx.Frame):
     def __init__(self):
-        self.orpgframe = open_rpg.get_component('frame')
-        self.log = open_rpg.get_component('log')
+        self.orpgframe = component.get('frame')
+        self.log = component.get('log')
         self.log.log("Enter AliasLib", ORPG_DEBUG)
         wx.Frame.__init__(self, None, wx.ID_ANY, title="Alias Lib")
         self.orpgframe.Freeze()
         self.Freeze()
         self.SetOwnBackgroundColour('#EFEFEF')
-        self.dir_struct = open_rpg.get_component('dir_struct')
-        self.settings = open_rpg.get_component('settings')
-        self.xml = open_rpg.get_component('xml')
-        self.validate = open_rpg.get_component('validate')
+        self.dir_struct = dir_struct
+        self.settings = component.get('settings')
+        self.xml = component.get('xml')
+        self.validate = component.get('validate')
         self.filename = self.settings.get_setting('aliasfile') + '.alias'
         self.validate.config_file(self.filename, "default_alias.alias")
         self.buildMenu()
@@ -64,10 +64,10 @@
         self.log.log("Exit AliasLib", ORPG_DEBUG)
 
     def InitSetup(self):
-        self.chat = open_rpg.get_component('chat')
-        self.gametree = open_rpg.get_component('tree')
-        self.map = open_rpg.get_component('map')
-        self.session = open_rpg.get_component('session')
+        self.chat = component.get('chat')
+        self.gametree = component.get('tree')
+        self.map = component.get('map')
+        self.session = component.get('session')
 
     def buildMenu(self):
         self.log.log("Enter AliasLib->buildMenu(self)", ORPG_DEBUG)
@@ -189,7 +189,7 @@
 
     def OnMB_FileExportToTree(self, event):
         self.log.log("Enter AliasLib->OnMB_FileExportToTree(self, event)", ORPG_DEBUG)
-        #tree = open_rpg.get_component("tree")
+        #tree = component.get("tree")
         xml = '<nodehandler class="voxchat_handler" icon="player" module="voxchat" name="' + self.filename[:-6] + '" use.filter="0" version="1.0">' + "\n"
         idx = self.aliasIdx
         for n in xrange(self.selectAliasWnd.GetItemCount()):
@@ -216,7 +216,7 @@
         self.log.log("Enter AliasLib->OnMB_FileExit(self, event)", ORPG_DEBUG)
         self.OnMB_FileSave(0)
         self.Hide()
-        top_frame = open_rpg.get_component('frame')
+        top_frame = component.get('frame')
         top_frame.mainmenu.Check(top_frame.mainmenu.FindMenuItem("Windows", "Alias Lib"), False)
         self.log.log("Exit AliasLib->OnMB_FileExit(self, event)", ORPG_DEBUG)