Beispiel #1
0
 def onBrowseButton(self, event):        
     
     if not makerCheckInternetConnection.check():
        
         self.controller.infoMessage("Unable to browse remote server! No internet connection! ")
         return
     
     
     passw = self.controller.password()
     if not passw:
         return
     
     self.ftpBrowser = makerFtpBrowser.FTPBrowser(self.parent)
     
     if not self.ftpBrowser.ftpBrowserAction_connect_(self.ftp_host.GetValue(),
                                                      self.ftp_user.GetValue(),
                                                      self.ftp_root.GetValue(),
                                                      passw):
         return None
     self.keepGoodPassword(passw)
     self.ftpBrowser.ftpBrowserAction_ls_()
     
     pathName = self.ftpBrowser.ftpBrowserShow()
     
     if pathName:
         self.ftp_root.SetValue(pathName) 
     event.Skip()
 def onBrowseButton(self, event):        
     
     if not makerCheckInternetConnection.check():
        
         self.controller.infoMessage("Unable to browse remote server! No internet connection! ")
         return
     
     
     passw = self.controller.password()
     if not passw:
         return
     
     self.ftpBrowser = makerFtpBrowser.FTPBrowser(self.parent)
     
     if not self.ftpBrowser.ftpBrowserAction_connect_(self.ftp_host.GetValue(),
                                                      self.ftp_user.GetValue(),
                                                      self.ftp_root.GetValue(),
                                                      passw):
         return None
     self.keepGoodPassword(passw)
     self.ftpBrowser.ftpBrowserAction_ls_()
     
     pathName = self.ftpBrowser.ftpBrowserShow()
     
     if pathName:
         self.ftp_root.SetValue(pathName) 
     event.Skip()
Beispiel #3
0
 def onOkButton(self, event):                
     
     if not makerCheckInternetConnection.check():
        
         self.controller.infoMessage("No Internet Connection! Unable to test settings!")
         self.saved = False
         self.Close()
         
         
     else:
         
         result = self.doFTPCheck()
         if result != True:
             if result != False:
                 self.controller.errorMessage(str(result))
             return
         
     #self.theInformation["sprache"]      = self.choices_sprache[self.sprache.GetSelection()]
     #self.theInformation["add_language"] = self.choices_add_lang[self.add_language.GetSelection()]
     
         self.theInformation["ftp_host"] = self.ftp_host.GetValue()
         self.theInformation["ftp_user"] = self.ftp_user.GetValue()
         self.theInformation["ftp_root"] = self.ftp_root.GetValue()
 
         value = self.gfxFolder.GetValue()
                     
         # make sure it is just a foldername
         
         if "/" in value:
             if value.count("/") == 1 and value.endswith("/"):
                 pass
             else:
                 self.controller.errorMessage("The image folder is just a NAME for a folder, not a path.")
                 return
         if value == "":
             self.controller.errorMessage('"Name for remote graphics folder:" cannot be empty!')
             return
         
         bad = [" ", "."]
         for x in bad:
             if x in value:
                 self.controller.errorMessage('Please do not use . or spaces in the "Name for remote graphics folder:" field!')
                 return
                        
         self.theInformation["gfx_folder"] = value
         
         self.gfxFolder.SetValue(value)
         
         self.theInformation["url"]= self.url.GetValue()
         if not self.url.GetValue().endswith('/'):
             self.theInformation["url"] = self.url.GetValue() + '/'
      
         self.saved = True
         self.Close()
         self.controller.model.setRemotePassword(self.getGoodPassword())
         event.Skip()
 def onOkButton(self, event):                
     
     if not makerCheckInternetConnection.check():
        
         self.controller.infoMessage("No Internet Connection! Unable to test settings!")
         self.saved = False
         self.Close()
         
         
     else:
         
         result = self.doFTPCheck()
         if result != True:
             if result != False:
                 self.controller.errorMessage(str(result))
             return
         
     #self.theInformation["sprache"]      = self.choices_sprache[self.sprache.GetSelection()]
     #self.theInformation["add_language"] = self.choices_add_lang[self.add_language.GetSelection()]
     
         self.theInformation["ftp_host"] = self.ftp_host.GetValue()
         self.theInformation["ftp_user"] = self.ftp_user.GetValue()
         self.theInformation["ftp_root"] = self.ftp_root.GetValue()
 
         value = self.gfxFolder.GetValue()
                     
         # make sure it is just a foldername
         
         if "/" in value:
             if value.count("/") == 1 and value.endswith("/"):
                 pass
             else:
                 self.controller.errorMessage("The image folder is just a NAME for a folder, not a path.")
                 return
         if value == "":
             self.controller.errorMessage('"Name for remote graphics folder:" cannot be empty!')
             return
         
         bad = [" ", "."]
         for x in bad:
             if x in value:
                 self.controller.errorMessage('Please do not use . or spaces in the "Name for remote graphics folder:" field!')
                 return
                        
         self.theInformation["gfx_folder"] = value
         
         self.gfxFolder.SetValue(value)
         
         self.theInformation["url"]= self.url.GetValue()
         if not self.url.GetValue().endswith('/'):
             self.theInformation["url"] = self.url.GetValue() + '/'
      
         self.saved = True
         self.Close()
         self.controller.model.setRemotePassword(self.getGoodPassword())
         event.Skip()