[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/gnuef TODO doc/techref.lyx src/GFForm.py s...
From: |
James Thompson |
Subject: |
gnue/gnuef TODO doc/techref.lyx src/GFForm.py s... |
Date: |
Mon, 16 Jul 2001 20:09:41 -0700 |
CVSROOT: /cvs
Module name: gnue
Changes by: James Thompson <address@hidden> 01/07/16 20:09:41
Modified files:
gnuef : TODO
gnuef/doc : techref.lyx
gnuef/src : GFForm.py GFInstance.py GFParser.py
UIwxpython.py
gnuef/src/GFObjects: GFBlock.py GFEntry.py GFLabel.py
Log message:
Added jump to record number support.
Added rows and rowSpacer atrribs to <label> and <entry>
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/TODO.diff?cvsroot=OldCVS&tr1=1.56&tr2=1.57&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/doc/techref.lyx.diff?cvsroot=OldCVS&tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFForm.py.diff?cvsroot=OldCVS&tr1=1.112&tr2=1.113&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFInstance.py.diff?cvsroot=OldCVS&tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFParser.py.diff?cvsroot=OldCVS&tr1=1.47&tr2=1.48&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/UIwxpython.py.diff?cvsroot=OldCVS&tr1=1.104&tr2=1.105&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFBlock.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFEntry.py.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFLabel.py.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: gnue/gnuef/TODO
diff -u gnue/gnuef/TODO:1.56 gnue/gnuef/TODO:1.57
--- gnue/gnuef/TODO:1.56 Thu Jul 12 08:52:48 2001
+++ gnue/gnuef/TODO Mon Jul 16 20:09:41 2001
@@ -84,7 +84,6 @@
Features
- Goto record shortcut
Input masks
Mirrored Fields
Index: gnue/gnuef/doc/techref.lyx
diff -u gnue/gnuef/doc/techref.lyx:1.8 gnue/gnuef/doc/techref.lyx:1.9
--- gnue/gnuef/doc/techref.lyx:1.8 Wed Jul 11 21:58:49 2001
+++ gnue/gnuef/doc/techref.lyx Mon Jul 16 20:09:41 2001
@@ -2068,7 +2068,7 @@
\begin_inset Tabular
-<lyxtabular version="2" rows="6" columns="4">
+<lyxtabular version="2" rows="8" columns="4">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0"
endfoot="0" endlastfoot="0">
<column alignment="center" valignment="top" leftline="true" rightline="false"
width="" special="">
<column alignment="center" valignment="top" leftline="true" rightline="false"
width="" special="">
@@ -2289,7 +2289,7 @@
\end_inset
</cell>
</row>
-<row topline="true" bottomline="true" newpage="false">
+<row topline="true" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
\begin_inset Text
@@ -2333,6 +2333,75 @@
\end_inset
</cell>
</row>
+<row topline="true" bottomline="false" newpage="false">
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+rows
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+int
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+1
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+Overrides the rows setting defined at the block level.
+ The replacement for the old visibleCount attribute.
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true" newpage="false">
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+rowSpacer
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+int
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+1
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+Overriders the rowSpace setting defined at the block level.
+\end_inset
+</cell>
+</row>
</lyxtabular>
\end_inset
@@ -2354,7 +2423,7 @@
\begin_inset Tabular
-<lyxtabular version="2" rows="19" columns="4">
+<lyxtabular version="2" rows="21" columns="4">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0"
endfoot="0" endlastfoot="0">
<column alignment="center" valignment="top" leftline="true" rightline="false"
width="" special="">
<column alignment="center" valignment="top" leftline="true" rightline="false"
width="" special="">
@@ -2906,9 +2975,81 @@
\layout Standard
+\series bold
\lang english
-The number of entry widgets displayed at one time in a verticle column.
+Deprecated
+\series default
+ - The number of entry widgets displayed at one time in a verticle column.
Simulates a very crude grid entry system.
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="false" newpage="false">
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+rows
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+int
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+1
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+Overrides the rows setting defined at the block level.
+ The replacement for the old visibleCount attribute.
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="false" newpage="false">
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+rowSpacer
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+int
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="false" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+1
+\end_inset
+</cell>
+<cell multicolumn="0" alignment="center" valignment="top" topline="true"
bottomline="false" leftline="true" rightline="true" rotate="false"
usebox="none" width="" special="">
+\begin_inset Text
+
+\layout Standard
+
+Overriders the rowSpace setting defined at the block level.
\end_inset
</cell>
</row>
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/GFInstance.py
diff -u gnue/gnuef/src/GFInstance.py:1.17 gnue/gnuef/src/GFInstance.py:1.18
--- gnue/gnuef/src/GFInstance.py:1.17 Thu Jul 12 20:56:13 2001
+++ gnue/gnuef/src/GFInstance.py Mon Jul 16 20:09:41 2001
@@ -34,7 +34,7 @@
#
# Copyright (c) 2000 Free Software Foundation
#
-# $Id: GFInstance.py,v 1.17 2001/07/13 03:56:13 jcater Exp $
+# $Id: GFInstance.py,v 1.18 2001/07/17 03:09:41 jamest Exp $
#
import pstats
@@ -72,7 +72,7 @@
'requestPREVBLOCK' : self.previousBlock,
'requestPREVRECORD' : self.prevRecord,
'requestNEXTRECORD' : self.nextRecord,
- 'requestJUMPRECORD' : self.jumpRecords,
+ 'requestRECORDNUMBER' : self.jumpRecords,
'requestPAGE' : self.gotoPage,
'requestKEYPRESS' : self.keyPress,
@@ -225,12 +225,18 @@
# form move an arbitrary number of records
#
def jumpRecords(self,event):
- count = event.data
- for jumps in range(abs(count)):
- if count > 0:
- self._form.nextRecord()
- if count < 0:
- self._form.prevRecord()
+ try:
+ count = abs(int(event.data))-1
+ except ValueError:
+ message = "Invalid numeric value entered."
+ else:
+ message = self._form.jumpRecord(count)
+
+ if message:
+ messageBox = GFMsgBox(self,message)
+ messageBox.show()
+ return
+
self.dispatchEvent(GFEvent('gotoENTRY',{'object':self._form._currentEntry}))
self.updateRecordCounter()
self.updateRecordStatus()
Index: gnue/gnuef/src/GFObjects/GFBlock.py
diff -u gnue/gnuef/src/GFObjects/GFBlock.py:1.4
gnue/gnuef/src/GFObjects/GFBlock.py:1.5
--- gnue/gnuef/src/GFObjects/GFBlock.py:1.4 Wed Jul 11 16:06:46 2001
+++ gnue/gnuef/src/GFObjects/GFBlock.py Mon Jul 16 20:09:41 2001
@@ -158,6 +158,13 @@
self._currentRecord = self._recordCount
self.switchRecord(-1)
+ def jumpRecord(self, recordNumber):
+ if recordNumber > self._recordCount:
+ recordNumber = self._recordCount
+ jump = recordNumber - self._currentRecord
+ self._currentRecord = recordNumber
+ self.switchRecord(jump)
+
#
# processCommit
Index: gnue/gnuef/src/GFObjects/GFEntry.py
diff -u gnue/gnuef/src/GFObjects/GFEntry.py:1.4
gnue/gnuef/src/GFObjects/GFEntry.py:1.5
--- gnue/gnuef/src/GFObjects/GFEntry.py:1.4 Thu Jul 12 11:38:19 2001
+++ gnue/gnuef/src/GFObjects/GFEntry.py Mon Jul 16 20:09:41 2001
@@ -100,11 +100,18 @@
self.datasource = self._block._form._datasourceDictionary[datasourceName]
#if not hasattr(self,'visibleCount'):
- if hasattr(self._block,'rows'):
- self.visibleCount = self._block.rows
- if hasattr(self._block,'rowSpacer'):
- self.gap = self._block.rowSpacer
-
+ if not hasattr(self,'rows'):
+ if hasattr(self._block,'rows'):
+ self.visibleCount = self._block.rows
+ else:
+ self.visibleCount = self.rows
+
+ if not hasattr(self,'rowSpacer'):
+ if hasattr(self._block,'rowSpacer'):
+ self.gap = self._block.rowSpacer
+ else:
+ self.gap = self.rowSpacer
+
#following check does not work if move it to GFEntry.__init__ (ra3vat)
if hasattr(self, 'style'):
if self.style=='checkbox':
Index: gnue/gnuef/src/GFObjects/GFLabel.py
diff -u gnue/gnuef/src/GFObjects/GFLabel.py:1.1
gnue/gnuef/src/GFObjects/GFLabel.py:1.2
--- gnue/gnuef/src/GFObjects/GFLabel.py:1.1 Fri Jun 29 15:55:58 2001
+++ gnue/gnuef/src/GFObjects/GFLabel.py Mon Jul 16 20:09:41 2001
@@ -64,11 +64,17 @@
def initialize(self):
self._block = self.findParentOfType('GFBlock')
if not hasattr(self,'visibleCount'):
- if hasattr(self._block,'rows'):
- self.visibleCount = self._block.rows
- if hasattr(self._block,'rowSpacer'):
- self.gap = self._block.rowSpacer
+ if not hasattr(self,'rows'):
+ if hasattr(self._block,'rows'):
+ self.visibleCount = self._block.rows
+ else:
+ self.visibleCount = self.rows
+ if not hasattr(self,'rowSpacer'):
+ if hasattr(self._block,'rowSpacer'):
+ self.gap = self._block.rowSpacer
+ else:
+ self.gap = self.rowSpacer
Index: gnue/gnuef/src/GFParser.py
diff -u gnue/gnuef/src/GFParser.py:1.47 gnue/gnuef/src/GFParser.py:1.48
--- gnue/gnuef/src/GFParser.py:1.47 Thu Jul 12 11:38:19 2001
+++ gnue/gnuef/src/GFParser.py Mon Jul 16 20:09:41 2001
@@ -205,7 +205,12 @@
'center': {} },
'Default': "left"},
'width': {
- 'Typecast': GTypecast.whole },
+ 'Typecast': GTypecast.whole },
+ 'rows': {
+ 'Typecast': GTypecast.whole,
+ 'Default': 1},
+ 'rowSpacer': {
+ 'Typecast': GTypecast.whole },
'x': {
'Required': 1,
'Typecast': GTypecast.whole },
@@ -234,8 +239,12 @@
'Typecast': GTypecast.whole },
'visibleCount':{
'Typecast': GTypecast.whole,
- 'Deprecated': 'Use the block "row" attribute instead.',
+ 'Deprecated': 'Use the block "rows" attribute instead.',
'Default': 1 },
+ 'rows': {
+ 'Typecast': GTypecast.whole},
+ 'rowSpacer': {
+ 'Typecast': GTypecast.whole },
'readonly': {
'Typecast': GTypecast.boolean,
'Default': 0 },
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.104 gnue/gnuef/src/UIwxpython.py:1.105
--- gnue/gnuef/src/UIwxpython.py:1.104 Tue Jul 3 18:42:45 2001
+++ gnue/gnuef/src/UIwxpython.py Mon Jul 16 20:09:41 2001
@@ -42,8 +42,6 @@
_NOTEBOOK = None
_LOOPTRAP = 0
-
-
#
# Little global helper routine to set font according to options
#
@@ -226,6 +224,8 @@
EVT_MENU(self, 201, lambda event, l=self:
l.dispatchEvent(GFEvent('requestNEXTRECORD')))
dataMenu.Append( 202, "Previous Record
(Down)",GConfig.get('msg_previous'))
EVT_MENU(self, 202, lambda event, l=self:
l.dispatchEvent(GFEvent('requestPREVRECORD')))
+ dataMenu.Append( 209, "Jump to Record... (F2)",GConfig.get('msg_jump'))
+ EVT_MENU(self, 209, self.promptForRecordNumber)
dataMenu.Append( 203, "New Record
(F12)",GConfig.get('msg_insert'))
EVT_MENU(self, 203, lambda event, l=self:
l.dispatchEvent(GFEvent('requestNEWRECORD')))
dataMenu.Append( 204, "Delete Record
(F5)",GConfig.get('msg_delete'))
@@ -438,6 +438,19 @@
self.mainWindow.Close()
#
+ # promptForRecordNumber
+ #
+ # Presents a dialog to user asking for the record number to jump to
+ #
+ def promptForRecordNumber(self, event= None):
+ dlg = wxTextEntryDialog(self.mainWindow, 'Enter record number to jump to',
+ 'Which record?')
+ if dlg.ShowModal() == wxID_OK:
+ self.dispatchEvent(GFEvent('requestRECORDNUMBER', dlg.GetValue()))
+ dlg.Destroy()
+
+
+ #
# closeTrap
#
# intercepts the applications closure and generates an event to the form
requesting
@@ -480,6 +493,9 @@
elif (1728 <= event.KeyCode() <= 1791):
offset = 1536
action = GFEvent('requestKEYPRESS',chr(event.KeyCode()-offset))
+ elif event.KeyCode() == WXK_F2:
+ self.promptForRecordNumber()
+
#
# Mouse Events
@@ -1007,6 +1023,7 @@
class UIMessageBox(wxMessageDialog, UIHelper):
def __init__(self, interface, message, caption):
wxMessageDialog.__init__(self, interface, message, caption,
style=wxOK|wxICON_EXCLAMATION)
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/gnuef TODO doc/techref.lyx src/GFForm.py s...,
James Thompson <=