/[gnue]/gnue-designer/src/base/TemplateParser.py
ViewVC logotype

Diff of /gnue-designer/src/base/TemplateParser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by jcater, Tue Jun 10 00:40:13 2003 UTC revision 1.35 by jcater, Tue Aug 12 22:45:13 2003 UTC
# Line 149  class TemplateParser: Line 149  class TemplateParser:
149    
150      return completed      return completed
151    
152      def cancel(self):
153        self.wizard.EndModal(0)
154    
155    
156  class WizardPage(wxPanel):  class WizardPage(wxPanel):
157    def __init__(self, parser, parent):    def __init__(self, parser, parent):
# Line 307  class WizardPage(wxPanel): Line 310  class WizardPage(wxPanel):
310    
311          if self.parser.template.variables.has_key(object.variable):          if self.parser.template.variables.has_key(object.variable):
312            o.set(self.parser.template.variables[object.variable])            o.set(self.parser.template.variables[object.variable])
313              
314      # Add our buttons to the focus list      # Add our buttons to the focus list
315      if self.prevStep:      if self.prevStep:
316        self.textctrlList.append(self.parser.prevButton)        self.textctrlList.append(self.parser.prevButton)
# Line 574  class SortableListField(wxPanel): Line 577  class SortableListField(wxPanel):
577    
578      self.OnSelectRight(None)      self.OnSelectRight(None)
579    
580          
581    def OnRemove(self, event):    def OnRemove(self, event):
582      sel = list(self.list2.GetSelections())      sel = list(self.list2.GetSelections())
583      sel.sort(lambda a,b : cmp (b,a))      sel.sort(lambda a,b : cmp (b,a))
# Line 632  class WizardRunner: Line 635  class WizardRunner:
635       self.template = template       self.template = template
636       self.instance = instance       self.instance = instance
637       instance.registerEventListeners(       instance.registerEventListeners(
638           { 'Wizard:%s' % template['BaseID']: self.run } )           { 'Wizard:%s' % template['BaseID']: self.run,
639               'Cancel:Wizard:%s' % template['BaseID']: self.cancel } )
640    
641    def run(self, event):    def run(self, event, *args, **parms):
642      self.instance.dispatchEvent('BeginWizard', template=self.template)      self.instance.dispatchEvent('BeginWizard', template=self.template)
643      self.instance.dispatchEvent('BeginUndoGroup')      self.instance.dispatchEvent('BeginUndoGroup')
644      TemplateParser(self.instance, self.instance.rootObject,      self.parser = TemplateParser(self.instance, self.instance.rootObject,
645            self.instance, self.template).run()            self.instance, self.template)
646        self.parser.run(*args, **parms)
647      self.instance.dispatchEvent('EndUndoGroup')      self.instance.dispatchEvent('EndUndoGroup')
648      self.instance.dispatchEvent(Event('EndWizard', template=self.template))      self.instance.dispatchEvent('EndWizard', template=self.template)
649    
650      def cancel(self, event=None):
651        self.parser.cancel()
652    
653    def finalize(self):    def finalize(self):
654      pass      pass
655    
   
656  class WrappedStaticText(wxStaticText):  class WrappedStaticText(wxStaticText):
657    def __init__(self, parent, id, label, width, *args, **params):    def __init__(self, parent, id, label, width, *args, **params):
658      wxStaticText.__init__(self, parent, id, "bah!", *args, **params)      wxStaticText.__init__(self, parent, id, "bah!", *args, **params)

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26