[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnuef/src GFForm.py GFInstance.py GFParser...
From: |
Jason Cater |
Subject: |
gnue/gnuef/src GFForm.py GFInstance.py GFParser... |
Date: |
Tue, 03 Jul 2001 18:42:45 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 01/07/03 18:42:45
Modified files:
gnuef/src : GFForm.py GFInstance.py GFParser.py
UIwxpython.py
Log message:
Moved width, height, title from <option> tags to <form> tag as they are
required, not optional. Added 'converter' hack so any old-style forms will be
converted. If you open an old-style form in Designer and then save it, the new
file will be correct
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&tr1=1.108&tr2=1.109&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFInstance.py.diff?cvsroot=OldCVS&tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFParser.py.diff?cvsroot=OldCVS&tr1=1.44&tr2=1.45&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/UIwxpython.py.diff?cvsroot=OldCVS&tr1=1.103&tr2=1.104&r1=text&r2=text
Patches:
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.108 gnue/gnuef/src/GFForm.py:1.109
--- gnue/gnuef/src/GFForm.py:1.108 Fri Jun 29 17:59:05 2001
+++ gnue/gnuef/src/GFForm.py Tue Jul 3 18:42:45 2001
@@ -74,6 +74,30 @@
#self._textPercentage = 7.5
self._app = app
+ def buildObject(self):
+
+ # Convert some deprecated options to new style
+ i = 0
+ while i < len(self._children):
+ if isinstance(self._children[i], GFOptions):
+ j = 0
+ while j < len(self._children[i]._children):
+ if self._children[i]._children[j].name in \
+ ('title','width','height'):
+ self.__dict__[self._children[i]._children[j].name] = \
+ self._children[i]._children[j].value
+ self._children[i]._children.pop(j)
+ else:
+ j = j + 1
+ if not len (self._children[i]._children):
+ self._children.pop(i)
+ else:
+ i = i + 1
+ else:
+ i = i + 1
+
+
+
def initializeTree(self):
Index: gnue/gnuef/src/GFInstance.py
diff -u gnue/gnuef/src/GFInstance.py:1.14 gnue/gnuef/src/GFInstance.py:1.15
--- gnue/gnuef/src/GFInstance.py:1.14 Mon Jul 2 10:54:19 2001
+++ gnue/gnuef/src/GFInstance.py Tue Jul 3 18:42:45 2001
@@ -34,7 +34,7 @@
#
# Copyright (c) 2000 Free Software Foundation
#
-# $Id: GFInstance.py,v 1.14 2001/07/02 17:54:19 jcater Exp $
+# $Id: GFInstance.py,v 1.15 2001/07/04 01:42:45 jcater Exp $
#
import pstats
@@ -275,7 +275,7 @@
def executeAbout(self,event):
global VERSION
version = VERSION;
- name = self._form.getOption('title') or "Unknown"
+ name = self._form.title or "Unknown"
formversion = self._form.getOption('version') or "Unknown"
author = self._form.getOption('author') or "Unknown"
description = self._form.getOption('description') or "Unknown"
Index: gnue/gnuef/src/GFParser.py
diff -u gnue/gnuef/src/GFParser.py:1.44 gnue/gnuef/src/GFParser.py:1.45
--- gnue/gnuef/src/GFParser.py:1.44 Tue Jul 3 17:54:41 2001
+++ gnue/gnuef/src/GFParser.py Tue Jul 3 18:42:45 2001
@@ -90,7 +90,8 @@
'SingleInstance': 1,
'Attributes': {
'title': {
- 'Typecast': char },
+ 'Typecast': char,
+ 'Default': 'Untitled Form' },
'readonly': {
'Typecast': bool,
'Default': 0 },
@@ -101,7 +102,13 @@
'right': {},
'bottom': {},
'top': {} },
- 'Default': "" } },
+ 'Default': "" },
+ 'width': {
+ 'Typecast': int,
+ 'Default': 40 },
+ 'height': {
+ 'Typecast': int,
+ 'Default': 12 } },
'ParentTags': None },
'import': {
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.103 gnue/gnuef/src/UIwxpython.py:1.104
--- gnue/gnuef/src/UIwxpython.py:1.103 Fri Jun 29 22:03:07 2001
+++ gnue/gnuef/src/UIwxpython.py Tue Jul 3 18:42:45 2001
@@ -298,12 +298,12 @@
def activateForm(self, form):
- width = int(self._form.getOption('width'))
- height = int(self._form.getOption('height'))
+ width = int(self._form.width)
+ height = int(self._form.height)
self.mainWindow.SetSize(wxSize(width*int(self.widgetWidth),
int(height+self.menu_sb_space)*int(self.widgetHeight)))
- self.mainWindow.SetTitle(str(self._form.getOption('title')))
+ self.mainWindow.SetTitle(str(self._form.title))
self.mainWindow.panel = self._pageList[0]
self.mainWindow.panel.SetSize(wxSize(width*int(self.widgetWidth),
int(height+self.menu_sb_space)*int(self.widgetHeight)))
@@ -398,8 +398,8 @@
if not _NOTEBOOK:
self.visiblePage.Show(FALSE)
self.visiblePage = self._formToUI[event.data][0][index]
-
self.visiblePage.SetSize(wxSize(int(self._form.getOption('width'))*int(self.widgetWidth),
-
int(int(self._form.getOption('height'))+self.menu_sb_space)*int(self.widgetHeight)))
+
self.visiblePage.SetSize(wxSize(int(self._form.width)*int(self.widgetWidth),
+
int(int(self._form.height)+self.menu_sb_space)*int(self.widgetHeight)))
# self.Fit() # Trial run
else:
self.visiblePage = self._formToUI[event.data][0][index]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnuef/src GFForm.py GFInstance.py GFParser...,
Jason Cater <=