commit-gnue
[Top][All Lists]
Advanced

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

gnue/gnuef client/gfclient src/GFForm.py src/UI...


From: James Thompson
Subject: gnue/gnuef client/gfclient src/GFForm.py src/UI...
Date: Wed, 21 Feb 2001 14:54:43 -0800

CVSROOT:        /cvs
Module name:    gnue
Changes by:     James Thompson <address@hidden> 01/02/21 14:54:43

Modified files:
        gnuef/client   : gfclient 
        gnuef/src      : GFForm.py UIbase.py UIwxpython.py 

Log message:
        Cleaned out all the print statements I forgot about
        A global UIBase.py kludge to get to UIfoo.py defined classes

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/client/gfclient.diff?r1=1.19&r2=1.20
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFForm.py.diff?r1=1.72&r2=1.73
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/UIbase.py.diff?r1=1.19&r2=1.20
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/UIwxpython.py.diff?r1=1.71&r2=1.72

Patches:
Index: gnue/gnuef/client/gfclient
diff -u gnue/gnuef/client/gfclient:1.19 gnue/gnuef/client/gfclient:1.20
--- gnue/gnuef/client/gfclient:1.19     Wed Feb 21 13:42:17 2001
+++ gnue/gnuef/client/gfclient  Wed Feb 21 14:54:43 2001
@@ -108,14 +108,12 @@
     #
     # Build the form tree
     #
-    print "Building the form"
     form = GFForm()
     control = GFController(form, ui)
     form.run(fp)
     fp.close()
 
     # pass control to UI
-    #print "I'm there"
     ui.buildForm(form)
     ui.activateForm(form)
     ui.mainLoop()
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.72 gnue/gnuef/src/GFForm.py:1.73
--- gnue/gnuef/src/GFForm.py:1.72       Wed Feb 21 13:42:17 2001
+++ gnue/gnuef/src/GFForm.py    Wed Feb 21 14:54:43 2001
@@ -80,7 +80,6 @@
     self.textPercentage   = 7.5
 
   def run(self, URL):
-    print "Parsing...."
     # Create a parser
     parser = saxexts.make_parser()
     
@@ -95,7 +94,6 @@
     # set the initial focus
     self.walk(self.setInitialFocus)
 
-    print "Initing dbs...."
     # Connect to the defined databases
     self.walk(self.initDatabaseObjects)
 
@@ -109,7 +107,6 @@
     GFDebug.printMesg(3,  "Datasource Dictionary")
     GFDebug.printMesg(3,  "%s"%self.datasourceDictionary)
 
-    print "Initing trigger system...."
     #Set trigger namespace, we'll need something more
     #detailed than this including widgets etc. Also attaches
     #named triggers to thier placeholders
@@ -168,7 +165,6 @@
       self.databaseDictionary[object.name]=object
       while 1:
         try:
-          print "dispatching login...."
           #Login
           authcode = ["", "", object]
           self.dispatchEvent( GFEvent('getLogin', authcode) )
Index: gnue/gnuef/src/UIbase.py
diff -u gnue/gnuef/src/UIbase.py:1.19 gnue/gnuef/src/UIbase.py:1.20
--- gnue/gnuef/src/UIbase.py:1.19       Wed Feb 21 13:42:17 2001
+++ gnue/gnuef/src/UIbase.py    Wed Feb 21 14:54:43 2001
@@ -23,14 +23,7 @@
 #
 class GFUserInterfaceBase(GFEventAware):
   def __init__(self):
-    print "I'm in base __init__"
     GFEventAware.__init__(self)
-
-    
-    # __import__( self.getModule() )
-
-
-    print self.getModule() 
     #
     # incommintEvents
     #
@@ -47,7 +40,25 @@
                            'msgBoxUI'        : self.msgBox,
                            'getLogin'        : self.getLogin
                            }
+
+    #
+    # UGLY, UGLY, NASTY, NASY
+    #
+    # Someone tell me theres a better way to get to the classes in a specific 
UI driver
+    #
+    global UI
+    UI = __import__(self.getModule(), globals(), locals(), ['UIAbout'])
     
+    self.widgets = {'GFLabel'     : UI.UILabel,
+                    'GFBox'       : UI.UIBox,
+                    'GFPage'      : UI.UIPage,
+                    'GFForm'      : UI.UIForm,
+                    'GFEntry'     : UI.UIEntry,
+                    'GFButton'    : UI.UIButton,
+                    'GFScrollBar' : UI.UIScrollBar}
+
+
+
     self.formToUI = {}                   # the GFObj to UI widget cross ref
     self.formToUIWidget = {}                   # the GFObj to UI widget cross 
ref
     
@@ -69,7 +80,7 @@
       'GFScrollBar'   : self.stdHandler,    
       'GFPage'        : self.stdHandler,     
       }
-
+          
   def stdHandler(self):
     object = self.currentObject[0]
     container = self.currentWidget[0]
@@ -177,9 +188,9 @@
     description = event.data[4]
 
     
-    statement = "from %s import UIAbout" % self.getModule()
-    exec statement
-    about = UIAbout(self.mainWindow, programVersion, formName, formVersion, 
author, description)
+    #statement = "from %s import UIAbout" % self.getModule()
+    #exec statement
+    about = UI.UIAbout(self.mainWindow, programVersion, formName, formVersion, 
author, description)
 
     about.showModal()
     about.destroy()
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.71 gnue/gnuef/src/UIwxpython.py:1.72
--- gnue/gnuef/src/UIwxpython.py:1.71   Wed Feb 21 13:42:17 2001
+++ gnue/gnuef/src/UIwxpython.py        Wed Feb 21 14:54:43 2001
@@ -29,7 +29,6 @@
 #
 class GFUserInterface(wxApp,GFUserInterfaceBase):
   def __init__(self):
-    print "GFUI __init__"    
     wxApp.__init__(self,0)
     GFUserInterfaceBase.__init__(self)
 
@@ -55,15 +54,6 @@
                       WXK_F11:    GFEvent('requestROLLBACK'),
                       WXK_F12:    GFEvent('requestNEWRECORD'),
                      }
-    self.widgets = {'GFLabel'     : UILabel,
-                    'GFBox'       : UIBox,
-                    'GFPage'      : UIPage,
-                    'GFForm'      : UIForm,
-                    'GFEntry'     : UIEntry,
-                    'GFButton'    : UIButton,
-                    'GFScrollBar' : UIScrollBar}
-
-
     self.forms = {}
   #
   # mainLoop
@@ -78,7 +68,6 @@
   #
   #
   def getModule(self):
-    print type(GFUserInterface.__module__)
     return GFUserInterface.__module__
 
   #
@@ -88,7 +77,6 @@
   # It is used the build the basic UI
   #
   def OnInit(self):
-    print "I'm in OnInit"
 
     wxInitAllImageHandlers()
     
@@ -250,12 +238,10 @@
   #      the UI (i.e. wxPython.mainLoop in this case)
   #
   def buildForm(self, form):
-    print form.title
     self.currentObject = [form]
     self.form = form
     # Create the UI from the GFForm passed in
     self.buildUI()
-    print self.formToUIWidget
 
   def activateForm(self, form):
     self.mainWindow.SetSize(wxSize(int(self.form.width)*int(self.widgetWidth),
@@ -305,10 +291,6 @@
 
     if currentPage != None and  maxPage != None:
       self.statusBar.SetStatusText(string.strip("%s/%s" % 
(currentPage,maxPage)),4)
-
-
-
-
     
   #############################################################################
   #
@@ -368,62 +350,6 @@
         self.formToUI[event.data][0][count].SetEvtHandlerEnabled(TRUE)
       count = count +1   
 
-##  #
-##  # adjustMultiView
-##  #
-##  # when a form object has more than one record visible on the screen
-##  # this will adjust the entries to ensure the proper one is visible
-##  #
-##  def adjustMultiView(self, event):
-##    block = event.data.block.form.currentBlock
-
-##    if event.getEvent() == 'uiPREVRECORD':
-##      adjustment = -1
-##    else:
-##      adjustment = 1
-
-##    # Need to figure out what the currentRecord is
-##    # about to switch to. It hasn't yet.
-##    currentRecord = block.currentRecord + adjustment
-##    if currentRecord < 0 : currentRecord = block.recordCount
-##    if currentRecord > block.recordCount : currentRecord = 0
-    
-##    for entry in block.entryList:
-##      if not hasattr(entry, 'hidden'):
-        
-##        index = self.formToUI[entry][1] 
-##        index = index + adjustment
-
-##        if index < 0 : index = 0
-
-##        # Don't let index pass the number of widgets on screen
-##        if index >= int(entry.visibleCount):
-##          index = int(entry.visibleCount)-1
-
-##        # Don't let the index past the number of records in the
-##        # system
-##        lowestVisible = currentRecord - index
-##        if lowestVisible < 0 : lowestVisible = 0
-##        if lowestVisible + index > block.recordCount:
-##          index = index -1
-
-##        # If the current record has rolled around
-##        # from the top to the bottom then reset
-##        # the counter
-##        if currentRecord == 0:
-##          index = 0
-
-##        # if the current record has rolled from
-##        # bottom to top then flip to bottom keeping
-##        # in mind the number of records in memory
-##        if currentRecord == block.recordCount:
-##          if block.recordCount > int(entry.visibleCount)-1:
-##            index = int(entry.visibleCount)-1
-##          else:
-##            index = block.recordCount
-
-##        self.formToUI[entry][1] = index
-
   #
   # switchFocus
   #
@@ -646,7 +572,6 @@
   # creates the login dialog and displays it modal
   #
   def getLogin(self, event):
-    print "Getting login"
     self.logindata = event.data
     self.dlg = wxDialog(NULL, -1, "Login Required for %s" % 
str(event.data[2].dbname),wxPoint(-1,-1),wxSize(250,150))
     self.dlg.SetBackgroundColour(wxWHITE)
@@ -667,7 +592,6 @@
 
     self.dlg.Raise()
     self.dlg.CenterOnScreen()
-    print "showing login"
     self.dlg.ShowModal()
     self.dlg.Destroy()
     
@@ -854,7 +778,6 @@
 #
 class UIForm(UIWidget):
   def createWidget(self, object, container, textWidth, textHeight, 
widgetWidth, widgetHeight,interface,spacer):
-    print "building a form"
     newWidget = wxPanel(interface.mainWindow.panel,-1, wxDefaultPosition)
     EVT_CLOSE(interface.mainWindow,interface.closeTrap)
     



reply via email to

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