commit-gnue
[Top][All Lists]
Advanced

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

gnue/designer/src Designer.py


From: Jason Cater
Subject: gnue/designer/src Designer.py
Date: Fri, 13 Jun 2003 13:13:33 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Branch:         
Changes by:     Jason Cater <address@hidden>    03/06/13 13:13:33

Modified files:
        designer/src   : Designer.py 

Log message:
        more name clarifications between 'module' and 'tool'

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/Designer.py.diff?tr1=1.71&tr2=1.72&r1=text&r2=text

Patches:
Index: gnue/designer/src/Designer.py
diff -c gnue/designer/src/Designer.py:1.71 gnue/designer/src/Designer.py:1.72
*** gnue/designer/src/Designer.py:1.71  Fri Jun 13 12:39:22 2003
--- gnue/designer/src/Designer.py       Fri Jun 13 13:13:33 2003
***************
*** 96,102 ****
      self.configurationManager.registerAlias('gConfigReports', 'reports')
  
      self.getConnectionManager().setLoginHandler(UILoginHandler())
!     self.loadToolInformation()
      wxApp.__init__(self,0)
  
    def run(self):
--- 96,102 ----
      self.configurationManager.registerAlias('gConfigReports', 'reports')
  
      self.getConnectionManager().setLoginHandler(UILoginHandler())
!     self.loadModuleInformation()
      wxApp.__init__(self,0)
  
    def run(self):
***************
*** 262,272 ****
  
  
  
!   def loadToolInformation(self):
  
!     self.supportedToolObjects = []
      self.supportedOpenWildcard = ""
!     self.toolExtensionMapping = {}
  
  
      wildcard = ""
--- 262,272 ----
  
  
  
!   def loadModuleInformation(self):
  
!     self.supportedModuleObjects = []
      self.supportedOpenWildcard = ""
!     self.moduleExtensionMapping = {}
  
  
      wildcard = ""
***************
*** 277,309 ****
      # TODO: extension wildcards (e.g., "All GNUe Form Files (*.gfd,*.gfl)").
      # TODO: However, the code is left commented out in case some day it does.
  
!     for tool in SupportedModules:
!       self.supportedToolObjects.append((tool.properties.nickname, tool))
  
  
!     ##  if len(tool.properties.fileExtensions.keys()) > 1:
      ##
      ##    wildcard += "%s Files (*.%s)|*.%s|" % \
!     ##             ( tool.properties.application,
!     ##               string.join(tool.properties.fileExtensions.keys(),',*.'),
!     ##               string.join(tool.properties.fileExtensions.keys(),';*.') 
)
  
  
!       # Make the "default" file extension for a tool
        # appear before the other extensions.
        wildcard += "%s (*.%s)|*.%s|" % \
!        ( tool.properties.fileExtensions[tool.properties.defaultFileExtension],
!          tool.properties.defaultFileExtension,
!          tool.properties.defaultFileExtension)
  
!       for type in tool.properties.fileExtensions.keys():
!         if type != tool.properties.defaultFileExtension:
            wildcard += "%s (*.%s)|*.%s|" % \
!              ( tool.properties.fileExtensions[type], type, type)
          alltypes.append(type)
  
          # Keep a dict of Extension::Handler mappings
!         self.toolExtensionMapping[type] = tool.properties.module
  
  
  
--- 277,309 ----
      # TODO: extension wildcards (e.g., "All GNUe Form Files (*.gfd,*.gfl)").
      # TODO: However, the code is left commented out in case some day it does.
  
!     for module in SupportedModules:
!       self.supportedModuleObjects.append((module.properties.nickname, module))
  
  
!     ##  if len(module.properties.fileExtensions.keys()) > 1:
      ##
      ##    wildcard += "%s Files (*.%s)|*.%s|" % \
!     ##             ( module.properties.application,
!     ##               
string.join(module.properties.fileExtensions.keys(),',*.'),
!     ##               
string.join(module.properties.fileExtensions.keys(),';*.') )
  
  
!       # Make the "default" file extension for a module
        # appear before the other extensions.
        wildcard += "%s (*.%s)|*.%s|" % \
!        ( 
module.properties.fileExtensions[module.properties.defaultFileExtension],
!          module.properties.defaultFileExtension,
!          module.properties.defaultFileExtension)
  
!       for type in module.properties.fileExtensions.keys():
!         if type != module.properties.defaultFileExtension:
            wildcard += "%s (*.%s)|*.%s|" % \
!              ( module.properties.fileExtensions[type], type, type)
          alltypes.append(type)
  
          # Keep a dict of Extension::Handler mappings
!         self.moduleExtensionMapping[type] = module.properties.module
  
  
  
***************
*** 323,329 ****
  
      extension = string.lower(os.path.splitext(file)[1][1:])
  
!     if not self.toolExtensionMapping.has_key(extension):
  
        # TODO: This should try to figure out what kind of file this is.
        # TODO: We maintain a list of opening xml elements in the
--- 323,329 ----
  
      extension = string.lower(os.path.splitext(file)[1][1:])
  
!     if not self.moduleExtensionMapping.has_key(extension):
  
        # TODO: This should try to figure out what kind of file this is.
        # TODO: We maintain a list of opening xml elements in the
***************
*** 333,339 ****
        print "I do not know what to do with a .%s file!" % extension
        return None
  
!     return self.newInstance(self.toolExtensionMapping[extension], file)
  
  
    def OnNew(self, event):
--- 333,339 ----
        print "I do not know what to do with a .%s file!" % extension
        return None
  
!     return self.newInstance(self.moduleExtensionMapping[extension], file)
  
  
    def OnNew(self, event):




reply via email to

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