Changeset 189

Show
Ignore:
Timestamp:
Thu Aug 31 12:32:23 2006
Author:
Brian
Message:

Added dialog to display download instructions. Added code to prevent a deprecation warning from being issued.

Files:

Legend:

Unmodified
Added
Removed
Modified
  • server/trunk/update/client/Share Changes with Server.py

    r172 r189  
    32 32 # 060823 - fixed lost aliases bug; added progress display  
    33 33 # 060825 - Alex - merge/delete duplicated records  
      34 # 060831 - prevent deprecation message in log file; check for server ip address  
    34 35  
    35 36 debug = 1  
     
    52 53  
    53 54 def DoCall():  
    54       import xmlrpclib  
      55     import warnings  
      56     warnings.simplefilter('ignore', DeprecationWarning)  
    55 57  
    56       server_address = Data.Other.get('ServerAddress') or "http://192.168.0.6:8001"  
      58     import xmlrpclib  
    56 58  
      59     server_address = Data.Other.get('ServerAddress')  # or "http://192.168.0.6:8001"  
      60     if not server_address:  
      61         Data.Hint("%s: %s" % (thisfile, _("Database not on a server.")))  
      62         return  
      63      
    57 64     parms = {   # data to make sure were are talking to the right server  
    58 65         'ScriptVersion': '2006-08-22',  
  • server/trunk/update/client/Add Database to Server.py

    r166 r189  
    26 26 # 060403 - prompt for server information  
    27 27 # 060821 - record server address and next record ids  
      28 # 060830 - added dialog to display download instructions  
      29 # 060831 - prevent deprecation message in log file  
    28 30  
    29 31 def DoCall():  
      32     import warnings  
      33     warnings.simplefilter('ignore', DeprecationWarning)  
      34  
    30 35     import xmlrpclib  
    31 36  
     
    80 85             normal[tid] = t.values()  # list of values (id's are in the records)  
    81 86  
      87         file_signature = Data.Database['Other'][1]['FileSignature']  
    82 88         parms = {  
    83 89             'ScriptVersion': '2006-08-22',  
    84               'FileSignature': Data.Database['Other'][1]['FileSignature'],  
      90             'FileSignature': file_signature,  
    84 90             'Key': server_key,  
    85 91                  }  
     
    98 104                 for k, v in next.items():  
    99 105                     next["_" + k] = v  # the server knows about all these rows  
      106  
      107             text = _("""The database was added to the server. If you would like someone to be able  
      108 to download the database, send them the following information.  
      109 ----  
      110 Before you download a database from the GanttPV Server, you will need to install  
      111 the GanttPV Server client scripts into the Scripts folder. Then follow these  
      112 instructions:  
      113  
      114 (1) Open GanttPV  
      115 (2) Select the script "Download Database from Server" from the "Script" menu.  
      116 (3) Copy and paste the following into the dialog box that appears and click OK.  
      117 %s,%s,%s  
      118 (4) Save the Database.  
      119 (5) Before and after you make changes to the database, run the script "Share Changes with Server".  
      120 ----  
      121 """) % (server_address, file_signature, Data.Other['EditKey'])  
      122             dlg = wx.lib.dialogs.ScrolledMessageDialog(self, text, "Database Added to Server")  
      123             dlg.Show()  
      124  
    100 125     except xmlrpclib.Error, v:  
    101 126         print "Update Server ERROR", v  
  • server/trunk/update/client/Download Database from Server.py

    r166 r189  
    22 22 # 060326 - add parms to server call; save server next ids as "_" fields  
    23 23 # 060403 - prompt for server information  
      24 # 060830 - prevent deprecation message in log file  
    24 25  
    25 26 def DoCall():  
      27     import warnings  
      28     warnings.simplefilter('ignore', DeprecationWarning)  
      29  
    26 30     import xmlrpclib  
    27 31