From c079641fc184fbcc0992ec72d2f59a596d8bb3a2 Mon Sep 17 00:00:00 2001 From: agilob Date: Wed, 29 Oct 2014 20:24:56 +0000 Subject: [PATCH 1/2] prevent duplicating emoticons on the list --- src/misc/smileypack.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/misc/smileypack.cpp b/src/misc/smileypack.cpp index 48501403c..4f8881e54 100644 --- a/src/misc/smileypack.cpp +++ b/src/misc/smileypack.cpp @@ -68,11 +68,13 @@ QList > SmileyPack::listSmileyPacks(const QStringList &p QString relPath = QDir(QCoreApplication::applicationDirPath()).relativeFilePath(absPath); if (relPath.leftRef(2) == "..") - smileyPacks << QPair(packageName, absPath); - else - smileyPacks << QPair(packageName, relPath); // use relative path for subdirectories + { + if(!smileyPacks.contains(QPair(packageName, absPath))) + smileyPacks << QPair(packageName, absPath); + else if(!smileyPacks.contains(QPair(packageName, relPath))) + smileyPacks << QPair(packageName, relPath); // use relative path for subdirectories + } } - dir.cdUp(); } } From 3f4550951c7bb0d14f28b1c9c8b5abb9d36c5f6b Mon Sep 17 00:00:00 2001 From: agilob Date: Wed, 29 Oct 2014 20:27:46 +0000 Subject: [PATCH 2/2] network setting unification s/disable/enable/ UDP --- src/widget/form/settings/generalform.cpp | 4 ++-- src/widget/form/settings/generalsettings.ui | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/form/settings/generalform.cpp b/src/widget/form/settings/generalform.cpp index fbc500156..54650121c 100644 --- a/src/widget/form/settings/generalform.cpp +++ b/src/widget/form/settings/generalform.cpp @@ -62,7 +62,7 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : bodyUI->autoAwaySpinBox->setValue(Settings::getInstance().getAutoAwayTime()); - bodyUI->cbUDPDisabled->setChecked(Settings::getInstance().getForceTCP()); + bodyUI->cbUDPDisabled->setChecked(!Settings::getInstance().getForceTCP()); bodyUI->proxyAddr->setText(Settings::getInstance().getProxyAddr()); int port = Settings::getInstance().getProxyPort(); if (port != -1) @@ -153,7 +153,7 @@ void GeneralForm::onSmileyBrowserIndexChanged(int index) void GeneralForm::onUDPUpdated() { - Settings::getInstance().setForceTCP(bodyUI->cbUDPDisabled->isChecked()); + Settings::getInstance().setForceTCP(!bodyUI->cbUDPDisabled->isChecked()); } void GeneralForm::onProxyAddrEdited() diff --git a/src/widget/form/settings/generalsettings.ui b/src/widget/form/settings/generalsettings.ui index 3f9bb16ab..719f82cc8 100644 --- a/src/widget/form/settings/generalsettings.ui +++ b/src/widget/form/settings/generalsettings.ui @@ -299,7 +299,7 @@ This allows, e.g., toxing over Tor. It adds load to the Tox network however, so use only when necessary. - Disable UDP (not recommended) + Enable UDP (recommended)