shortened

This commit is contained in:
Sam 2023-09-19 18:14:35 +05:30
parent 7023ab6959
commit 780082e3b8
1 changed files with 1 additions and 9 deletions

View File

@ -262,7 +262,7 @@ class ExistingRepoWindow(RepoWindow, BackupProfileMixin):
# setting the type of repo - remote or local
if self.repoURL.isEnabled():
new_window.reURL.setEnabled(True)
new_window.repoURL.setEnabled(True)
else:
new_window.repoURL.setEnabled(False)
new_window.sshComboBox.setEnabled(False)
@ -282,8 +282,6 @@ class ExistingRepoWindow(RepoWindow, BackupProfileMixin):
# setting password
new_window.set_password(new_window.values['repo_url'])
new_window.values['password'] = self.values['password']
new_window.passwordInput.passwordLineEdit.setText(self.passwordInput.get_password())
new_window.passwordInput.confirmLineEdit.setText(self.passwordInput.get_password())
new_window._set_status(self.tr("Autofilled from previous window"))
new_window.open()
@ -299,12 +297,6 @@ class ExistingRepoWindow(RepoWindow, BackupProfileMixin):
self.repo_added.emit()
self.init_repo_stats()
def set_password(self, URL):
'''Autofill password from keyring only if current entry is empty'''
password = VortaKeyring.get_keyring().get_password('vorta-repo', URL)
if password and self.passwordInput.get_password() == "":
self.passwordInput.set_error_label(self.tr("Autofilled password from password manager."))
def run(self):
if self.validate():
params = BorgInfoRepoJob.prepare(self.values)