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