commit-gnue
[Top][All Lists]
Advanced

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

gnue/gnuef/designer GFDesigner.py


From: James Thompson
Subject: gnue/gnuef/designer GFDesigner.py
Date: Wed, 13 Dec 2000 09:47:39 -0800

CVSROOT:        /cvs
Module name:    gnue
Changes by:     James Thompson <address@hidden> 00/12/13 09:47:39

Modified files:
        gnuef/designer : GFDesigner.py 

Log message:
        Altered the name of datasources? via derek's instructions
        Made defaults actually work :)
        Security fix: block password from displaying on screen

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/gnue/gnuef/designer/GFDesigner.py.diff?r1=1.3&r2=1.4

Patches:
Index: gnue/gnuef/designer/GFDesigner.py
diff -u gnue/gnuef/designer/GFDesigner.py:1.3 
gnue/gnuef/designer/GFDesigner.py:1.4
--- gnue/gnuef/designer/GFDesigner.py:1.3       Wed Dec 13 08:02:31 2000
+++ gnue/gnuef/designer/GFDesigner.py   Wed Dec 13 09:47:39 2000
@@ -73,9 +73,16 @@
       build_type="database"
       database = Database()
       database.provider = raw_input("Which Database Vendor? [postgresql] ")
+      if len(database.provider) == 0:
+        database.provider = "postgresql"
       database.host = raw_input("Host Name of Database Server? [localhost] ")
+      if len(database.provider) == 0:
+        database.host = "localhost"
       database.user = raw_input("User Name? [guest] ")
+      os.system("stty -echo")
       database.password = raw_input("Password? [guest] ")
+      os.system("stty echo")
+      print
       database.dbname = raw_input("Database to connect to? []")
       datasource = Datasource()
 #      build_type = raw_input("Which Database Vendor? [PostGRES] ")
@@ -137,7 +144,7 @@
       for tables in avail_tables:
         print "%s - %s" % (str(avail_tables.index(tables)),tables)
       datasource.table = avail_tables[int(raw_input("Select Table: "))]
-      datasource.name = "dtsrc" + datasource.table
+      datasource.name = datasource.table
       datasource.database = database.name
       print "You selected %s" % (datasource.table)
       fields = db.get_attnames(datasource.table)
@@ -211,9 +218,9 @@
 
     else:
       f.write("  <database name=\"%s\" provider=\"%s\" dbname=\"%s\" 
host=\"%s\"/>\n" % (database.name, database.provider, database.dbname, 
database.host))
-      f.write("  <datasource name=\"%s\" database=\"%s\" table=\"%s\" 
cache=\"%s\"/>\n" % (datasource.name, datasource.database, datasource.table, 
"5"))
+      f.write("  <datasource name=\"dtsrc%s\" database=\"%s\" table=\"%s\" 
cache=\"%s\"/>\n" % (datasource.name, datasource.database, datasource.table, 
"5"))  
       f.write("  <page>\n")
-      f.write("    <block name=\"blck%s\" datasource=\"%s\">\n" % 
(datasource.name, datasource.name))
+      f.write("    <block name=\"blck%s\" datasource=\"dtsrc%s\">\n" % 
(datasource.name, datasource.name))
       for widget in stack:
         if widget.type == "label":
           f.write("      <label text=\"%s\" x=\"%s\" y=\"%s\"/>\n" % 
(widget.text,widget.x,widget.y))



reply via email to

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