/[papo]/gnue/designer/src/forms/wizards/AddDataSource.py
ViewVC logotype

Diff of /gnue/designer/src/forms/wizards/AddDataSource.py

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

revision 1.4 by styxman, Fri Nov 8 16:46:03 2002 UTC revision 1.4.4.1 by anthonyl, Tue Mar 4 22:11:40 2003 UTC
# Line 16  Line 16 
16  # write to the Free Software Foundation, Inc., 59 Temple Place  # write to the Free Software Foundation, Inc., 59 Temple Place
17  # - Suite 330, Boston, MA 02111-1307, USA.  # - Suite 330, Boston, MA 02111-1307, USA.
18  #  #
19  # Copyright 2001-2002 Free Software Foundation  # Copyright 2001-2003 Free Software Foundation
20  #  #
21  # FILE:  # FILE:
22  # forms/wizards/AddDataSource.py  # forms/wizards/AddDataSource.py
# Line 71  class AddDataSourceWizard(FormTemplate): Line 71  class AddDataSourceWizard(FormTemplate):
71      if stepCode == '0':      if stepCode == '0':
72    
73        if self.__firstConnection:        if self.__firstConnection:
74          self.variables['connection'] == self.__firstConnection          self.variables['connection'] = self.__firstConnection
75    
76        return   { 'title': 'Add DataSource',        return   { 'title': 'Add DataSource',
77                   'content': (WizardText('To create your DataSource, I need to know some basic information.\n\n'                   'content': (WizardText('To create your DataSource, I need to know some basic information.\n\n'
# Line 136  class AddDataSourceWizard(FormTemplate): Line 136  class AddDataSourceWizard(FormTemplate):
136    
137      # Create new datasource      # Create new datasource
138      datasource = self.AddElement('datasource', self.form,      datasource = self.AddElement('datasource', self.form,
139          { 'name': self.variables['name'],          { 'name': self.GetUniqueName(self.variables['name']),
140            'database': self.variables['connection'],            'connection': self.variables['connection'],
141            'table': self.variables['table'] } )            'table': self.variables['table'] } )
142    
143    
# Line 151  class AddDataSourceWizard(FormTemplate): Line 151  class AddDataSourceWizard(FormTemplate):
151    #    #
152    def __getExistingDatasources(self):    def __getExistingDatasources(self):
153      self.__firstConnection = None      self.__firstConnection = None
154      for child in self.form._children:      for child in self.form.findChildrenOfType('GFDataSource'):
155        if child._type == 'GFDataSource' and hasattr(child,'table'):        if hasattr(child,'table'):
156          if not self.__firstConnection:          if not self.__firstConnection:
157            self.__firstConnection = child.database            self.__firstConnection = child.database
158            break            break
# Line 173  TemplateInformation = { Line 173  TemplateInformation = {
173      'Version' : VERSION,      'Version' : VERSION,
174      'Author' : 'The GNUe Designer Team',      'Author' : 'The GNUe Designer Team',
175      'Behavior': WIZARD,      'Behavior': WIZARD,
176      'Location' : 'Tools|Insert|Datasource'      'Location' : 'Edit|Insert|Datasource'
177  }  }
178    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.4.1

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