mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix: using current setting in autoaccept dialog
This should fixes #4777
This commit is contained in:
parent
5eaf0ab133
commit
70b235f271
|
@ -178,7 +178,7 @@ void FriendWidget::onContextMenuCalled(QContextMenuEvent* event)
|
||||||
QAction* autoAccept = menu.addAction(tr("Auto accept files from this friend",
|
QAction* autoAccept = menu.addAction(tr("Auto accept files from this friend",
|
||||||
"context menu entry"));
|
"context menu entry"));
|
||||||
const ToxPk id = frnd->getPublicKey();
|
const ToxPk id = frnd->getPublicKey();
|
||||||
const QString dir = s.getAutoAcceptDir(id);
|
QString dir = s.getAutoAcceptDir(id);
|
||||||
autoAccept->setCheckable(true);
|
autoAccept->setCheckable(true);
|
||||||
autoAccept->setChecked(!dir.isEmpty());
|
autoAccept->setChecked(!dir.isEmpty());
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
|
@ -221,7 +221,7 @@ void FriendWidget::onContextMenuCalled(QContextMenuEvent* event)
|
||||||
autoAccept->setChecked(false);
|
autoAccept->setChecked(false);
|
||||||
Settings::getInstance().setAutoAcceptDir(id, "");
|
Settings::getInstance().setAutoAcceptDir(id, "");
|
||||||
} else if (autoAccept->isChecked()) {
|
} else if (autoAccept->isChecked()) {
|
||||||
const QString dir = QFileDialog::getExistingDirectory(
|
dir = QFileDialog::getExistingDirectory(
|
||||||
Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir);
|
Q_NULLPTR, tr("Choose an auto accept directory", "popup title"), dir);
|
||||||
|
|
||||||
autoAccept->setChecked(true);
|
autoAccept->setChecked(true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user