Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits

[6794] wizards2/Wizard2_GUI.py: Re-implements the Phase* base classes.

 

 

Cherokee commits RSS feed   Index | Next | Previous | View Threaded


cherokee at cherokee-project

Aug 7, 2011, 9:34 AM

Post #1 of 1 (174 views)
Permalink
[6794] wizards2/Wizard2_GUI.py: Re-implements the Phase* base classes.

Revision: 6794
http://svn.cherokee-project.com/changeset/6794
Author: alo
Date: 2011-08-07 18:34:04 +0200 (Sun, 07 Aug 2011)
Log Message:
-----------
Re-implements the Phase* base classes. Its caching mechanism was
introducing too many problems.

Modified Paths:
--------------
wizards2/Wizard2_GUI.py

Modified: wizards2/Wizard2_GUI.py
===================================================================
--- wizards2/Wizard2_GUI.py 2011-08-07 15:59:46 UTC (rev 6793)
+++ wizards2/Wizard2_GUI.py 2011-08-07 16:34:04 UTC (rev 6794)
@@ -45,14 +45,12 @@
def __init__ (self, title):
CTK.Box.__init__ (self)
self.title = title
- self.built = False

def Render (self):
- if not self.built:
- self.built = True
- self += CTK.RawHTML ('<h2>%s</h2>' %(_(self.title)))
- if hasattr (self, '__build_GUI__'):
- self.__build_GUI__()
+ self.Empty()
+ self += CTK.RawHTML ('<h2>%s</h2>' %(_(self.title)))
+ if hasattr (self, '__build_GUI__'):
+ self.__build_GUI__()

return CTK.Box.Render (self)

@@ -62,52 +60,40 @@
class Phase_Next (Phase):
def __init__ (self, title):
Phase.__init__ (self, title)
- self.buttons_added = False

def Render (self):
- if not self.buttons_added:
- self.buttons_added = True
- self += CTK.DruidButtonsPanel_Next_Auto()
+ render = Phase.Render (self)
+ render += CTK.DruidButtonsPanel_Next_Auto().Render()
+ return render

- return Phase.Render(self)
-
class Phase_Cancel (Phase):
def __init__ (self, title):
Phase.__init__ (self, title)
- self.buttons_added = False

def Render (self):
- if not self.buttons_added:
- self.buttons_added = True
- self += CTK.DruidButtonsPanel_Cancel()
+ render = Phase.Render (self)
+ render += CTK.DruidButtonsPanel_Cancel().Render()
+ return render

- return Phase.Render(self)
-
class Phase_Close (Phase):
def __init__ (self, title):
Phase.__init__ (self, title)
- self.buttons_added = False

def Render (self):
- if not self.buttons_added:
- self.buttons_added = True
- self += CTK.DruidButtonsPanel_Close()
+ render = Phase.Render (self)
+ render += CTK.DruidButtonsPanel_Close().Render()
+ return render

- return Phase.Render(self)
-
class Phase_PrevNext (Phase):
def __init__ (self, title):
Phase.__init__ (self, title)
- self.buttons_added = False

def Render (self):
- if not self.buttons_added:
- self.buttons_added = True
- self += CTK.DruidButtonsPanel_PrevNext_Auto()
+ render = Phase.Render (self)
+ render += CTK.DruidButtonsPanel_PrevNext_Auto().Render()
+ return render

- return Phase.Render(self)

-
#
# Stages
#

Cherokee commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.