commit-gnue
[Top][All Lists]
Advanced

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

gnue/gnuef INSTALL setup.py src/GFForm.py src/G...


From: James Thompson
Subject: gnue/gnuef INSTALL setup.py src/GFForm.py src/G...
Date: Mon, 29 Jan 2001 13:35:26 -0800

CVSROOT:        /cvs
Module name:    gnue
Changes by:     James Thompson <address@hidden> 01/01/29 13:35:26

Modified files:
        gnuef          : INSTALL setup.py 
        gnuef/src      : GFForm.py GFOptions.py UIwxpython.py 
        gnuef/src/drivers/postgresql: DBdriver.py 

Log message:
        Updates to make gnuef play nicer in windows
        checked in so jade could look at case issue under windows

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/INSTALL.diff?r1=1.6&r2=1.7
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/setup.py.diff?r1=1.8&r2=1.9
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFForm.py.diff?r1=1.62&r2=1.63
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/GFOptions.py.diff?r1=1.15&r2=1.16
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/UIwxpython.py.diff?r1=1.53&r2=1.54
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/src/drivers/postgresql/DBdriver.py.diff?r1=1.9&r2=1.10

Patches:
Index: gnue/gnuef/INSTALL
diff -u gnue/gnuef/INSTALL:1.6 gnue/gnuef/INSTALL:1.7
--- gnue/gnuef/INSTALL:1.6      Tue Dec 12 22:35:08 2000
+++ gnue/gnuef/INSTALL  Mon Jan 29 13:35:26 2001
@@ -134,12 +134,8 @@
 
 
 Note: the current cvs defines two graphics splashScreenBMP and smallBMP in the 
GFOptions.py
-file.  You'll need to manually create the directory and move these files into 
place.  To do
-that with the default options do the following from the top gnuef directory
-
-mkdir -p /usr/local/gnue/shared
-cp src/gnuef-splash.bmp /usr/local/gnue/shared
-cp src/gnue.bmp /usr/local/gnue/shared
+file. They are installed by default in /usr/local/gnue/shared
+ 
 chmod -R o+rx /usr/local/gnue
 
 Now you can run your first sample: "gfclient samples/form.gfd".
Index: gnue/gnuef/setup.py
diff -u gnue/gnuef/setup.py:1.8 gnue/gnuef/setup.py:1.9
--- gnue/gnuef/setup.py:1.8     Thu Jan 25 14:39:30 2001
+++ gnue/gnuef/setup.py Mon Jan 29 13:35:26 2001
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 import sys
 import string
+import os.path
 
 try:
   from distutils.core import setup
@@ -96,9 +97,11 @@
 imagefiles="""
   recursive-include images *.bmp
 """
+print os.path.splitdrive(sys.prefix)[0]+'/usr/local/gnue/shared',
+
 images = [
         Data_Files(
-                   copy_to = '/usr/local/gnue/shared',
+                   copy_to = 
os.path.splitdrive(sys.prefix)[0]+'/usr/local/gnue/shared',
                    template = string.split(imagefiles,"\n"),
                    preserve_path = 1)
         ]
Index: gnue/gnuef/src/GFForm.py
diff -u gnue/gnuef/src/GFForm.py:1.62 gnue/gnuef/src/GFForm.py:1.63
--- gnue/gnuef/src/GFForm.py:1.62       Thu Jan 18 05:26:37 2001
+++ gnue/gnuef/src/GFForm.py    Mon Jan 29 13:35:26 2001
@@ -174,8 +174,9 @@
       try:
         object.initialize(user,passwd)
       except:
-        os.system("stty sane")
-        print "Login failure"
+        if sys.platform != 'win32':
+          os.system("stty sane")
+        print "Unexpected error:", sys.exc_info()[0], sys.exc_info()[1]
         sys.exit()
         
   def initTriggers(self, object):
Index: gnue/gnuef/src/GFOptions.py
diff -u gnue/gnuef/src/GFOptions.py:1.15 gnue/gnuef/src/GFOptions.py:1.16
--- gnue/gnuef/src/GFOptions.py:1.15    Sat Jan 13 15:24:30 2001
+++ gnue/gnuef/src/GFOptions.py Mon Jan 29 13:35:26 2001
@@ -1,15 +1,17 @@
+import os
+import sys
 
 # Adjust for your install
-prefix="/usr/local/gnue"  
+prefix=os.path.splitdrive(sys.prefix)[0]+"/usr/local/gnue"  
 
 FormDir =prefix+"/forms"  # Where gfclient looks for forms if symlink to 
gfclient
                           # is the form name to run
                           
 # Startup graphic
-splashScreenBMP=prefix+"/shared/gnuef-splash.bmp"
+splashScreenBMP=prefix+"/shared/images/gnuef-splash.bmp"
 
 # GNUe logo
-smallBMP=prefix+"/shared/gnue.bmp"
+smallBMP=prefix+"/shared/images/gnue.bmp"
 
 
 
Index: gnue/gnuef/src/UIwxpython.py
diff -u gnue/gnuef/src/UIwxpython.py:1.53 gnue/gnuef/src/UIwxpython.py:1.54
--- gnue/gnuef/src/UIwxpython.py:1.53   Sat Jan 13 15:24:30 2001
+++ gnue/gnuef/src/UIwxpython.py        Mon Jan 29 13:35:26 2001
@@ -19,6 +19,7 @@
 from UIbase import *
 
 import string
+import sys
 
 #
 # GFUserInterface
@@ -660,29 +661,23 @@
   #
   def getLogin(self, event):
     self.logindata = event.data
-    self.dlg = wxDialog(NULL, -1, "Login Required for %s" % 
str(event.data[2].dbname),wxPoint(-1,-1),wxSize(300,100))
+    self.dlg = wxDialog(NULL, -1, "Login Required for %s" % 
str(event.data[2].dbname),wxPoint(-1,-1),wxSize(150,200))
     self.dlg.SetBackgroundColour(wxWHITE)
     self.dlg.SetAutoLayout(true)
     
     bmp = wxImage(GFOptions.smallBMP, wxBITMAP_TYPE_BMP).ConvertToBitmap()
-    self.usernameEntry = wxTextCtrl(self.dlg, 1020)
-    self.passwordEntry = wxTextCtrl(self.dlg, 1030,"", 
wxPoint(-1,-1),wxSize(-1,-1),wxTE_PASSWORD)
     
+    wxStaticBitmap(self.dlg,-1, bmp, wxPoint(5, 10),wxSize(bmp.GetWidth(), 
bmp.GetHeight()))
+    wxStaticText(self.dlg, 1010, "Username",wxPoint(5, 25+ bmp.GetHeight()), 
wxSize(75, 20))
+    self.usernameEntry = wxTextCtrl(self.dlg, 1020,"",wxPoint(80, 25+ 
bmp.GetHeight()), wxSize(150, 20))
+    wxStaticText(self.dlg, 1010, "Password",wxPoint(5, 50+ bmp.GetHeight()), 
wxSize(75, 20))
+    self.passwordEntry = wxTextCtrl(self.dlg, 1030,"", wxPoint(80, 50+ 
bmp.GetHeight()), wxSize(150, 20), wxTE_PASSWORD|wxTE_PROCESS_ENTER)
+  
+
     EVT_CHAR(self.usernameEntry, self.usernameEventTrap)
+    EVT_TEXT_ENTER(self.passwordEntry, 10, self.passwordEnterTrap)
     EVT_CHAR(self.passwordEntry, self.passwordEventTrap)
-    
-    entryBox = wxBoxSizer(wxVERTICAL)
-    entryBox.Add(wxStaticText(self.dlg, 1010, "Username"), 0)
-    entryBox.Add(self.usernameEntry,0)
-    entryBox.Add(wxStaticText(self.dlg, 1010, "Password"), 0)
-    entryBox.Add(self.passwordEntry,0)
-    
-    mainBox = wxBoxSizer(wxHORIZONTAL)
-    mainBox.Add(wxStaticBitmap(self.dlg,-1, bmp, wxPoint(-1, 
-1),wxSize(bmp.GetWidth(), bmp.GetHeight())),0)
-    mainBox.Add(entryBox,0)
-    self.usernameEntry.SetFocus()
-    
-    self.dlg.SetSizer( mainBox )
+        
     self.dlg.ShowModal()
     self.dlg.Destroy()
     
@@ -695,17 +690,18 @@
         
   def passwordEventTrap(self, event):
     if event.KeyCode() == WXK_RETURN:
-#      print "User %s" % (self.usernameEntry.GetValue())
-#      print "Pass %s" % (self.passwordEntry.GetValue())
-#      self.dispatchEvent(GFEvent('authenticationEVENT',\
-#                                 [self.usernameEntry.GetValue(),
-#                                  self.passwordEntry.GetValue()
-#]))
       self.logindata[0] = self.usernameEntry.GetValue()
       self.logindata[1] = self.passwordEntry.GetValue()
       self.dlg.EndModal(1)
     else:
       event.Skip()
+
+  def passwordEnterTrap(self, event):
+    print "Processing enter"
+    self.logindata[0] = self.usernameEntry.GetValue()
+    self.logindata[1] = self.passwordEntry.GetValue()
+    self.dlg.EndModal(1)
+
 
   def msgBox(self, event):
     parent = wxPyTypeCast( self.frame, 'wxWindow' )
Index: gnue/gnuef/src/drivers/postgresql/DBdriver.py
diff -u gnue/gnuef/src/drivers/postgresql/DBdriver.py:1.9 
gnue/gnuef/src/drivers/postgresql/DBdriver.py:1.10
--- gnue/gnuef/src/drivers/postgresql/DBdriver.py:1.9   Sat Dec 16 13:32:22 2000
+++ gnue/gnuef/src/drivers/postgresql/DBdriver.py       Mon Jan 29 13:35:26 2001
@@ -19,6 +19,7 @@
 
 class DBdriver:
   def __init__(self):
+    print "Postgresql database driver initializing"
     if GFOptions.DEBUG:
       print "Postgresql database driver initializing"
     self.connection = None



reply via email to

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