commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/gnuef TODO samples/zipcode/states.gfd src/...


From: James Thompson
Subject: gnue/gnuef TODO samples/zipcode/states.gfd src/...
Date: Sat, 13 Jan 2001 15:24:31 -0800

CVSROOT:        /cvs
Module name:    gnue
Changes by:     James Thompson <address@hidden> 01/01/13 15:24:30

Modified files:
        gnuef          : TODO 
        gnuef/samples/zipcode: states.gfd 
        gnuef/src      : GFForm.py GFObjects.py GFOptions.py 
                         UIwxpython.py 

Log message:
        Fixed system to properly pick up modifications immediately instead of at
        record switch.
        Fixed bug in record status checking during exit
        Altered UIwxpython status bar to maximize screen space available for 
tips
        wx tooltips not supported via wxpython yet
        Fixed up UIwxpythons <box> support
        Altered Datasources to correctly reset on empty queries
        Clean up here and there

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/TODO.diff?r1=1.36&r2=1.37
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/samples/zipcode/states.gfd.diff?r1=1.7&r2=1.8
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFForm.py.diff?r1=1.58&r2=1.59
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFObjects.py.diff?r1=1.51&r2=1.52
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFOptions.py.diff?r1=1.14&r2=1.15
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/UIwxpython.py.diff?r1=1.52&r2=1.53

Patches:
Index: gnue/gnuef/TODO
diff -u gnue/gnuef/TODO:1.36 gnue/gnuef/TODO:1.37
--- gnue/gnuef/TODO:1.36        Thu Jan 11 22:08:47 2001
+++ gnue/gnuef/TODO     Sat Jan 13 15:24:30 2001
@@ -7,7 +7,6 @@
 **  windows support (ODBC?) [jade]
 
 **Like to haves for 0.1.0
-**  add GFBox support to UIwxpython
 **  Add support for more win/gtk like focus system
       pgup/pgdown effect page not block
 
@@ -17,10 +16,6 @@
     provide better seperation of Objects in the Data system
     restore proper encapsulation in system
 
-  update status only on record switch induced bug: [jamest]
-    status bar record status not updating as soon as I'd like
-    it's possible to exit/query w/o saving current record
-
   Speed, speed, speed (it's pretty bad now w/ complex forms)
     status bar speed is slow
 
@@ -81,17 +76,7 @@
   Nitpicks & bugs
     Dropdowns don't allow you to go to next|prev record via up and down arrows
     
-    Inital detail not kept up to date with top record
-      (needs to update upon field update not record switch) 
-
-    might not work on display's other than :0 (need to test)
-
-    Tooltips dont show on smaller forms.  Status bar perhaps needs 
-      less containers.  Also, eventually tool tips should display 
-      if you mouse over the field.
-
     samples/geas/ needs table creation scripts or needs to instruct to
       build the tables from geas samples to work properly.
 
     Add checkbox, button and memo box widgets.
-   
Index: gnue/gnuef/samples/zipcode/states.gfd
diff -u gnue/gnuef/samples/zipcode/states.gfd:1.7 
gnue/gnuef/samples/zipcode/states.gfd:1.8
--- gnue/gnuef/samples/zipcode/states.gfd:1.7   Fri Dec 22 15:14:43 2000
+++ gnue/gnuef/samples/zipcode/states.gfd       Sat Jan 13 15:24:30 2001
@@ -5,7 +5,7 @@
     <title>Master/Detail Demo</title>
     <version>0.0.2</version>
     <height>18</height>
-    <width>37</width>
+    <width>39</width>
   </options>
 
   <database name="gnue" provider="postgresql" dbname="gnue" host="gnue"/>
@@ -14,23 +14,26 @@
 
   <page>
     <block name="state" datasource="state">
-      <label text="Code" x="1" y="1"/>
-      <entry name="state" field="state" x="1" y="2" width="4" height="1" 
visibleCount="5"/>
-      <label text="Description" x="6" y="1"/>
-      <entry name="state" field="description" x="6" y="2" width="30" 
height="1" visibleCount="5"/>
+      <label text="Code" x="2" y="1"/>
+      <entry name="state" field="state" x="2" y="2" width="4" height="1" 
visibleCount="5"/>
+      <label text="Description" x="7" y="1"/>
+      <entry name="state" field="description" x="7" y="2" width="30" 
height="1" visibleCount="5"/>
     </block>
 
 
     <!-- Block of cities -->
     <block name="cities"  datasource="cities" master="state.state" 
detail="state_code">
-      <label text="City" x="1" y="9"/>
-      <entry name="city" field="city" x="1" y="10" width="20" visibleCount="5" 
/>
+      <label text="City" x="2" y="9"/>
+      <entry name="city" field="city" x="2" y="10" width="20" visibleCount="5" 
/>
 
-      <label text="ST" x="22" y="9"/>
-      <entry name="state" field="state_code" x="22" y="10" width="3" 
visibleCount="5" />
+      <label text="ST" x="23" y="9"/>
+      <entry name="state" field="state_code" x="23" y="10" width="3" 
visibleCount="5" />
 
-      <label text="Zip" x="26" y="9"/>
-      <entry name="zip" field="zip" x="26" y="10" width="10" visibleCount="5" 
/>
+      <label text="Zip" x="27" y="9"/>
+      <entry name="zip" field="zip" x="27" y="10" width="10" visibleCount="5" 
/>
+
+      <box x="1" y="8" width="37" height="8" label="State Cities"/>
+
     </block>
 
   </page>
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.58 gnue/gnuef/src/GFForm.py:1.59
--- gnue/gnuef/src/GFForm.py:1.58       Thu Jan 11 22:08:48 2001
+++ gnue/gnuef/src/GFForm.py    Sat Jan 13 15:24:30 2001
@@ -55,7 +55,6 @@
                            'requestROLLBACK'   : self.executeRollback,
                            'requestEXIT'       : self.executeExit,
                            'requestABOUT'      : self.executeAbout,
-
                            }
 
     self.databaseDictionary = {}
@@ -221,7 +220,6 @@
   def updateUIEntry(self,entry):
     self.dispatchEvent(GFEvent('updateENTRY',entry));
 
-  #
   # This routine is only used once in GFObjects
   #
   def findValue(self, blockname, fieldname):
@@ -247,7 +245,7 @@
         masterBlock,masterField = string.split(block.master,'.')
         if masterBlock == self.currentBlock.name:
           if not block.isSaved():
-            message = GFMsgBox(self, GFOptions._msgNOTSAVED)
+            message = GFMsgBox(self, GFOptions._msgDETAILNOTSAVED )
             message.show()
             return
     
@@ -290,12 +288,12 @@
   def executeExit(self, event):
     for block in self.blockList:
       if not block.isSaved():
-        GFDebug.printMesg(0,"%s is not saved" % block.name)
         message = GFMsgBox(self, GFOptions._msgNOTSAVED)
        message.show()
         return
-      else:
-        self.dispatchEvent(GFEvent('exitApplication','Current data is saved'))
+      
+    # If above loop didn't cause function to return then exit
+    self.dispatchEvent(GFEvent('exitApplication','Current data is saved'))
 
   def requestQuery(self, event):
     if hasattr(self.currentBlock,"master"):
@@ -340,17 +338,16 @@
     self.updateRecordStatus()
     self.updateRecordCounter()
     
-  def recordSwitched(self, entry):
-    if entry.block.mode == 'normal':
-      # update the details
-      #
-      # This should be redone so that master blocks have detailBlocks register 
w/ them
-      # then the blocks updateDetail() could be simpler as only blocks that 
need the
-      # update get it
+  #
+  # updateDetailBlocks
+  #
+  # This should be redone so that master blocks have detailBlocks register w/ 
them
+  # then the blocks updateDetail() could be simpler as only blocks that need 
the
+  # update get it
+  def updateDetailBlocks(self, originatingBlock):
+    if originatingBlock.mode == 'normal':
       for block in self.blockList:
-        block.updateDetail(entry.block) 
-
-    self.dispatchEvent(GFEvent('updateENTRY',entry))
+        block.updateDetail(originatingBlock)
 
   #
   # nextEntry
@@ -456,8 +453,6 @@
         nextBlock = object
         break
 
-    
#self.currentBlock.dispatchEvent(GFEvent('switchRECORD',[self.currentBlock.currentRecord,self.currentBlock.currentRecord]))
-    
self.currentBlock.switchRecord(self.currentBlock.currentRecord,self.currentBlock.currentRecord)
     self.currentBlock.processTrigger('Pre-FocusOut')
     self.currentBlock.processTrigger('Post-FocusOut')
     nextBlock.processTrigger('Pre-FocusIn')
@@ -493,16 +488,12 @@
       
       nextBlock = object
 
-    
#self.currentBlock.dispatchEvent(GFEvent('switchRECORD',[self.currentBlock.currentRecord,self.currentBlock.currentRecord]))
-    
self.currentBlock.switchRecord(self.currentBlock.currentRecord,self.currentBlock.currentRecord)
-
     self.currentBlock.processTrigger('Pre-FocusOut')
     self.currentBlock.processTrigger('Post-FocusOut')
     nextBlock.processTrigger('Pre-FocusIn')
     self.currentBlock = nextBlock
     nextBlock.processTrigger('Post-FocusIn')
 
-
     # reset current entry 
     self.currentEntry = None
     self.currentBlock.walk(self.setInitialFocus)    
@@ -586,9 +577,12 @@
       
         self.currentEntry.cursorPosition = self.currentEntry.cursorPosition + 1
         self.currentEntry.setValue(currentvalue)
+        # Hack alert 
+        self.updateDetailBlocks(self.currentBlock)
+        # end hack alert
+        self.updateRecordStatus()
       else:
         self.dispatchEvent(GFEvent('formALERT','Field is readonly'))
-
                                
   #
   # removeCharacter
@@ -608,6 +602,10 @@
       currentvalue = currentvalue[:self.currentEntry.cursorPosition]  + \
                currentvalue[self.currentEntry.cursorPosition+1:]
       self.currentEntry.setValue(currentvalue)
+      # hack alert
+      self.updateDetailBlocks(self.currentBlock)
+      # end hack alert
+      self.updateRecordStatus()
     else:
       self.dispatchEvent(GFEvent('formALERT','Field is readonly'))
 
Index: gnue/gnuef/src/GFObjects.py
diff -u gnue/gnuef/src/GFObjects.py:1.51 gnue/gnuef/src/GFObjects.py:1.52
--- gnue/gnuef/src/GFObjects.py:1.51    Thu Jan 11 22:08:48 2001
+++ gnue/gnuef/src/GFObjects.py Sat Jan 13 15:24:30 2001
@@ -1,4 +1,3 @@
-
 #
 # FILE:
 # GFObjects.py
@@ -23,35 +22,6 @@
 TRUE = 1
 FALSE = 0
 
-###
-###!!Hack warning!!, have moved GFTriggerAware into this file
-###to prevent circular depenancies until a better solution
-###can be found
-###
-##class GFTriggerAware:
-##  def __init__(self):
-##      self.trigger = {}
-
-##      self.validTriggers = [ 'Pre-FocusOut',
-##                             'Post-FocusOut',
-##                             'Pre-FocusIn',
-##                             'Post-FocusIn']
-
-##  def addTrigger(self, key, function):
-##    if not self.trigger.has_key(key):
-##      self.trigger[key] = []
-##    self.trigger[key].append(function)
-    
-##  def processTrigger(self, key):
-##    if self.validTriggers.count(key):
-##      if self.trigger.has_key(key):
-##        for function in self.trigger[key]:
-##          function(self)
-##      else:
-##        GFDebug.printMesg(10, "No triggers to fire")
-##    else:
-##      print "Invalid trigger ",key
-
 #
 # Class GFObj
 #
@@ -120,6 +90,7 @@
   def __init__(self, parent=None):
     GFObj.__init__(self, parent)
     self.type = "GFBox"
+    self.label = ""
 
 #
 #GFLabel
@@ -157,9 +128,6 @@
     self.incommingEvent = {                           
                            }
     
-    # register to recieve events from it's parent GFForm
-    # self.form.registerEventListener(self.processEvent)
-
     # register the form to recieve events from the block
     self.registerEventListener(self.form.processEvent)
 
@@ -200,30 +168,29 @@
       
     oldRecord = self.currentRecord
     self.currentRecord = 0
-    self.switchRecord(oldRecord,self.currentRecord)
+    self.switchRecord(self.currentRecord)
     
     self.dispatchEvent(GFEvent('requestPREVRECORD',None))
 
   #
   # Moves the proper record into editing position
   #
-
-
-  def switchRecord(self, oldRecord, newRecord):
+  def switchRecord(self, newRecord):
     for entry in self.entryList:
-      entry.switchRecord(oldRecord,self.currentRecord)
+      entry.switchRecord(self.currentRecord)
+      self.form.updateUIEntry(entry)
+      
+    self.form.updateDetailBlocks(self)
 
   def nextRecord(self):
-    oldRecord = self.currentRecord
     self.currentRecord = self.currentRecord + 1
     if self.currentRecord > self.recordCount : self.currentRecord = 0
-    self.switchRecord(oldRecord,self.currentRecord)
+    self.switchRecord(self.currentRecord)
 
   def prevRecord(self):
-    oldRecord = self.currentRecord
     self.currentRecord = self.currentRecord - 1
     if self.currentRecord < 0 : self.currentRecord = self.recordCount    
-    self.switchRecord(oldRecord,self.currentRecord)
+    self.switchRecord(self.currentRecord)
       
   #
   # processCommit
@@ -232,8 +199,6 @@
     GFDebug.printMesg(1, "processing commit")
     self.mode='commit'
 
-    self.switchRecord(self.currentRecord,self.currentRecord)
-    
     # if this is a detail and the key isn't filled from master block then fill 
it
     if hasattr(self,"master"):
       masterBlock,masterField = string.split(self.master,'.')
@@ -249,7 +214,7 @@
     self.currentRecord = 0
 
     # Switch to first record
-    self.switchRecord(-1,0)
+    self.switchRecord(0)
     self.dispatchEvent(GFEvent('requestPREVRECORD',None))
     self.dispatchEvent(GFEvent('requestNEXTRECORD',None))
     self.mode='normal'
@@ -261,13 +226,10 @@
     self.currentRecord = 0
     self.recordCount = 0
     self.dataSourceLink.clear()
-#    print "Saved?", self.dataSourceLink.isSaved()
-    self.switchRecord(-1,0)
+    self.switchRecord(0)
 
-    self.dispatchEvent(GFEvent('requestPREVRECORD',None))
-    self.dispatchEvent(GFEvent('requestNEXTRECORD',None))
-
-#    print "Still Saved?", self.dataSourceLink.isSaved()
+    #self.dispatchEvent(GFEvent('requestPREVRECORD',None))
+    #self.dispatchEvent(GFEvent('requestNEXTRECORD',None))
 
   #
   # processQuery
@@ -293,43 +255,35 @@
           entry.setValue(newValue)
           
       self.mode = 'normal'
-      self.switchRecord(0,0)
 
       self.dataSourceLink.query()
-      
       self.recordCount = self.dataSourceLink.getLastRecordNumber()
-      if self.recordCount < 0:
-        self.dataSourceLink.clear()
-        self.recordCount = self.dataSourceLink.getLastRecordNumber()
-                            
-      self.switchRecord(-1,0)
       self.currentRecord = 0
+      self.switchRecord(0)
 
   #
   # updateDetail - makes block check to see if it needs to update itself
   # if so it forces the update automagically
-  #
   # 
-  # 
   def updateDetail(self,originatingBlock):
-    if hasattr(self,'master'):
+    # Block can't be master of itself
+    if self != originatingBlock and hasattr(self,'master'):
       masterBlock,masterField = string.split(self.master,'.')
       if masterBlock == originatingBlock.name:
         fieldValue = str(self.form.findValue(masterBlock, masterField))
+        
+        ## clear the link
         self.dataSourceLink.clear()
+        self.recordCount = 0
+        self.currentRecord = 0
+        
         if len(fieldValue) > 0:
-          GFDebug.printMesg( 10, "Master Field value is %s" % (fieldValue))
-          ## clear the link
           self.dataSourceLink.setField(0,self.detail,fieldValue,TRUE)
           self.dataSourceLink.query()
-          if self.recordCount < 0:
-            self.dataSourceLink.clear()
+          self.recordCount = self.dataSourceLink.getLastRecordNumber()
+                  
+        self.switchRecord(0)
 
-        self.recordCount = self.dataSourceLink.getLastRecordNumber()
-        GFDebug.printMesg( 3, "We now have %s records in memory" % 
self.recordCount )
-        self.switchRecord(-1,0)
-        
-        self.currentRecord = 0
 
 ############################################################
 # GFEntry
@@ -338,11 +292,9 @@
 #
 # It send events to its parent GFBlock
 #
-#class GFEntry(GFValue, GFEventAware):
 class GFEntry(GFValue):
   def __init__(self, parent=None, value=None):
     GFValue.__init__(self, parent, value)
-#    GFEventAware.__init__(self) 
     self.type = "GFEntry"
 
     self.value=""
@@ -350,8 +302,6 @@
     self.height = GFOptions.widgetHeight
     self.block = self.findParentOfType('GFBlock')
 
-#    #register the block to recieve events from the entry
-#    self.registerEventListener(self.block.processEvent)
 
   def initialize(self):
     if not hasattr(self,'field'):
@@ -366,19 +316,17 @@
 
   def setValue(self, value):
     self.value = value
+    self.block.dataSourceLink.setField(self.block.currentRecord,
+                                       self.field,self.value)
     self.block.form.updateUIEntry(self)
 
   #
   # switchRecord
   #
-  def switchRecord(self, oldRecord, newRecord):
-    GFDebug.printMesg(2, "Switching to record %s from record %s" % (oldRecord, 
newRecord))
-
-    if oldRecord >= 0:
-      self.block.dataSourceLink.setField(oldRecord,self.field,self.value)
+  def switchRecord(self, newRecord):
+    GFDebug.printMesg(2, "Switching to record %s" % (newRecord))
     self.value = self.block.dataSourceLink.getField(newRecord,self.field)
     self.cursorPosition = len(self.value)
-    self.block.form.recordSwitched(self)
 
   #
   # verifyValue
@@ -495,22 +443,30 @@
         self.order_by = None
         
       self.resultSet = self.dataConnection.query(self.table, len(mask) and 
mask or None, self.order_by)
-      # Hack : need to verify below line doesn't need +1
-      for count in range(len(self.resultSet)):
-        self.resultSetStatus.append('saved')
-      
-      for fieldName in self.emptyRecord.keys():
-        if self.resultSet:
-          if not self.resultSet[0].has_key(fieldName):
-            for count in range(len(self.resultSet)):
-              self.resultSet[count][fieldName] = ""
-              
-      # Reset the internal type to string so things like len() work properly
+
       if self.resultSet:
+        # Set each record's status
         for count in range(len(self.resultSet)):
+          self.resultSetStatus.append('saved')
+
+        # Check first record to see if field present - if not then add one to 
all records
+        for fieldName in self.emptyRecord.keys():
+          if not self.resultSet[0].has_key(fieldName):
+            for result in self.resultSet:
+              result [fieldName] = ""
+            #Replacing this code with above two lines
+            #for count in range(len(self.resultSet)):
+            #  self.resultSet[count][fieldName] = ""
+
+            
+        # Reset the internal type to string so things like len() work properly
+        for count in range(len(self.resultSet)):
           for key in self.resultSet[count].keys():
             if self.resultSet[count][key] != None:
               self.resultSet[count][key] = str(self.resultSet[count][key])
+      else:
+        self.clear()
+              
       
   def commit(self):
     if hasattr(self,'database'):
@@ -579,7 +535,7 @@
         self.resultSet[recordNumber][self.dataConnection.uniqueKey] = \
         int(self.resultSet[recordNumber][self.dataConnection.uniqueKey]) * -1
 
-    self.resultSetStatus[recordNumber] = 'Deleted'
+    self.resultSetStatus[recordNumber] = 'deleted'
     GFDebug.printMesg(1, "removing object: %s" % 
(self.resultSet[recordNumber][self.dataConnection.uniqueKey]))
     
   def getField(self,recordNumber,fieldName):
Index: gnue/gnuef/src/GFOptions.py
diff -u gnue/gnuef/src/GFOptions.py:1.14 gnue/gnuef/src/GFOptions.py:1.15
--- gnue/gnuef/src/GFOptions.py:1.14    Thu Jan 11 22:08:48 2001
+++ gnue/gnuef/src/GFOptions.py Sat Jan 13 15:24:30 2001
@@ -25,6 +25,7 @@
 DEBUG = 0
 
 _msgNOTSAVED = "Data not saved. Commit or rollback changes."
+_msgDETAILNOTSAVED = "This record's detail information is not saved."
 
 # Fudge factor for altering widget size - should no longer be needed
 borderPercentage = 100
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.52 gnue/gnuef/src/UIwxpython.py:1.53
--- gnue/gnuef/src/UIwxpython.py:1.52   Thu Jan 11 22:08:48 2001
+++ gnue/gnuef/src/UIwxpython.py        Sat Jan 13 15:24:30 2001
@@ -50,29 +50,16 @@
                            'exitApplication': self.exitApplication
                           })
     
-##    self.widgetConstructor = {
-##                              'GFLabel':
-##                              """wxStaticText(container, -1, 
str(object.text),
-##                                
wxPoint(int(object.x)*int(self.charWidth*self.borderPercentage),
-##                                       
(int(object.y)+spacer)*int(self.charHeight*self.borderPercentage)),
-##                                wxDefaultSize)"""
-##                             }
 
     self.widgetConstructorFunction['GFLabel'] = self.labelHandler
     self.widgetConstructor = {
-                              'GFLabel':
-                              """wxStaticText(container, -1, str(object.text),
-                                wxPoint(int(object.x)*int(self.widgetWidth),
-                                       
(int(object.y)+spacer)*int(self.widgetHeight)),
-                                wxDefaultSize)""",
                               'GFBox':
-                              """wxStaticBox(container,-1,"",
-                                wxPoint(int(object.x)*int(self.widgetWidth),
-                                        
(int(object.y)+spacer)*int(self.widgetHeight)),
-                                
wxSize(int(self.form.width)*int(self.widgetWidth),
-                                       
int(self.form.height)*int(self.widgetHeight)))"""
-                              
-                             }
+                              """wxStaticBox(container,-1,object.label,
+                                
wxPoint(int(object.x)*int(self.widgetWidth)+(int(self.widgetWidth)/2),
+                                        
(int(object.y)+spacer)*int(self.widgetHeight)+(int(self.widgetHeight)/2)),
+                                
wxSize(int(object.width)*int(self.widgetWidth)-(int(self.widgetWidth)/2),
+                                       
int(object.height)*int(self.widgetHeight)-(int(self.widgetHeight)/2)))"""
+                              }
     
     self.keyEvents = {WXK_PRIOR:  GFEvent('requestPREVBLOCK'),
                       WXK_NEXT:   GFEvent('requestNEXTBLOCK'),
@@ -188,13 +175,17 @@
     #sys.stderr.write("fields %d, %s 
\n"%(self.formToUI[event.data][1],self.formToUI[event.data][0]))
     
   def updateStatus(self,event):
+    statusValues = {'saved':'OK',
+                    'modified':'MOD',
+                    'deleted':'DEL'}
+                    
     tip, recordStatus, insertMode, currentRecord, maxRecord, currentPage, 
maxPage =event.data
 
     if tip != None:
       self.statusBar.SetStatusText(str(tip),0)
 
     if recordStatus != None:
-      self.statusBar.SetStatusText(recordStatus,1)
+      self.statusBar.SetStatusText(statusValues[recordStatus],1)
 
     if insertMode != None:
       if int(insertMode) == 1:
@@ -433,8 +424,6 @@
       else:
         size = wxDefaultSize
 
-      print style
-
       for spacer in range(count):
         spacer = int(spacer)        
         newWidget = wxStaticText(container, -1, str(object.text),
@@ -499,7 +488,7 @@
     
     self.statusBar = self.frame.CreateStatusBar()
     self.statusBar.SetFieldsCount(5)
-    self.statusBar.SetStatusWidths([-1,100,50,100,100])
+    self.statusBar.SetStatusWidths([-1,50,50,100,100])
     
self.statusBar.SetFont(wxFont(GFOptions.pointSize,wxMODERN,wxNORMAL,wxNORMAL))
     
     self.frame.SetStatusText( "Let's get started" )
@@ -536,7 +525,6 @@
     helpMenu = wxMenu()
     helpMenu.Append( 300, "&About...", "Display info about gnuef" )
     EVT_MENU(self, 300, lambda event, l=self: 
l.dispatchEvent(GFEvent('requestABOUT')))
-#    EVT_MENU(self, 300, self.OnAbout)
 
 
     menuBar = wxMenuBar()
@@ -562,6 +550,7 @@
     eo = event.GetEventObject()
     object = wxPyTypeCast(eo, 'wxFrame')
     if event.CanVeto():
+      print "Dispatching exit event"
       self.dispatchEvent(GFEvent('requestEXIT'))
     else:
       object.Destroy()
@@ -609,6 +598,7 @@
     self.frame.Close()
 
   def exitApplication(self,event):
+    print "Wassup"
     self.frame.Close(true)
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]