mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-25 23:39:45 -05:00
ui: added checkbox and associated logic for recursing into groups
This commit is contained in:
parent
e3d989db5f
commit
acb2f6900d
@ -126,6 +126,7 @@ namespace KeeShareSettings
|
||||
QUuid uuid;
|
||||
QString path;
|
||||
QString password;
|
||||
bool recurse;
|
||||
|
||||
Reference();
|
||||
bool isNull() const;
|
||||
|
@ -110,7 +110,9 @@ namespace
|
||||
targetRoot->setUpdateTimeinfo(updateTimeinfo);
|
||||
cloneIcon(targetMetadata, sourceRoot->database(), targetRoot->iconUuid());
|
||||
cloneEntries(targetMetadata, sourceRoot, targetRoot);
|
||||
cloneChildren(targetMetadata, sourceRoot, targetRoot);
|
||||
if(reference.recurse) {
|
||||
cloneChildren(targetMetadata, sourceRoot, targetRoot);
|
||||
}
|
||||
|
||||
auto key = QSharedPointer<CompositeKey>::create();
|
||||
key->addKey(QSharedPointer<PasswordKey>::create(reference.password));
|
||||
|
@ -43,6 +43,7 @@ EditGroupWidgetKeeShare::EditGroupWidgetKeeShare(QWidget* parent)
|
||||
connect(m_ui->pathEdit, SIGNAL(editingFinished()), SLOT(selectPath()));
|
||||
connect(m_ui->pathSelectionButton, SIGNAL(pressed()), SLOT(launchPathSelectionDialog()));
|
||||
connect(m_ui->typeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(selectType()));
|
||||
connect(m_ui->recurseIntoGroupsCheckbox, SIGNAL(toggled(bool)), SLOT(recurseIntoGroupsToggled(bool)));
|
||||
connect(m_ui->clearButton, SIGNAL(clicked(bool)), SLOT(clearInputs()));
|
||||
|
||||
connect(KeeShare::instance(), SIGNAL(activeChanged()), SLOT(updateSharingState()));
|
||||
@ -97,6 +98,7 @@ void EditGroupWidgetKeeShare::updateSharingState()
|
||||
m_ui->pathEdit->setEnabled(isEnabled);
|
||||
m_ui->pathSelectionButton->setEnabled(isEnabled);
|
||||
m_ui->passwordEdit->setEnabled(isEnabled);
|
||||
m_ui->recurseIntoGroupsCheckbox->setEnabled(isEnabled);
|
||||
|
||||
if (!m_temporaryGroup || !isEnabled) {
|
||||
m_ui->messageWidget->hideMessage();
|
||||
@ -291,3 +293,13 @@ void EditGroupWidgetKeeShare::selectType()
|
||||
|
||||
updateSharingState();
|
||||
}
|
||||
|
||||
void EditGroupWidgetKeeShare::recurseIntoGroupsToggled(bool toggled)
|
||||
{
|
||||
if (!m_temporaryGroup) {
|
||||
return;
|
||||
}
|
||||
auto reference = KeeShare::referenceOf(m_temporaryGroup);
|
||||
reference.recurse = toggled;
|
||||
KeeShare::setReferenceTo(m_temporaryGroup, reference);
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ private slots:
|
||||
void selectPassword();
|
||||
void launchPathSelectionDialog();
|
||||
void selectPath();
|
||||
void recurseIntoGroupsToggled(bool);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::EditGroupWidgetKeeShare> m_ui;
|
||||
|
@ -138,7 +138,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
@ -171,7 +171,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -184,6 +184,13 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="recurseIntoGroupsCheckbox">
|
||||
<property name="text">
|
||||
<string>Share recursively</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user