diff orpg/mapper/miniatures_handler.py @ 137:54446a995007 alpha

Traipse Alpha 'OpenRPG' {091018-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 (Cleaning up for Beta) Added Bookmarks Fix to Remote Admin Commands Minor fix to text based Server Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager default_manifest.xml renamed to default_upmana.xml Cleaner clode for saved repositories New TrueDebug Class in orpg_log (See documentation for usage) Mercurial's hgweb folder is ported to upmana **Pretty important update that can help remove thousands of dead children from your gametree. **Children, <forms />, <group_atts />, <horizontal />, <cols />, <rows />, <height />, etc... are all tags now. Check your gametree and look for dead children!! **New Gametree Recusion method, mapping, and context sensitivity. !!Alpha - Watch out for infinite loops!!
author sirebral
date Wed, 18 Nov 2009 19:57:52 -0600
parents 9314d63c0941
children 06f10429eedc
line wrap: on
line diff
--- a/orpg/mapper/miniatures_handler.py	Mon Nov 16 19:13:41 2009 -0600
+++ b/orpg/mapper/miniatures_handler.py	Wed Nov 18 19:57:52 2009 -0600
@@ -420,7 +420,6 @@
             oldz = self.sel_rmin.zorder
             # Make sure the mini isn't sticky front or back
             if (oldz != MIN_STICKY_BACK) and (oldz != MIN_STICKY_FRONT):
-		##   print "old z-order = " + str(oldz)
                 self.sel_rmin.zorder -= 1
                 #  Re-collapse to normalize
                 #  Note:  only one update (with the final values) will be sent
@@ -434,7 +433,6 @@
             #     before getting the oldz to test
             #  Save the selected minis current z-order
             oldz = self.sel_rmin.zorder
-	    ##  print "old z-order = " + str(oldz)
             self.sel_rmin.zorder += 1
 
             #  Re-collapse to normalize
@@ -452,10 +450,8 @@
 
             # Make sure the mini isn't sticky front or back
             if (oldz != MIN_STICKY_BACK) and (oldz != MIN_STICKY_FRONT):
-	    ##  print "old z-order = " + str(oldz)
                 #  The new z-order will be one more than the last index
                 newz = len(self.canvas.layers['miniatures'].miniatures)
-	    ##  print "new z-order = " + str(newz)
                 self.sel_rmin.zorder = newz
                 #  Re-collapse to normalize
                 #  Note:  only one update (with the final values) will be sent
@@ -471,18 +467,15 @@
             oldz = self.sel_rmin.zorder
             # Make sure the mini isn't sticky front or back
             if (oldz != MIN_STICKY_BACK) and (oldz != MIN_STICKY_FRONT):
-	    ##  print "old z-order = " + str(oldz)
 
                 #  Since 0 is the lowest in a normalized order, be one less
                 newz = -1
-	    ##  print "new z-order = " + str(newz)
                 self.sel_rmin.zorder = newz
                 #  Re-collapse to normalize
                 #  Note:  only one update (with the final values) will be sent
                 self.canvas.layers['miniatures'].collapse_zorder()
 
         elif id == MIN_FRONTBACK_UNLOCK:
-            #print "Unlocked/ unstickified..."
             if self.sel_rmin.zorder == MIN_STICKY_BACK: self.sel_rmin.zorder = MIN_STICKY_BACK + 1
             elif self.sel_rmin.zorder == MIN_STICKY_FRONT: self.sel_rmin.zorder = MIN_STICKY_FRONT - 1
         elif id == MIN_LOCK_BACK: self.sel_rmin.zorder = MIN_STICKY_BACK
@@ -497,7 +490,6 @@
     def on_miniature(self, evt):
         session = self.canvas.frame.session
         if (session.my_role() != session.ROLE_GM) and (session.my_role() != session.ROLE_PLAYER) and (session.use_roles()):
-            print session.my_role()
             self.infoPost("You must be either a player or GM to use the miniature Layer")
             return
         min_url = self.min_url.GetValue()
@@ -505,8 +497,6 @@
         if min_url == "" or min_url == "http://": return
         if min_url[:7] != "http://" : min_url = "http://" + min_url
         # make label
-        if self.auto_label: print 'auto-label'
-        if not self.auto_label: print 'False'
         if self.auto_label and min_url[-4:-3] == '.':
             start = min_url.rfind("/") + 1
             min_label = min_url[start:len(min_url)-4]
@@ -517,7 +507,6 @@
         try:
             id = 'mini-' + self.canvas.frame.session.get_next_id()
             # make the new mini appear in top left of current viewable map
-            print id
             dc = wx.ClientDC(self.canvas)
             self.canvas.PrepareDC(dc)
             dc.SetUserScale(self.canvas.layers['grid'].mapscale,self.canvas.layers['grid'].mapscale)
@@ -527,7 +516,6 @@
         except:
             # When there is an exception here, we should be decrementing the serial_number for reuse!!
             unablemsg= "Unable to load/resolve URL: " + min_url + " on resource \"" + min_label + "\"!!!\n\n"
-            #print unablemsg
             dlg = wx.MessageDialog(self,unablemsg, 'Url not found',wx.ICON_EXCLAMATION)
             dlg.ShowModal()
             dlg.Destroy()
@@ -771,9 +759,7 @@
 
     def role_is_gm_or_player(self):
         session = self.canvas.frame.session
-        print session.my_role(), session.ROLE_GM
         if (session.my_role() != session.ROLE_GM) and (session.my_role() != session.ROLE_PLAYER) and (session.use_roles()):
-            print 'role is gm or player'
             self.infoPost("You must be either a player or GM to use the miniature Layer")
             return False
         return True