commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/designer/src/forms/wizards AddBlock.py


From: James Thompson
Subject: gnue/designer/src/forms/wizards AddBlock.py
Date: Thu, 14 Nov 2002 20:27:57 -0500

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     James Thompson <address@hidden> 02/11/14 20:27:57

Modified files:
        designer/src/forms/wizards: AddBlock.py 

Log message:
        fixed the add block wizard

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/wizards/AddBlock.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gnue/designer/src/forms/wizards/AddBlock.py
diff -c gnue/designer/src/forms/wizards/AddBlock.py:1.3 
gnue/designer/src/forms/wizards/AddBlock.py:1.4
*** gnue/designer/src/forms/wizards/AddBlock.py:1.3     Thu Nov 14 20:01:25 2002
--- gnue/designer/src/forms/wizards/AddBlock.py Thu Nov 14 20:27:57 2002
***************
*** 36,42 ****
  
  class AddBlockWizard(FormTemplate):
  
! 
  
    ###############
    #
--- 36,46 ----
  
  class AddBlockWizard(FormTemplate):
  
!   # The first step in our wizard.
!   # The template parser will initially
!   # call GetStep(FIRST_STEP).
!   FIRST_STEP = '0'
!   
  
    ###############
    #
***************
*** 46,62 ****
      self.form = root
      self.current = current
  
! 
    ###############
    #
    # We have all the data, so generate our widget.
    #
    def Finalize(self):
  
! 
!     # Find or create parent block...
!     page = self.current.findParentOfType('GFPage')
!     block = self.AddElement('block', page)
  
      return 1
  
--- 50,84 ----
      self.form = root
      self.current = current
  
!   ###############
!   #
!   # Return the markup for a specific page
!   #
!   def GetStep(self, step):
!     print step
!     #
!     # Step #0 / Get Name
!     #
!     if step == '0':
!         
!       content = [WizardText('This will insert a new block.'),
!                  WizardInput('name',label='Object Name:',required=1,size=20)]
!         
!       return   { 'title': 'Add Block',
!                  'content': content,
!                  'prev': None,
!                  'next': None }
!                                         
    ###############
    #
    # We have all the data, so generate our widget.
    #
    def Finalize(self):
  
!     attrs = {'name': self.variables['name'] or 'Block_1'}
!     # Find form...
!     form = self.current.findParentOfType('GFForm')
!     block = self.AddElement('block', form,attrs)
  
      return 1
  
***************
*** 73,79 ****
      'Description' : 'Inserts a Block',
      'Version' : VERSION,
      'Author' : 'The GNUe Designer Team',
!     'Behavior': TEMPLATE,
      'Location' : 'Edit|Insert|Block'
  }
  
--- 95,101 ----
      'Description' : 'Inserts a Block',
      'Version' : VERSION,
      'Author' : 'The GNUe Designer Team',
!     'Behavior': WIZARD,
      'Location' : 'Edit|Insert|Block'
  }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]