diff --git a/src/filetransferinstance.cpp b/src/filetransferinstance.cpp
index 158ddd65c..8880b044c 100644
--- a/src/filetransferinstance.cpp
+++ b/src/filetransferinstance.cpp
@@ -274,7 +274,7 @@ QString FileTransferInstance::QImage2base64(const QImage &img)
QString FileTransferInstance::getHtmlImage()
{
- qDebug() << "QString FileTransferInstance::getHtmlImage() " << state;
+ //qDebug() << "QString FileTransferInstance::getHtmlImage() " << state;
QString res;
if (state == tsPending || state == tsProcessing || state == tsPaused)
diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp
index 777a39b0a..125ef170a 100644
--- a/src/widget/form/chatform.cpp
+++ b/src/widget/form/chatform.cpp
@@ -102,24 +102,26 @@ void ChatForm::onSendTriggered()
void ChatForm::onAttachClicked()
{
- QString path = QFileDialog::getOpenFileName(0,tr("Send a file"));
- if (path.isEmpty())
+ QStringList paths = QFileDialog::getOpenFileNames(0,tr("Send a file"));
+ if (paths.isEmpty())
return;
-
- QFile file(path);
- if (!file.exists() || !file.open(QIODevice::ReadOnly))
- return;
- if (file.isSequential())
+ for (QString path : paths)
{
- QMessageBox::critical(0, "Bad Idea", "You're trying to send a special (sequential) file, that's not going to work!");
- return;
+ QFile file(path);
+ if (!file.exists() || !file.open(QIODevice::ReadOnly))
+ continue;
+ if (file.isSequential())
+ {
+ QMessageBox::critical(0, "Bad Idea", "You're trying to send a special (sequential) file, that's not going to work!");
+ file.close();
+ continue;
+ }
+ long long filesize = file.size();
file.close();
- }
- long long filesize = file.size();
- file.close();
- QFileInfo fi(path);
+ QFileInfo fi(path);
- emit sendFile(f->friendId, fi.fileName(), path, filesize);
+ emit sendFile(f->friendId, fi.fileName(), path, filesize);
+ }
}
void ChatForm::startFileSend(ToxFile file)
diff --git a/src/widget/form/settings/generalsettings.ui b/src/widget/form/settings/generalsettings.ui
index da70efdae..d5d3a2026 100644
--- a/src/widget/form/settings/generalsettings.ui
+++ b/src/widget/form/settings/generalsettings.ui
@@ -71,7 +71,7 @@
Qt::LeftToRight
- Auto away after:
+ Auto away after (0 to disable):
@@ -87,7 +87,7 @@
minutes
- 1
+ 0
600
@@ -106,14 +106,25 @@
-
-
-
- Smiley Pack
-
-
-
- -
-
+
+
-
+
+
+ Smiley Pack:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
-
@@ -170,14 +181,25 @@
-
-
-
- Style
-
-
-
- -
-
+
+
-
+
+
+ Style:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
diff --git a/src/widget/form/settings/identityform.cpp b/src/widget/form/settings/identityform.cpp
index d61a9fb18..a518730f4 100644
--- a/src/widget/form/settings/identityform.cpp
+++ b/src/widget/form/settings/identityform.cpp
@@ -168,10 +168,17 @@ void IdentityForm::onImportClicked()
QString path = QFileDialog::getOpenFileName(this, tr("Import profile", "import dialog title"), QDir::homePath(), tr("Tox save file (*.tox)", "import dialog filter"));
if (path.isEmpty())
return;
+
QFileInfo info(path);
+
+ if (info.suffix() != "tox")
+ {
+ QMessageBox::warning(this, tr("Ignoring non-Tox file", "popup title"), tr("Warning: you've chosen a file that is not a Tox save file; ignoring.", "popup text"));
+ return;
+ }
+
QString profile = info.completeBaseName();
QString profilePath = QDir(Settings::getSettingsDirPath()).filePath(profile + Core::TOX_EXT);
QFile::copy(path, profilePath);
bodyUI->profiles->addItem(profile);
- Core::getInstance()->switchConfiguration(profile);
}
diff --git a/src/widget/form/settings/identitysettings.ui b/src/widget/form/settings/identitysettings.ui
index 437495795..49314395b 100644
--- a/src/widget/form/settings/identitysettings.ui
+++ b/src/widget/form/settings/identitysettings.ui
@@ -75,7 +75,14 @@
-
-
+
+
+
+ 0
+ 0
+
+
+