mirror of
https://github.com/borgbase/vorta
synced 2024-12-23 00:07:58 +00:00
Properly populate SSH keys. Fixes #7
This commit is contained in:
parent
3ec781081d
commit
33576453cd
1 changed files with 6 additions and 2 deletions
|
@ -41,6 +41,9 @@ def __init__(self, parent=None):
|
|||
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 @@ def init_repo_stats(self):
|
|||
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue