[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7027 - in trunk/gnue-designer/src: base templates/forms template
From: |
kilo |
Subject: |
[gnue] r7027 - in trunk/gnue-designer/src: base templates/forms templates/reports templates/schema |
Date: |
Tue, 15 Feb 2005 04:50:39 -0600 (CST) |
Author: kilo
Date: 2005-02-15 04:50:39 -0600 (Tue, 15 Feb 2005)
New Revision: 7027
Modified:
trunk/gnue-designer/src/base/Instance.py
trunk/gnue-designer/src/templates/forms/FormBuilder.py
trunk/gnue-designer/src/templates/forms/Simple.py
trunk/gnue-designer/src/templates/reports/Labels.py
trunk/gnue-designer/src/templates/reports/MailMerge.py
trunk/gnue-designer/src/templates/reports/SimpleReport.py
trunk/gnue-designer/src/templates/schema/Introspection.py
Log:
Write wizard's name to the generated file
if it was created by a wizard.
Modified: trunk/gnue-designer/src/base/Instance.py
===================================================================
--- trunk/gnue-designer/src/base/Instance.py 2005-02-15 09:14:05 UTC (rev
7026)
+++ trunk/gnue-designer/src/base/Instance.py 2005-02-15 10:50:39 UTC (rev
7027)
@@ -134,11 +134,11 @@
# Set up the Undo/Redo Manager
UndoManager(self)
+ self.wizardName = ""
+ self._isdirty = False
+ self._makeBackup = True
+ self._isNew = True
- self._isdirty = 0
- self._makeBackup = 1
- self._isNew = 1
-
self._app = app
self.connections = app.connections
self.nameMappings = {}
@@ -180,7 +180,7 @@
else:
if not os.access (location, os.R_OK):
- self.Show(1)
+ self.Show(True)
if wxMessageDialog(self,
_('The requested file does not exist.\n') +
_('Do you want to create this file?') +
@@ -193,7 +193,7 @@
self.makeDirty()
elif not os.access (location, os.W_OK):
- self.Show(1)
+ self.Show(True)
if wxMessageDialog(self, \
_('The requested file is Read Only.\n') +
_('To save any changes, you will \n') +
@@ -306,7 +306,7 @@
('Help', 'RequestAbout', _("&About GNUe Designer"), None, _("More
information about GNUe Designer"), 900),
):
self.menubar.addAction(location, text, event,
- grouping, canDisable=1,
+ grouping, canDisable=True,
icon=None, hotkey=hotkey, help=help)
# Add supported tools to File|New
@@ -393,7 +393,7 @@
def __createEmptyInstance(self, style):
self.rootObject = self.loadEmpty(style)
self.makeClean()
- self._isNew = 1
+ self._isNew = True
#
@@ -417,7 +417,7 @@
# Mark our form as "dirty" (unsaved changes)
def makeDirty(self):
if not self._isdirty:
- self._isdirty = 1
+ self._isdirty = True
if self._path == "":
self.SetTitle( TITLE + _(" - <New %s> *") % self.properties.nickname)
else:
@@ -570,10 +570,10 @@
fileHandle.write('<?xml version="1.0" encoding="%s"?>\n\n' % \
gConfig('textEncoding'))
- fileHandle.write('<!-- %s (%s)\n Saved on: %s -->\n\n' \
- % (TITLE, VERSION, \
- time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(time.time()))))
-
fileHandle.write(self.rootObject.dumpXML(treeDump=1).encode(gConfig('textEncoding')))
+ fileHandle.write('<!-- %s (%s)\n%s Saved on: %s -->\n\n' \
+ % (TITLE, VERSION, (len(self.wizardName) and (" Created by " +
self.wizardName + "\n") or ""),\
+ time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))))
+
fileHandle.write(self.rootObject.dumpXML(treeDump=True).encode(gConfig('textEncoding')))
fileHandle.close()
self._app.mru.addLocation(location)
@@ -704,7 +704,7 @@
self.wizardRunner(template, self)
self.menubar.addAction(location=location, text=translation,
event='Wizard:%s' % template['BaseID'],
- grouping=grouping, canDisable=1,
+ grouping=grouping, canDisable=True,
eventdata={'template':template},
help=template['Description'])
except ValueError:
continue
Modified: trunk/gnue-designer/src/templates/forms/FormBuilder.py
===================================================================
--- trunk/gnue-designer/src/templates/forms/FormBuilder.py 2005-02-15
09:14:05 UTC (rev 7026)
+++ trunk/gnue-designer/src/templates/forms/FormBuilder.py 2005-02-15
10:50:39 UTC (rev 7027)
@@ -352,6 +352,7 @@
# No more user input is allowed at this point.
#
def Finalize(self):
+ self.instance.wizardName = TemplateInformation['Name']
logic = self.current['logic']
layout = self.current['layout']
Modified: trunk/gnue-designer/src/templates/forms/Simple.py
===================================================================
--- trunk/gnue-designer/src/templates/forms/Simple.py 2005-02-15 09:14:05 UTC
(rev 7026)
+++ trunk/gnue-designer/src/templates/forms/Simple.py 2005-02-15 10:50:39 UTC
(rev 7027)
@@ -152,7 +152,8 @@
# No more user input is allowed at this point.
#
def Finalize(self):
-
+ self.instance.wizardName = TemplateInformation['Name']
+
# We will use the table name as the basis for all our
# object names. We will add a prefix based on the object
# type to the table name. Capitalize the first letter and
Modified: trunk/gnue-designer/src/templates/reports/Labels.py
===================================================================
--- trunk/gnue-designer/src/templates/reports/Labels.py 2005-02-15 09:14:05 UTC
(rev 7026)
+++ trunk/gnue-designer/src/templates/reports/Labels.py 2005-02-15 10:50:39 UTC
(rev 7027)
@@ -137,6 +137,7 @@
# No more user input is allowed at this point.
#
def Finalize(self):
+ self.instance.wizardName = TemplateInformation['Name']
# We will use the table name as the basis for all our
# object names. We will add a prefix based on the object
Modified: trunk/gnue-designer/src/templates/reports/MailMerge.py
===================================================================
--- trunk/gnue-designer/src/templates/reports/MailMerge.py 2005-02-15
09:14:05 UTC (rev 7026)
+++ trunk/gnue-designer/src/templates/reports/MailMerge.py 2005-02-15
10:50:39 UTC (rev 7027)
@@ -137,6 +137,7 @@
# No more user input is allowed at this point.
#
def Finalize(self):
+ self.instance.wizardName = TemplateInformation['Name']
# We will use the table name as the basis for all our
# object names. We will add a prefix based on the object
Modified: trunk/gnue-designer/src/templates/reports/SimpleReport.py
===================================================================
--- trunk/gnue-designer/src/templates/reports/SimpleReport.py 2005-02-15
09:14:05 UTC (rev 7026)
+++ trunk/gnue-designer/src/templates/reports/SimpleReport.py 2005-02-15
10:50:39 UTC (rev 7027)
@@ -141,6 +141,7 @@
# No more user input is allowed at this point.
#
def Finalize(self):
+ self.instance.wizardName = TemplateInformation['Name']
# We will use the table name as the basis for all our
# object names. We will add a prefix based on the object
Modified: trunk/gnue-designer/src/templates/schema/Introspection.py
===================================================================
--- trunk/gnue-designer/src/templates/schema/Introspection.py 2005-02-15
09:14:05 UTC (rev 7026)
+++ trunk/gnue-designer/src/templates/schema/Introspection.py 2005-02-15
10:50:39 UTC (rev 7027)
@@ -120,6 +120,7 @@
# No more user input is allowed at this point.
#
def Finalize(self):
+ self.instance.wizardName = TemplateInformation['Name']
# Set the basic attributes of the schema
self.ModifyElement(self.root, title=self.variables['title'])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7027 - in trunk/gnue-designer/src: base templates/forms templates/reports templates/schema,
kilo <=