changeset 546:ab0de2faa2f0

various: traceback include added to gametree, time of die rolls removed from print, minilib add of mini fixed, time include added to main, aliaslib error on cancel of load lib fixed, include of ParseContext in minimenu plugin added
author david@goon
date Mon, 29 Mar 2010 23:37:19 -0500
parents fa95f1c862b4
children c7d706e87257
files orpg/dieroller/_base.py orpg/gametree/gametree.py orpg/gametree/nodehandlers/minilib.py orpg/main.py orpg/ui/_alias_lib.py plugins/xxminimenu.py
diffstat 6 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/dieroller/_base.py	Fri Mar 26 19:04:41 2010 -0600
+++ b/orpg/dieroller/_base.py	Mon Mar 29 23:37:19 2010 -0500
@@ -237,7 +237,8 @@
             logger.exception(traceback.format_exc())
             return roll_string
         finally:
-            print "Roll Time:", time.time()-st
+            pass
+            #print "Roll Time:", time.time()-st
 
     def _get_roller(self):
         if self._roller:
--- a/orpg/gametree/gametree.py	Fri Mar 26 19:04:41 2010 -0600
+++ b/orpg/gametree/gametree.py	Mon Mar 29 23:37:19 2010 -0500
@@ -32,7 +32,7 @@
 import time
 import os
 import re
-
+import traceback
 import wx
 from wx.lib.filebrowsebutton import  *
 
--- a/orpg/gametree/nodehandlers/minilib.py	Fri Mar 26 19:04:41 2010 -0600
+++ b/orpg/gametree/nodehandlers/minilib.py	Mon Mar 29 23:37:19 2010 -0500
@@ -145,7 +145,7 @@
 
 
     def new_mini( self, data={}, add=1 ):
-        mini = ET.Element( TAG_MINIATURE )
+        mini = Element( TAG_MINIATURE )
         for key in data.keys():
             mini.set( key, data[ key ] )
         for key in CORE_ATTRIBUTES:
--- a/orpg/main.py	Fri Mar 26 19:04:41 2010 -0600
+++ b/orpg/main.py	Mon Mar 29 23:37:19 2010 -0500
@@ -30,7 +30,7 @@
 
 import traceback
 from xml.parsers.expat import ExpatError
-
+import time
 import wx
 import wx.py
 try:
--- a/orpg/ui/_alias_lib.py	Fri Mar 26 19:04:41 2010 -0600
+++ b/orpg/ui/_alias_lib.py	Mon Mar 29 23:37:19 2010 -0500
@@ -222,10 +222,13 @@
             dlg = wx.FileDialog(self, "Select an Alias Lib to Open",
                                 dir_struct["user"], wildcard="*.alias",
                                 style=wx.HIDE_READONLY|wx.OPEN)
-            if dlg.ShowModal() == wx.ID_OK:
-                new_filename = dlg.GetFilename()
-
-            dlg.Destroy()
+            try:
+                if dlg.ShowModal() == wx.ID_OK:
+                    new_filename = dlg.GetFilename()
+                else:
+                    return
+            finally:
+                dlg.Destroy()
 
             if self._filename == new_filename:
                 return
--- a/plugins/xxminimenu.py	Fri Mar 26 19:04:41 2010 -0600
+++ b/plugins/xxminimenu.py	Mon Mar 29 23:37:19 2010 -0500
@@ -5,6 +5,7 @@
 from orpg.mapper.miniatures_handler import *
 
 from orpg.orpgCore import open_rpg
+from orpg.orpgCore import ParserContext
 from orpg.pluginhandler import PluginHandler
 from orpg.mapper.base_handler import base_layer_handler