diff orpg/gametree/nodehandlers/forms.py @ 152:6081bdc2b8d5 beta

Traipse Beta 'OpenRPG' {091125-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 (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 Recursion method, mapping, and context sensitivity. !Infinite Loops return error instead of freezing the software! New Syntax added for custom PC sheets Tip of the Day added, from Core and community Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to prevent non updated clients from ruining the fix.
author sirebral
date Wed, 25 Nov 2009 06:16:35 -0600
parents 2345c12d93a7
children 3b6888bb53b5
line wrap: on
line diff
--- a/orpg/gametree/nodehandlers/forms.py	Tue Nov 24 17:18:40 2009 -0600
+++ b/orpg/gametree/nodehandlers/forms.py	Wed Nov 25 06:16:35 2009 -0600
@@ -211,8 +211,7 @@
     def tohtml(self):
         txt = self.get_value()
         txt = string.replace(txt,'\n',"<br />")
-        if not self.is_hide_title():
-            txt = "<b>"+self.xml.get("name")+":</b> "+txt
+        if not self.is_hide_title(): txt = "<b>"+self.xml.get("name")+":</b> "+txt
         return txt
 
     def get_value(self):
@@ -245,8 +244,7 @@
         sizer.Add(wx.Size(5,0))
         sizer.Add(self.text, 1, sizer_style)
 
-        if handler.has_send_button():
-            sizer.Add(wx.Button(self, FORM_SEND_BUTTON, "Send"), 0, sizer_style)
+        if handler.has_send_button(): sizer.Add(wx.Button(self, FORM_SEND_BUTTON, "Send"), 0, sizer_style)
 
         self.sizer = sizer
         self.SetSizer(sizer)
@@ -545,18 +543,14 @@
         if type != L_RADIO:
             sizer.Add(wx.StaticText(self, -1, label+": "), 0, wx.EXPAND)
             sizer.Add(wx.Size(5,0))
-
         sizer.Add(self.list, 1, wx.EXPAND)
-
         if handler.has_send_button():
             sizer.Add(wx.Button(self, F_SEND, "Send"), 0, wx.EXPAND)
             self.Bind(wx.EVT_BUTTON, self.handler.on_send_to_chat, id=F_SEND)
-
         self.sizer = sizer
         self.SetSizer(sizer)
         self.SetAutoLayout(True)
         self.Fit()
-
         parent.SetSize(self.GetBestSize())
 
         if type == L_DROP: self.Bind(wx.EVT_COMBOBOX, self.on_change, id=F_LIST)
@@ -715,7 +709,7 @@
     def tohtml(self):
         href = self.link.get("href")
         title = self.xml.get("name")
-        return "<a href=\""+href+"\" >"+title+"</a>"
+        return "<a href='"+href+"' >"+title+"</a>"
 
 class link_panel(wx.StaticText):
     def __init__(self,parent,handler):
@@ -725,7 +719,6 @@
         self.SetForegroundColour(wx.BLUE)
         self.Bind(wx.EVT_LEFT_DOWN, self.handler.on_use)
 
-
 P_URL = wx.NewId()
 
 class link_edit_panel(wx.Panel):
@@ -754,8 +747,7 @@
         if id == P_TITLE:
             self.handler.xml.set('name',txt)
             self.handler.rename(txt)
-        elif id == P_URL:
-            self.handler.link.set('href',txt)
+        elif id == P_URL: self.handler.link.set('href',txt)
 
 ##########################
 ## webimg node handler
@@ -775,11 +767,10 @@
 
     def get_use_panel(self,parent):
         img = img_helper().load_url(self.link.get("href"))
-        if not img is None:
-            return wx.StaticBitmap(parent,-1,img,size= wx.Size(img.GetWidth(),img.GetHeight()))
+        if not img is None: return wx.StaticBitmap(parent,-1,img,size= wx.Size(img.GetWidth(),img.GetHeight()))
         return wx.EmptyBitmap(1, 1)
 
     def tohtml(self):
         href = self.link.get("href")
         title = self.xml.get("name")
-        return "<img src=\""+href+"\" alt="+title+" >"
+        return "<img src='"+href+"' alt="+title+" >"