[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue gnue-common/src/GDataObjects.py gnuef/src/...
From: |
James Thompson |
Subject: |
gnue gnue-common/src/GDataObjects.py gnuef/src/... |
Date: |
Fri, 20 Jul 2001 12:14:38 -0700 |
CVSROOT: /cvs
Module name: gnue
Branch: gnuef-new-datasources
Changes by: James Thompson <address@hidden> 01/07/20 12:14:38
Modified files:
gnue-common/src: GDataObjects.py
gnuef/src : GFForm.py UIwxpython.py
gnuef/src/GFObjects: GFBlock.py GFEntry.py
Log message:
Syncing again
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/GDataObjects.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.7.2.7&tr2=1.7.2.8&r1=text&r2=text
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.11&tr2=1.110.2.12&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.8&tr2=1.104.2.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnuef/src/GFObjects/GFBlock.py.diff?cvsroot=OldCVS&only_with_tag=gnuef-new-datasources&tr1=1.4.2.10&tr2=1.4.2.11&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.7&tr2=1.2.2.8&r1=text&r2=text
Patches:
Index: gnue/gnue-common/src/GDataObjects.py
diff -u gnue/gnue-common/src/GDataObjects.py:1.6
gnue/gnue-common/src/GDataObjects.py:1.7
--- gnue/gnue-common/src/GDataObjects.py:1.6 Tue May 29 19:54:11 2001
+++ gnue/gnue-common/src/GDataObjects.py Tue Jun 5 08:57:45 2001
@@ -127,8 +127,8 @@
criteria = {}
for i in range(0, len(self._masterfields)):
GDebug.printMesg(10,"Adding criteria")
- criteria[string.trim(self._detailfields[i])] = \
- master.current.getField(string.trim(self._masterfields[i]))
+ criteria[string.strip(self._detailfields[i])] = \
+ master.current.getField(string.strip(self._masterfields[i]))
GDebug.printMesg(10,master.current.getField(self._masterfields[i]))
return self.createResultSet(criteria)
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/GFBlock.py
diff -u gnue/gnuef/src/GFObjects/GFBlock.py:1.5
gnue/gnuef/src/GFObjects/GFBlock.py:1.6
--- gnue/gnuef/src/GFObjects/GFBlock.py:1.5 Mon Jul 16 20:09:41 2001
+++ gnue/gnuef/src/GFObjects/GFBlock.py Wed Jul 18 15:45:01 2001
@@ -31,8 +31,7 @@
# Copyright (c) 2000 Free Software Foundation
#
-from gnue.common.GObjects import *
-from gnue.common.dbdrivers.factory import factory
+#from gnue.common.GObjects import *
from gnue.forms.GFEvent import *
from gnue.forms.GFObjects.GFDataSource import GFDataSource
@@ -41,7 +40,6 @@
from GFObj import GFObj
import string
-import types
# These should really go somewhere else
TRUE = 1
Index: gnue/gnuef/src/GFObjects/GFEntry.py
diff -u gnue/gnuef/src/GFObjects/GFEntry.py:1.5
gnue/gnuef/src/GFObjects/GFEntry.py:1.6
--- gnue/gnuef/src/GFObjects/GFEntry.py:1.5 Mon Jul 16 20:09:41 2001
+++ gnue/gnuef/src/GFObjects/GFEntry.py Wed Jul 18 15:45:01 2001
@@ -31,18 +31,10 @@
# Copyright (c) 2000 Free Software Foundation
#
-from gnue.common.GObjects import *
-from gnue.common.dbdrivers.factory import factory
-
from gnue.common import GDebug
from gnue.common import GConfig
from GFValue import GFValue
import string
-import types
-
-# These should really go somewhere else
-TRUE = 1
-FALSE = 0
############################################################
# GFEntry
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)
+