[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnuef/src GFForm.py UIbase.py UIwxpython.p...
From: |
Jason Cater |
Subject: |
gnue/gnuef/src GFForm.py UIbase.py UIwxpython.p... |
Date: |
Fri, 03 Aug 2001 16:04:02 -0700 |
CVSROOT: /home/cvs
Module name: gnue
Branch: gnuef-new-datasources
Changes by: Jason Cater <address@hidden> 01/08/03 16:04:01
Modified files:
gnuef/src : GFForm.py UIbase.py UIwxpython.py
gnuef/src/GFObjects: GFEntry.py
Log message:
Added comments/TODOs to code; added a beginWAIT and endWAIT event pair
to signal to UI when forms is going into a 'working' state (i.e., user cannot
interact with ui). wxpython interface might change the cursor to hourglass
(should it display 'Working...' or such in the status bar?) curses, if it has
the concept of a status bar, would probably display 'Working...'
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.110.2.16&tr2=1.110.2.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/UIbase.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.40.2.6&tr2=1.40.2.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/UIwxpython.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.104.2.14&tr2=1.104.2.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFEntry.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.2.2.16&tr2=1.2.2.17&r1=text&r2=text
Patches:
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.112 gnue/gnuef/src/GFForm.py:1.113
--- gnue/gnuef/src/GFForm.py:1.112 Thu Jul 12 20:56:13 2001
+++ gnue/gnuef/src/GFForm.py Mon Jul 16 20:09:41 2001
@@ -783,6 +783,16 @@
return message
self._currentBlock.nextRecord()
+ def jumpRecord(self,count):
+ for block in self._blockList:
+ if hasattr(block,'master'):
+ masterBlock,masterField = string.split(block.master,'.')
+ if masterBlock == self._currentBlock.name:
+ if not block.isSaved():
+ message = GConfig.get('_msgNOTSAVED')
+ return message
+ self._currentBlock.jumpRecord(count)
+
def toggleInsertMode(self):
self._insertMode = not self._insertMode
Index: gnue/gnuef/src/GFObjects/GFEntry.py
diff -u gnue/gnuef/src/GFObjects/GFEntry.py:1.6
gnue/gnuef/src/GFObjects/GFEntry.py:1.7
--- gnue/gnuef/src/GFObjects/GFEntry.py:1.6 Wed Jul 18 15:45:01 2001
+++ gnue/gnuef/src/GFObjects/GFEntry.py Tue Jul 31 16:22:30 2001
@@ -53,15 +53,18 @@
self._uppercase = 0
self._lowercase = 0
self._numeric = 0
+ self._rows = 1
self.typecast="text"
self.case="mixed"
def buildObject(self):
+
# Convert deprecated attributes
if hasattr(self,'numeric') and self.numeric:
del self.numeric
self.typecast = 'number'
+
if hasattr(self,'uppercase') and self.uppercase:
del self.uppercase
self.case = 'upper'
@@ -69,6 +72,11 @@
del self.lowercase
self.case = 'lower'
+ if not hasattr(self, 'rows') and hasattr(self,'visibleCount'):
+ self.rows = self.visibleCount
+ del self.visibleCount
+
+
def initialize(self):
@@ -91,12 +99,11 @@
datasourceName,self.fieldName = string.split(self.foreign_key,'.')
self.datasource = self._block._form._datasourceDictionary[datasourceName]
- #if not hasattr(self,'visibleCount'):
if not hasattr(self,'rows'):
if hasattr(self._block,'rows'):
- self.visibleCount = self._block.rows
+ self._rows = self._block.rows
else:
- self.visibleCount = self.rows
+ self._rows = self.rows
if not hasattr(self,'rowSpacer'):
if hasattr(self._block,'rowSpacer'):
Index: gnue/gnuef/src/UIbase.py
diff -u gnue/gnuef/src/UIbase.py:1.41 gnue/gnuef/src/UIbase.py:1.42
--- gnue/gnuef/src/UIbase.py:1.41 Sat Jul 21 16:33:49 2001
+++ gnue/gnuef/src/UIbase.py Tue Jul 31 16:22:30 2001
@@ -321,7 +321,7 @@
# you do not want to just add 1 to count
# as the formulas would then be off
count = index
- while count < int(event.data.rows):
+ while count < int(event.data._rows):
if count != index:
if currentRecord+(count-index) > block._recordCount:
if style == 'checkbox':
@@ -352,11 +352,10 @@
class UIWidget:
def __init__(self, object, container, textWidth, textHeight, widgetWidth,
widgetHeight, interface, initialize=1):
self.widgets = []
-
- if not hasattr(object,'rows'):
- object.rows = 1
+ if not hasattr(object,'_rows'):
+ object._rows = 1
else:
- object.rows = int(object.rows)
+ object._rows = int(object._rows)
if hasattr(object,'gap'):
object.gap = int(object.gap)
@@ -371,7 +370,7 @@
self.itemHeight = -1
if not object.hidden:
- for spacer in range(int(object.rows)):
+ for spacer in range(int(object._rows)):
newWidget = self.createWidget(object, container, textWidth,
textHeight, widgetWidth, widgetHeight, interface, spacer, initialize)
self.widgets.append(newWidget)
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.105 gnue/gnuef/src/UIwxpython.py:1.106
--- gnue/gnuef/src/UIwxpython.py:1.105 Mon Jul 16 20:09:41 2001
+++ gnue/gnuef/src/UIwxpython.py Thu Aug 2 20:02:28 2001
@@ -216,6 +216,9 @@
fileMenu.Append( 102, "Rollback (F11)",GConfig.get('msg_rollback'))
EVT_MENU(self, 102, lambda event, l=self:
l.dispatchEvent(GFEvent('requestROLLBACK')))
fileMenu.AppendSeparator()
+ fileMenu.Append( 104, "&Print",GConfig.get('msg_print'))
+ EVT_MENU(self, 104, lambda event, l=self:
l.dispatchEvent(GFEvent('requestPRINTOUT')))
+ fileMenu.AppendSeparator()
fileMenu.Append( 101, "E&xit",GConfig.get('msg_exit'))
EVT_MENU(self, 101, self.menuExitEvent)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnuef/src GFForm.py UIbase.py UIwxpython.p...,
Jason Cater <=