From 33576453cde1b2629f77127a6baa3e3e802f47a1 Mon Sep 17 00:00:00 2001 From: Manu Date: Tue, 13 Nov 2018 09:19:55 +0800 Subject: [PATCH] Properly populate SSH keys. Fixes #7 --- src/vorta/views/repo_tab.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vorta/views/repo_tab.py b/src/vorta/views/repo_tab.py index efbb5e86..5ae289c5 100644 --- a/src/vorta/views/repo_tab.py +++ b/src/vorta/views/repo_tab.py @@ -41,6 +41,9 @@ class RepoTab(RepoBase, RepoUI, BackupProfileMixin): self.repoCompression.currentIndexChanged.connect(self.compression_select_action) self.init_ssh() + self.sshComboBox.currentIndexChanged.connect(self.ssh_select_action) + self.sshKeyToClipboardButton.clicked.connect(self.ssh_copy_to_clipboard_action) + self.init_repo_stats() def init_repo_stats(self): @@ -54,10 +57,11 @@ class RepoTab(RepoBase, RepoUI, BackupProfileMixin): def init_ssh(self): keys = get_private_keys() + self.sshComboBox.clear() + self.sshComboBox.addItem('Automatically choose SSH Key (default)', None) + self.sshComboBox.addItem('Create New Key', 'new') for key in keys: self.sshComboBox.addItem(f'{key["filename"]} ({key["format"]}:{key["fingerprint"]})', key['filename']) - self.sshComboBox.currentIndexChanged.connect(self.ssh_select_action) - self.sshKeyToClipboardButton.clicked.connect(self.ssh_copy_to_clipboard_action) def ssh_select_action(self, index): if index == 1: