mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 00:09:53 -05:00
Merge pull request #1451 from hifi/feature/sshagent-select-key
SSH Agent: Always use freshly selected key
This commit is contained in:
commit
af9e1e79cd
@ -271,7 +271,7 @@ void EditEntryWidget::setupSSHAgent()
|
||||
m_sshAgentUi->publicKeyEdit->setFont(fixedFont);
|
||||
|
||||
connect(m_sshAgentUi->attachmentRadioButton, SIGNAL(clicked(bool)), SLOT(updateSSHAgentKeyInfo()));
|
||||
connect(m_sshAgentUi->attachmentComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateSSHAgentKeyInfo()));
|
||||
connect(m_sshAgentUi->attachmentComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateSSHAgentAttachment()));
|
||||
connect(m_sshAgentUi->externalFileRadioButton, SIGNAL(clicked(bool)), SLOT(updateSSHAgentKeyInfo()));
|
||||
connect(m_sshAgentUi->externalFileEdit, SIGNAL(textChanged(QString)), SLOT(updateSSHAgentKeyInfo()));
|
||||
connect(m_sshAgentUi->browseButton, SIGNAL(clicked()), SLOT(browsePrivateKey()));
|
||||
@ -323,6 +323,12 @@ void EditEntryWidget::updateSSHAgent()
|
||||
updateSSHAgentKeyInfo();
|
||||
}
|
||||
|
||||
void EditEntryWidget::updateSSHAgentAttachment()
|
||||
{
|
||||
m_sshAgentUi->attachmentRadioButton->setChecked(true);
|
||||
updateSSHAgentKeyInfo();
|
||||
}
|
||||
|
||||
void EditEntryWidget::updateSSHAgentKeyInfo()
|
||||
{
|
||||
m_sshAgentUi->addToAgentButton->setEnabled(false);
|
||||
@ -398,6 +404,8 @@ void EditEntryWidget::browsePrivateKey()
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select private key"), "");
|
||||
if (!fileName.isEmpty()) {
|
||||
m_sshAgentUi->externalFileEdit->setText(fileName);
|
||||
m_sshAgentUi->externalFileRadioButton->setChecked(true);
|
||||
updateSSHAgentKeyInfo();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,7 @@ private slots:
|
||||
void toggleHideNotes(bool visible);
|
||||
#ifdef WITH_XC_SSHAGENT
|
||||
void updateSSHAgent();
|
||||
void updateSSHAgentAttachment();
|
||||
void updateSSHAgentKeyInfo();
|
||||
void browsePrivateKey();
|
||||
void addKeyToAgent();
|
||||
|
Loading…
Reference in New Issue
Block a user