[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/designer/src GFDesigner.py __init__.py for...
From: |
Jason Cater |
Subject: |
gnue/designer/src GFDesigner.py __init__.py for... |
Date: |
Fri, 11 Jan 2002 18:35:21 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/01/11 18:35:20
Modified files:
designer/src : GFDesigner.py __init__.py
designer/src/forms: __init__.py
designer/src/navigator: __init__.py
Log message:
more work to separation of Designer and Forms
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/GFDesigner.py.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/__init__.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/forms/__init__.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/src/navigator/__init__.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnue/designer/src/GFDesigner.py
diff -c gnue/designer/src/GFDesigner.py:1.27
gnue/designer/src/GFDesigner.py:1.28
*** gnue/designer/src/GFDesigner.py:1.27 Fri Jan 11 10:49:09 2002
--- gnue/designer/src/GFDesigner.py Fri Jan 11 18:35:20 2002
***************
*** 30,35 ****
--- 30,36 ----
from wxPython.wx import *
from gnue.common import GDebug, GConfig
from gnue.designer import VERSION, PACKAGE
+ from gnue.designer import SupportedTools
import TemplateParser, TemplateChooser, MRUManager
from gnue.common.GClientApp import GClientApp
***************
*** 52,57 ****
--- 53,59 ----
self._instances = []
GClientApp.__init__(self, application="forms")
self.getConnectionManager().setLoginHandler(UIwxpython.UILoginHandler())
+ self.loadToolInformation()
wxApp.__init__(self,0)
def run(self):
***************
*** 126,134 ****
def OnOpen(self, event):
dlg = wxFileDialog(NULL, "Open GNUe Forms...", defaultDir=os.getcwd(),
! wildcard = "GNUe Form Definitions (*.gfd)|*.gfd|"
+\
! "GNUe Form Libraries (*.gfl)|*.gfl|" +\
! "All Files (*.*)|*.*",
style=wxOPEN)
if dlg.ShowModal() == wxID_OK:
if self.isFileOpened(dlg.GetPath()):
--- 128,134 ----
def OnOpen(self, event):
dlg = wxFileDialog(NULL, "Open GNUe Forms...", defaultDir=os.getcwd(),
! wildcard = self.supportedOpenWildcard,
style=wxOPEN)
if dlg.ShowModal() == wxID_OK:
if self.isFileOpened(dlg.GetPath()):
***************
*** 176,181 ****
--- 176,222 ----
dlg.ShowModal()
dlg.Destroy()
+
+ def loadToolInformation(self):
+
+ self.supportedToolObjects = []
+ self.supportedOpenWildcard = ""
+
+
+ wildcard = ""
+ alltypes = []
+
+
+ # TODO: wxWindows currently doesn't consistently support multiple file
+ # 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 SupportedTools:
+ 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(),';*.')
)
+
+
+ for type in tool.properties.fileExtensions.keys():
+ wildcard += "%s (*.%s)|*.%s|" % \
+ ( tool.properties.fileExtensions[type], type, type)
+ alltypes.append(type)
+
+
+
+ ## self.supportedOpenWildcard = "All Supported Files (*.%s)|*.%s|" % \
+ ## ( string.join(alltypes,',*.'),
+ ## string.join(alltypes,';*.') ) \
+ ## + wildcard \
+ ## + "All Files (*.*)|*.*"
+ self.supportedOpenWildcard = string.join(alltypes,';*.') ) \
+ + wildcard \
+ + "All Files (*.*)|*.*"
#
Index: gnue/designer/src/__init__.py
diff -c gnue/designer/src/__init__.py:1.6 gnue/designer/src/__init__.py:1.7
*** gnue/designer/src/__init__.py:1.6 Fri Jan 11 02:35:55 2002
--- gnue/designer/src/__init__.py Fri Jan 11 18:35:20 2002
***************
*** 61,68 ****
SupportedTools = []
UnsupportedTools = []
! for tool in ('forms','reports','navigator'):
try:
SupportedTools.append(__import__(tool))
_GDebug.printMesg(1,'Loaded Designer support for %s' % tool)
--- 61,71 ----
SupportedTools = []
UnsupportedTools = []
+ Tools = ( 'forms',
+ # 'reports',
+ 'navigator' )
! for tool in Tools:
try:
SupportedTools.append(__import__(tool))
_GDebug.printMesg(1,'Loaded Designer support for %s' % tool)
Index: gnue/designer/src/forms/__init__.py
diff -c gnue/designer/src/forms/__init__.py:1.3
gnue/designer/src/forms/__init__.py:1.4
*** gnue/designer/src/forms/__init__.py:1.3 Fri Jan 11 10:49:09 2002
--- gnue/designer/src/forms/__init__.py Fri Jan 11 18:35:20 2002
***************
*** 29,37 ****
# the Instance class plus a properties object.
#
! from gnue.designer import Instance
! class FormToolProperties(Instance.ToolProperties):
application = 'GNUe Forms'
nickname = 'Form'
--- 29,37 ----
# the Instance class plus a properties object.
#
! from gnue.designer import Instance as _BaseInstance
! class FormToolProperties(_BaseInstance.ToolProperties):
application = 'GNUe Forms'
nickname = 'Form'
***************
*** 45,48 ****
properties = FormToolProperties()
! import Instance
\ No newline at end of file
--- 45,48 ----
properties = FormToolProperties()
! import Instance
Index: gnue/designer/src/navigator/__init__.py
diff -c gnue/designer/src/navigator/__init__.py:1.2
gnue/designer/src/navigator/__init__.py:1.3
*** gnue/designer/src/navigator/__init__.py:1.2 Fri Jan 11 02:35:55 2002
--- gnue/designer/src/navigator/__init__.py Fri Jan 11 18:35:20 2002
***************
*** 29,37 ****
# the Instance class plus a properties object.
#
- from Instance import Instance
! class NavigatorToolProperties(Instance.NavigatorProperties):
application = 'GNUe Navigator'
nickname = 'Navigation'
--- 29,38 ----
# the Instance class plus a properties object.
#
! from gnue.designer import Instance as _BaseInstance
!
! class NavigatorToolProperties(_BaseInstance.ToolProperties):
application = 'GNUe Navigator'
nickname = 'Navigation'
***************
*** 42,45 ****
defaultFileExtension = 'gpd'
! properties = NavigatorToolProperties()
\ No newline at end of file
--- 43,48 ----
defaultFileExtension = 'gpd'
! properties = NavigatorToolProperties()
!
! import Instance
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/designer/src GFDesigner.py __init__.py for...,
Jason Cater <=