def on_button_ssh_path_clicked(self, widget): host = self.builder.get_object('entry_ssh_host').get_text() user = self.builder.get_object('entry_ssh_user').get_text() if len(host) == 0 or len(user) == 0: return True filechooser = FileChooser() filechooser.set_return_type(filechooser.RETURN_URI) filechooser.set_exitnotify(self.filechosen_new_set_ssh_path) filechooser.set_title(_("Select a default remote location to backup to.")) filechooser.show() filechooser.set_current_folder_uri("sftp://%s@%s/" %(user, host))
def on_button_default_dest_clicked(self, widget): filechooser = FileChooser() filechooser.set_return_type(filechooser.RETURN_FILENAME) filechooser.set_exitnotify(self.filechosen_new_set_default_dest) filechooser.set_title(_("Select a default destination")) filechooser.show()