1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(GUI): Move remaining messsage box functionality to new class

* Pass MessageBoxManager instantiation around instead of relying on a singleton
* Mock MessageBoxManager for unit tests when needed, since they don't have a
  QApplication which is required for creating QWidgets
* Remove GUI class, which didn't have a clear purpose
This commit is contained in:
Anthony Bilinski 2022-03-13 06:04:24 -07:00
parent 3bd85452da
commit b24faabf42
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
111 changed files with 973 additions and 755 deletions

View File

@ -448,8 +448,6 @@ set(${PROJECT_NAME}_SOURCES
src/widget/genericchatroomwidget.h src/widget/genericchatroomwidget.h
src/widget/groupwidget.cpp src/widget/groupwidget.cpp
src/widget/groupwidget.h src/widget/groupwidget.h
src/widget/gui.cpp
src/widget/gui.h
src/widget/loginscreen.cpp src/widget/loginscreen.cpp
src/widget/loginscreen.h src/widget/loginscreen.h
src/widget/maskablepixmapwidget.cpp src/widget/maskablepixmapwidget.cpp
@ -470,6 +468,10 @@ set(${PROJECT_NAME}_SOURCES
src/widget/tool/activatedialog.h src/widget/tool/activatedialog.h
src/widget/tool/adjustingscrollarea.cpp src/widget/tool/adjustingscrollarea.cpp
src/widget/tool/adjustingscrollarea.h src/widget/tool/adjustingscrollarea.h
src/widget/tool/imessageboxmanager.h
src/widget/tool/imessageboxmanager.cpp
src/widget/tool/messageboxmanager.cpp
src/widget/tool/messageboxmanager.h
src/widget/tool/callconfirmwidget.cpp src/widget/tool/callconfirmwidget.cpp
src/widget/tool/callconfirmwidget.h src/widget/tool/callconfirmwidget.h
src/widget/tool/chattextedit.cpp src/widget/tool/chattextedit.cpp

View File

@ -395,7 +395,6 @@ The following example demonstrates the above include rules:
#include "persistence/profile.h" #include "persistence/profile.h"
#include "persistence/profilelocker.h" #include "persistence/profilelocker.h"
#include "persistence/settings.h" #include "persistence/settings.h"
#include "widget/gui.h"
#include <QCoreApplication> #include <QCoreApplication>
#include <QThread> #include <QThread>

View File

@ -173,10 +173,10 @@ ChatMessage::Ptr ChatMessage::createChatInfoMessage(const QString& rawMessage,
return msg; return msg;
} }
ChatMessage::Ptr ChatMessage::createFileTransferMessage(const QString& sender, CoreFile& coreFile, ChatMessage::Ptr ChatMessage::createFileTransferMessage(
ToxFile file, bool isMe, const QDateTime& date, const QString& sender, CoreFile& coreFile, ToxFile file, bool isMe,
DocumentCache& documentCache, const QDateTime& date, DocumentCache& documentCache, Settings& settings,
Settings& settings, Style& style) Style& style, IMessageBoxManager& messageBoxManager)
{ {
ChatMessage::Ptr msg = ChatMessage::Ptr(new ChatMessage(documentCache, settings, style)); ChatMessage::Ptr msg = ChatMessage::Ptr(new ChatMessage(documentCache, settings, style));
@ -189,7 +189,7 @@ ChatMessage::Ptr ChatMessage::createFileTransferMessage(const QString& sender, C
msg->addColumn(new Text(documentCache, settings, style, sender, authorFont, true), msg->addColumn(new Text(documentCache, settings, style, sender, authorFont, true),
ColumnFormat(NAME_COL_WIDTH, ColumnFormat::FixedSize, ColumnFormat::Right)); ColumnFormat(NAME_COL_WIDTH, ColumnFormat::FixedSize, ColumnFormat::Right));
msg->addColumn(new ChatLineContentProxy(new FileTransferWidget( msg->addColumn(new ChatLineContentProxy(new FileTransferWidget(
nullptr, coreFile, file, settings, style), 320, 0.6f), nullptr, coreFile, file, settings, style, messageBoxManager), 320, 0.6f),
ColumnFormat(1.0, ColumnFormat::VariableSize)); ColumnFormat(1.0, ColumnFormat::VariableSize));
msg->addColumn(new Timestamp(date, settings.getTimestampFormat(), baseFont, msg->addColumn(new Timestamp(date, settings.getTimestampFormat(), baseFont,
documentCache, settings, style), documentCache, settings, style),

View File

@ -31,6 +31,7 @@ class DocumentCache;
class SmileyPack; class SmileyPack;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class ChatMessage : public ChatLine class ChatMessage : public ChatLine
{ {
@ -65,7 +66,7 @@ public:
Style& style); Style& style);
static ChatMessage::Ptr createFileTransferMessage(const QString& sender, CoreFile& coreFile, static ChatMessage::Ptr createFileTransferMessage(const QString& sender, CoreFile& coreFile,
ToxFile file, bool isMe, const QDateTime& date, ToxFile file, bool isMe, const QDateTime& date,
DocumentCache& documentCache, Settings& settings, Style& style); DocumentCache& documentCache, Settings& settings, Style& style, IMessageBoxManager& messageBoxManager);
static ChatMessage::Ptr createTypingNotification(DocumentCache& documentCache, Settings& settings, Style& style); static ChatMessage::Ptr createTypingNotification(DocumentCache& documentCache, Settings& settings, Style& style);
static ChatMessage::Ptr createBusyNotification(DocumentCache& documentCache, Settings& settings, Style& style); static ChatMessage::Ptr createBusyNotification(DocumentCache& documentCache, Settings& settings, Style& style);

View File

@ -23,7 +23,6 @@
#include "chatmessage.h" #include "chatmessage.h"
#include "content/filetransferwidget.h" #include "content/filetransferwidget.h"
#include "content/text.h" #include "content/text.h"
#include "src/widget/gui.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
@ -211,7 +210,8 @@ ChatLogIdx clampedAdd(ChatLogIdx idx, int val, IChatLog& chatLog)
ChatWidget::ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& documentCache_, ChatWidget::ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& documentCache_,
SmileyPack& smileyPack_, Settings& settings_, Style& style_, QWidget* parent) SmileyPack& smileyPack_, Settings& settings_, Style& style_,
IMessageBoxManager& messageBoxManager_, QWidget* parent)
: QGraphicsView(parent) : QGraphicsView(parent)
, selectionRectColor{style_.getColor(Style::ColorPalette::SelectText)} , selectionRectColor{style_.getColor(Style::ColorPalette::SelectText)}
, chatLog(chatLog_) , chatLog(chatLog_)
@ -221,6 +221,7 @@ ChatWidget::ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& doc
, smileyPack{smileyPack_} , smileyPack{smileyPack_}
, settings(settings_) , settings(settings_)
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
// Create the scene // Create the scene
busyScene = new QGraphicsScene(this); busyScene = new QGraphicsScene(this);
@ -1460,7 +1461,7 @@ void ChatWidget::renderFile(QString displayName, ToxFile file, bool isSelf, QDat
CoreFile* coreFile = core.getCoreFile(); CoreFile* coreFile = core.getCoreFile();
assert(coreFile); assert(coreFile);
chatMessage = ChatMessage::createFileTransferMessage(displayName, *coreFile, chatMessage = ChatMessage::createFileTransferMessage(displayName, *coreFile,
file, isSelf, timestamp, documentCache, settings, style); file, isSelf, timestamp, documentCache, settings, style, messageBoxManager);
} else { } else {
auto proxy = static_cast<ChatLineContentProxy*>(chatMessage->getContent(1)); auto proxy = static_cast<ChatLineContentProxy*>(chatMessage->getContent(1));
assert(proxy->getWidgetType() == ChatLineContentProxy::FileTransferWidgetType); assert(proxy->getWidgetType() == ChatLineContentProxy::FileTransferWidgetType);

View File

@ -37,6 +37,7 @@ class SmileyPack;
class Settings; class Settings;
class Style; class Style;
class ChatLineStorage; class ChatLineStorage;
class IMessageBoxManager;
static const size_t DEF_NUM_MSG_TO_LOAD = 100; static const size_t DEF_NUM_MSG_TO_LOAD = 100;
class ChatWidget : public QGraphicsView class ChatWidget : public QGraphicsView
@ -44,7 +45,8 @@ class ChatWidget : public QGraphicsView
Q_OBJECT Q_OBJECT
public: public:
ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& documentCache, ChatWidget(IChatLog& chatLog_, const Core& core_, DocumentCache& documentCache,
SmileyPack& smileyPack, Settings& settings, Style& style, QWidget* parent = nullptr); SmileyPack& smileyPack, Settings& settings, Style& style,
IMessageBoxManager& messageBoxManager, QWidget* parent = nullptr);
virtual ~ChatWidget(); virtual ~ChatWidget();
void insertChatlines(std::map<ChatLogIdx, ChatLine::Ptr> chatLines); void insertChatlines(std::map<ChatLogIdx, ChatLine::Ptr> chatLines);
@ -220,4 +222,5 @@ private:
SmileyPack& smileyPack; SmileyPack& smileyPack;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -22,9 +22,9 @@
#include "src/core/corefile.h" #include "src/core/corefile.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/widget/tool/imessageboxmanager.h"
#include "src/model/exiftransform.h" #include "src/model/exiftransform.h"
#include "util/display.h" #include "util/display.h"
@ -49,7 +49,7 @@
// downloaded to. // downloaded to.
FileTransferWidget::FileTransferWidget(QWidget* parent, CoreFile& _coreFile, FileTransferWidget::FileTransferWidget(QWidget* parent, CoreFile& _coreFile,
ToxFile file, Settings& settings_, Style& style_) ToxFile file, Settings& settings_, Style& style_, IMessageBoxManager& messageBoxManager_)
: QWidget(parent) : QWidget(parent)
, coreFile{_coreFile} , coreFile{_coreFile}
, ui(new Ui::FileTransferWidget) , ui(new Ui::FileTransferWidget)
@ -60,6 +60,7 @@ FileTransferWidget::FileTransferWidget(QWidget* parent, CoreFile& _coreFile,
, active(true) , active(true)
, settings(settings_) , settings(settings_)
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
ui->setupUi(this); ui->setupUi(this);
@ -140,7 +141,7 @@ void FileTransferWidget::acceptTransfer(const QString& filepath)
// test if writable // test if writable
if (!tryRemoveFile(filepath)) { if (!tryRemoveFile(filepath)) {
GUI::showWarning(tr("Location not writable", "Title of permissions popup"), messageBoxManager.showWarning(tr("Location not writable", "Title of permissions popup"),
tr("You do not have permission to write that location. Choose another, or " tr("You do not have permission to write that location. Choose another, or "
"cancel the save dialog.", "cancel the save dialog.",
"text of permissions popup")); "text of permissions popup"));
@ -477,7 +478,7 @@ void FileTransferWidget::handleButton(QPushButton* btn)
} }
if (btn->objectName() == "ok" || btn->objectName() == "previewButton") { if (btn->objectName() == "ok" || btn->objectName() == "previewButton") {
Widget::confirmExecutableOpen(QFileInfo(fileInfo.filePath)); messageBoxManager.confirmExecutableOpen(QFileInfo(fileInfo.filePath));
} else if (btn->objectName() == "dir") { } else if (btn->objectName() == "dir") {
QString dirPath = QFileInfo(fileInfo.filePath).dir().path(); QString dirPath = QFileInfo(fileInfo.filePath).dir().path();
QDesktopServices::openUrl(QUrl::fromLocalFile(dirPath)); QDesktopServices::openUrl(QUrl::fromLocalFile(dirPath));

View File

@ -35,6 +35,7 @@ class QVariantAnimation;
class QPushButton; class QPushButton;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class FileTransferWidget : public QWidget class FileTransferWidget : public QWidget
{ {
@ -42,7 +43,7 @@ class FileTransferWidget : public QWidget
public: public:
FileTransferWidget(QWidget* parent, CoreFile& _coreFile, ToxFile file, FileTransferWidget(QWidget* parent, CoreFile& _coreFile, ToxFile file,
Settings& settings, Style& style); Settings& settings, Style& style, IMessageBoxManager& messageBoxManager);
virtual ~FileTransferWidget(); virtual ~FileTransferWidget();
bool isActive() const; bool isActive() const;
void onFileTransferUpdate(ToxFile file); void onFileTransferUpdate(ToxFile file);
@ -93,4 +94,5 @@ private:
ToxFile::FileStatus lastStatus = ToxFile::INITIALIZING; ToxFile::FileStatus lastStatus = ToxFile::INITIALIZING;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -27,6 +27,7 @@
#include "src/video/camerasource.h" #include "src/video/camerasource.h"
#include "src/widget/loginscreen.h" #include "src/widget/loginscreen.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/tool/messageboxmanager.h"
#include "widget/widget.h" #include "widget/widget.h"
#include <QApplication> #include <QApplication>
#include <QCommandLineParser> #include <QCommandLineParser>
@ -57,6 +58,7 @@ QMutex* logBufferMutex = new QMutex();
std::unique_ptr<Settings> settings; std::unique_ptr<Settings> settings;
std::unique_ptr<ToxSave> toxSave; std::unique_ptr<ToxSave> toxSave;
std::unique_ptr<MessageBoxManager> messageBoxManager;
void cleanup() void cleanup()
{ {
@ -236,7 +238,8 @@ int main(int argc, char* argv[])
qWarning() << "Couldn't load font"; qWarning() << "Couldn't load font";
} }
settings = std::unique_ptr<Settings>(new Settings()); messageBoxManager = std::unique_ptr<MessageBoxManager>(new MessageBoxManager());
settings = std::unique_ptr<Settings>(new Settings(*messageBoxManager));
QString locale = settings->getTranslation(); QString locale = settings->getTranslation();
// We need to init the resources in the translations_library explicitely. // We need to init the resources in the translations_library explicitely.
@ -406,13 +409,14 @@ int main(int argc, char* argv[])
// note: Because Settings is shouldering global settings as well as model specific ones it // note: Because Settings is shouldering global settings as well as model specific ones it
// cannot be integrated into a central model object yet // cannot be integrated into a central model object yet
nexus.setSettings(settings.get()); nexus.setSettings(settings.get());
nexus.setMessageBoxManager(messageBoxManager.get());
auto& cameraSource = Nexus::getCameraSource(); auto& cameraSource = Nexus::getCameraSource();
// Autologin // Autologin
// TODO (kriby): Shift responsibility of linking views to model objects from nexus // TODO (kriby): Shift responsibility of linking views to model objects from nexus
// Further: generate view instances separately (loginScreen, mainGUI, audio) // Further: generate view instances separately (loginScreen, mainGUI, audio)
Profile* profile = nullptr; Profile* profile = nullptr;
if (autoLogin && Profile::exists(profileName, settings->getPaths()) && !Profile::isEncrypted(profileName, settings->getPaths())) { if (autoLogin && Profile::exists(profileName, settings->getPaths()) && !Profile::isEncrypted(profileName, settings->getPaths())) {
profile = Profile::loadProfile(profileName, QString(), *settings, &parser, cameraSource); profile = Profile::loadProfile(profileName, QString(), *settings, &parser, cameraSource, *messageBoxManager);
if (!profile) { if (!profile) {
QMessageBox::information(nullptr, QObject::tr("Error"), QMessageBox::information(nullptr, QObject::tr("Error"),
QObject::tr("Failed to load profile automatically.")); QObject::tr("Failed to load profile automatically."));
@ -429,7 +433,7 @@ int main(int argc, char* argv[])
profile = nexus.getProfile(); profile = nexus.getProfile();
} }
uriDialog = std::unique_ptr<ToxURIDialog>(new ToxURIDialog(nullptr, profile->getCore())); uriDialog = std::unique_ptr<ToxURIDialog>(new ToxURIDialog(nullptr, profile->getCore(), *messageBoxManager));
if (ipc.isAttached()) { if (ipc.isAttached()) {
// Start to accept Inter-process communication // Start to accept Inter-process communication

View File

@ -19,7 +19,7 @@
#include "src/net/toxuri.h" #include "src/net/toxuri.h"
#include "src/core/core.h" #include "src/core/core.h"
#include "src/widget/gui.h" #include "src/widget/tool/imessageboxmanager.h"
#include <QByteArray> #include <QByteArray>
#include <QCoreApplication> #include <QCoreApplication>
#include <QDialogButtonBox> #include <QDialogButtonBox>
@ -52,7 +52,7 @@ bool ToxURIDialog::handleToxURI(const QString& toxURI)
} }
if (!error.isEmpty()) { if (!error.isEmpty()) {
GUI::showWarning(QMessageBox::tr("Couldn't add friend"), error); messageBoxManager.showWarning(QMessageBox::tr("Couldn't add friend"), error);
return false; return false;
} }
@ -72,9 +72,10 @@ void ToxURIDialog::setUserId(const QString& userId)
userIdEdit->setText(userId); userIdEdit->setText(userId);
} }
ToxURIDialog::ToxURIDialog(QWidget* parent, Core& _core) ToxURIDialog::ToxURIDialog(QWidget* parent, Core& core_, IMessageBoxManager& messageBoxManager_)
: QDialog(parent) : QDialog(parent)
, core{_core} , core{core_}
, messageBoxManager{messageBoxManager_}
{ {
const QString defaultMessage = const QString defaultMessage =
QObject::tr("%1 here! Tox me maybe?", QObject::tr("%1 here! Tox me maybe?",

View File

@ -28,11 +28,12 @@ class QByteArray;
class QLabel; class QLabel;
class QLineEdit; class QLineEdit;
class QPlainTextEdit; class QPlainTextEdit;
class IMessageBoxManager;
class ToxURIDialog : public QDialog class ToxURIDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ToxURIDialog(QWidget* parent, Core& _core); ToxURIDialog(QWidget* parent, Core& core, IMessageBoxManager& messageBoxManager);
QString getRequestMessage(); QString getRequestMessage();
bool handleToxURI(const QString& toxURI); bool handleToxURI(const QString& toxURI);
@ -44,4 +45,5 @@ private:
QLabel* friendsLabel; QLabel* friendsLabel;
QLineEdit* userIdEdit; QLineEdit* userIdEdit;
Core& core; Core& core;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -28,8 +28,8 @@
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "video/camerasource.h" #include "video/camerasource.h"
#include "widget/gui.h"
#include "widget/loginscreen.h" #include "widget/loginscreen.h"
#include "src/widget/tool/messageboxmanager.h"
#include "audio/audio.h" #include "audio/audio.h"
#include <QApplication> #include <QApplication>
@ -235,11 +235,10 @@ void Nexus::showMainGUI()
assert(profile); assert(profile);
// Create GUI // Create GUI
widget = new Widget(*profile, *audioControl, *cameraSource, *settings, *style); widget = new Widget(*profile, *audioControl, *cameraSource, *settings, *style, *messageBoxManager);
// Start GUI // Start GUI
widget->init(); widget->init();
GUI::getInstance();
// Zetok protection // Zetok protection
// There are small instants on startup during which no // There are small instants on startup during which no
@ -308,7 +307,8 @@ Profile* Nexus::getProfile()
*/ */
void Nexus::onCreateNewProfile(const QString& name, const QString& pass) void Nexus::onCreateNewProfile(const QString& name, const QString& pass)
{ {
setProfile(Profile::createProfile(name, pass, *settings, parser, *cameraSource)); setProfile(Profile::createProfile(name, pass, *settings, parser, *cameraSource,
*messageBoxManager));
parser = nullptr; // only apply cmdline proxy settings once parser = nullptr; // only apply cmdline proxy settings once
} }
@ -317,7 +317,8 @@ void Nexus::onCreateNewProfile(const QString& name, const QString& pass)
*/ */
void Nexus::onLoadProfile(const QString& name, const QString& pass) void Nexus::onLoadProfile(const QString& name, const QString& pass)
{ {
setProfile(Profile::loadProfile(name, pass, *settings, parser, *cameraSource)); setProfile(Profile::loadProfile(name, pass, *settings, parser, *cameraSource,
*messageBoxManager));
parser = nullptr; // only apply cmdline proxy settings once parser = nullptr; // only apply cmdline proxy settings once
} }
/** /**
@ -356,6 +357,11 @@ CameraSource& Nexus::getCameraSource()
return *getInstance().cameraSource; return *getInstance().cameraSource;
} }
void Nexus::setMessageBoxManager(IMessageBoxManager* messageBoxManager_)
{
messageBoxManager = messageBoxManager_;
}
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
void Nexus::retranslateUi() void Nexus::retranslateUi()
{ {

View File

@ -34,6 +34,7 @@ class Core;
class QCommandLineParser; class QCommandLineParser;
class CameraSource; class CameraSource;
class Style; class Style;
class IMessageBoxManager;
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
class QMenuBar; class QMenuBar;
@ -51,6 +52,7 @@ public:
void start(); void start();
void showMainGUI(); void showMainGUI();
void setSettings(Settings* settings_); void setSettings(Settings* settings_);
void setMessageBoxManager(IMessageBoxManager* messageBoxManager);
void setParser(QCommandLineParser* parser_); void setParser(QCommandLineParser* parser_);
static Nexus& getInstance(); static Nexus& getInstance();
static void destroyInstance(); static void destroyInstance();
@ -111,4 +113,5 @@ private:
QCommandLineParser* parser = nullptr; QCommandLineParser* parser = nullptr;
std::unique_ptr<CameraSource> cameraSource; std::unique_ptr<CameraSource> cameraSource;
std::unique_ptr<Style> style; std::unique_ptr<Style> style;
IMessageBoxManager* messageBoxManager = nullptr;
}; };

View File

@ -37,9 +37,9 @@
#include "src/net/avatarbroadcaster.h" #include "src/net/avatarbroadcaster.h"
#include "src/net/bootstrapnodeupdater.h" #include "src/net/bootstrapnodeupdater.h"
#include "src/nexus.h" #include "src/nexus.h"
#include "src/widget/gui.h"
#include "src/widget/tool/identicon.h" #include "src/widget/tool/identicon.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/widget/tool/imessageboxmanager.h"
namespace { namespace {
enum class LoadToxDataError enum class LoadToxDataError
@ -294,13 +294,15 @@ void Profile::initCore(const QByteArray& toxsave, Settings& s, bool isNewProfile
avatarBroadcaster = std::unique_ptr<AvatarBroadcaster>(new AvatarBroadcaster(*core)); avatarBroadcaster = std::unique_ptr<AvatarBroadcaster>(new AvatarBroadcaster(*core));
} }
Profile::Profile(const QString& name_, std::unique_ptr<ToxEncrypt> passkey_, Paths& paths_, Settings& settings_) Profile::Profile(const QString& name_, std::unique_ptr<ToxEncrypt> passkey_, Paths& paths_,
Settings& settings_, IMessageBoxManager& messageBoxManager_)
: name{name_} : name{name_}
, passkey{std::move(passkey_)} , passkey{std::move(passkey_)}
, isRemoved{false} , isRemoved{false}
, encrypted{passkey != nullptr} , encrypted{passkey != nullptr}
, paths{paths_} , paths{paths_}
, settings{settings_} , settings{settings_}
, messageBoxManager{messageBoxManager_}
{} {}
/** /**
@ -312,7 +314,8 @@ Profile::Profile(const QString& name_, std::unique_ptr<ToxEncrypt> passkey_, Pat
* @note If the profile is already in use return nullptr. * @note If the profile is already in use return nullptr.
*/ */
Profile* Profile::loadProfile(const QString& name, const QString& password, Settings& settings, Profile* Profile::loadProfile(const QString& name, const QString& password, Settings& settings,
const QCommandLineParser* parser, CameraSource& cameraSource) const QCommandLineParser* parser, CameraSource& cameraSource,
IMessageBoxManager& messageBoxManager)
{ {
if (ProfileLocker::hasLock()) { if (ProfileLocker::hasLock()) {
qCritical() << "Tried to load profile " << name << ", but another profile is already locked!"; qCritical() << "Tried to load profile " << name << ", but another profile is already locked!";
@ -334,7 +337,7 @@ Profile* Profile::loadProfile(const QString& name, const QString& password, Sett
return nullptr; return nullptr;
} }
Profile* p = new Profile(name, std::move(tmpKey), paths, settings); Profile* p = new Profile(name, std::move(tmpKey), paths, settings, messageBoxManager);
// Core settings are saved per profile, need to load them before starting Core // Core settings are saved per profile, need to load them before starting Core
constexpr bool isNewProfile = false; constexpr bool isNewProfile = false;
@ -355,7 +358,8 @@ Profile* Profile::loadProfile(const QString& name, const QString& password, Sett
* @note If the profile is already in use return nullptr. * @note If the profile is already in use return nullptr.
*/ */
Profile* Profile::createProfile(const QString& name, const QString& password, Settings& settings, Profile* Profile::createProfile(const QString& name, const QString& password, Settings& settings,
const QCommandLineParser* parser, CameraSource& cameraSource) const QCommandLineParser* parser, CameraSource& cameraSource,
IMessageBoxManager& messageBoxManager)
{ {
CreateToxDataError error; CreateToxDataError error;
Paths& paths = settings.getPaths(); Paths& paths = settings.getPaths();
@ -367,7 +371,7 @@ Profile* Profile::createProfile(const QString& name, const QString& password, Se
} }
settings.createPersonal(name); settings.createPersonal(name);
Profile* p = new Profile(name, std::move(tmpKey), paths, settings); Profile* p = new Profile(name, std::move(tmpKey), paths, settings, messageBoxManager);
constexpr bool isNewProfile = true; constexpr bool isNewProfile = true;
settings.updateProfileData(p, parser, isNewProfile); settings.updateProfileData(p, parser, isNewProfile);
@ -629,7 +633,7 @@ void Profile::loadDatabase(QString password)
QByteArray salt = core->getSelfPublicKey().getByteArray(); QByteArray salt = core->getSelfPublicKey().getByteArray();
if (salt.size() != TOX_PASS_SALT_LENGTH) { if (salt.size() != TOX_PASS_SALT_LENGTH) {
qWarning() << "Couldn't compute salt from public key" << name; qWarning() << "Couldn't compute salt from public key" << name;
GUI::showError(QObject::tr("Error"), messageBoxManager.showError(QObject::tr("Error"),
QObject::tr("qTox couldn't open your chat logs, they will be disabled.")); QObject::tr("qTox couldn't open your chat logs, they will be disabled."));
} }
// At this point it's too early to load the personal settings (Nexus will do it), so we always // At this point it's too early to load the personal settings (Nexus will do it), so we always
@ -641,7 +645,7 @@ void Profile::loadDatabase(QString password)
history.reset(new History(database, settings)); history.reset(new History(database, settings));
} else { } else {
qWarning() << "Failed to open database for profile" << name; qWarning() << "Failed to open database for profile" << name;
GUI::showError(QObject::tr("Error"), messageBoxManager.showError(QObject::tr("Error"),
QObject::tr("qTox couldn't open your chat logs, they will be disabled.")); QObject::tr("qTox couldn't open your chat logs, they will be disabled."));
} }
} }

View File

@ -39,6 +39,7 @@ class Settings;
class QCommandLineParser; class QCommandLineParser;
class ToxPk; class ToxPk;
class CameraSource; class CameraSource;
class IMessageBoxManager;
class Profile : public QObject class Profile : public QObject
{ {
@ -46,9 +47,10 @@ class Profile : public QObject
public: public:
static Profile* loadProfile(const QString& name, const QString& password, Settings& settings, static Profile* loadProfile(const QString& name, const QString& password, Settings& settings,
const QCommandLineParser* parser, CameraSource& cameraSource); const QCommandLineParser* parser, CameraSource& cameraSource,
IMessageBoxManager& messageBoxManager);
static Profile* createProfile(const QString& name, const QString& password, Settings& settings, static Profile* createProfile(const QString& name, const QString& password, Settings& settings,
const QCommandLineParser* parser, CameraSource& cameraSource); const QCommandLineParser* parser, CameraSource& cameraSource, IMessageBoxManager& messageBoxManager);
~Profile(); ~Profile();
Core& getCore() const; Core& getCore() const;
@ -105,7 +107,8 @@ private slots:
void onAvatarOfferReceived(uint32_t friendId, uint32_t fileId, const QByteArray& avatarHash, uint64_t filesize); void onAvatarOfferReceived(uint32_t friendId, uint32_t fileId, const QByteArray& avatarHash, uint64_t filesize);
private: private:
Profile(const QString& name_, std::unique_ptr<ToxEncrypt> passkey_, Paths& paths_, Settings &settings_); Profile(const QString& name_, std::unique_ptr<ToxEncrypt> passkey_, Paths& paths_,
Settings &settings_, IMessageBoxManager& messageBoxManager);
static QStringList getFilesByExt(QString extension, Settings& settings); static QStringList getFilesByExt(QString extension, Settings& settings);
QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false); QString avatarPath(const ToxPk& owner, bool forceUnencrypted = false);
bool saveToxSave(QByteArray data); bool saveToxSave(QByteArray data);
@ -125,4 +128,5 @@ private:
std::unique_ptr<BootstrapNodeUpdater> bootstrapNodes; std::unique_ptr<BootstrapNodeUpdater> bootstrapNodes;
Paths& paths; Paths& paths;
Settings& settings; Settings& settings;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -28,8 +28,8 @@
#include "src/persistence/globalsettingsupgrader.h" #include "src/persistence/globalsettingsupgrader.h"
#include "src/persistence/personalsettingsupgrader.h" #include "src/persistence/personalsettingsupgrader.h"
#include "src/persistence/smileypack.h" #include "src/persistence/smileypack.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/tool/imessageboxmanager.h"
#ifdef QTOX_PLATFORM_EXT #ifdef QTOX_PLATFORM_EXT
#include "src/platform/autorun.h" #include "src/platform/autorun.h"
#endif #endif
@ -66,10 +66,11 @@ QThread* Settings::settingsThread{nullptr};
static constexpr int GLOBAL_SETTINGS_VERSION = 1; static constexpr int GLOBAL_SETTINGS_VERSION = 1;
static constexpr int PERSONAL_SETTINGS_VERSION = 1; static constexpr int PERSONAL_SETTINGS_VERSION = 1;
Settings::Settings() Settings::Settings(IMessageBoxManager& messageBoxManager_)
: loaded(false) : loaded(false)
, useCustomDhtList{false} , useCustomDhtList{false}
, currentProfileId(0) , currentProfileId(0)
, messageBoxManager{messageBoxManager_}
{ {
settingsThread = new QThread(); settingsThread = new QThread();
settingsThread->setObjectName("qTox Settings"); settingsThread->setObjectName("qTox Settings");
@ -491,7 +492,7 @@ void Settings::loadPersonal(QString profileName, const ToxEncrypt* passKey, bool
auto upgradeSuccess = PersonalSettingsUpgrader::doUpgrade(ps, personalSettingsVersion, PERSONAL_SETTINGS_VERSION); auto upgradeSuccess = PersonalSettingsUpgrader::doUpgrade(ps, personalSettingsVersion, PERSONAL_SETTINGS_VERSION);
if (!upgradeSuccess) { if (!upgradeSuccess) {
GUI::showError(tr("Failed to load personal settings"), messageBoxManager.showError(tr("Failed to load personal settings"),
tr("Unable to upgrade settings from version %1 to version %2. Cannot start qTox.") tr("Unable to upgrade settings from version %1 to version %2. Cannot start qTox.")
.arg(personalSettingsVersion) .arg(personalSettingsVersion)
.arg(PERSONAL_SETTINGS_VERSION)); .arg(PERSONAL_SETTINGS_VERSION));

View File

@ -44,6 +44,7 @@
class Profile; class Profile;
class QCommandLineParser; class QCommandLineParser;
class IMessageBoxManager;
namespace Db { namespace Db {
enum class syncType; enum class syncType;
@ -147,7 +148,7 @@ public:
}; };
public: public:
Settings(); explicit Settings(IMessageBoxManager& messageBoxManager);
~Settings(); ~Settings();
Settings(Settings& settings) = delete; Settings(Settings& settings) = delete;
Settings& operator=(const Settings&) = delete; Settings& operator=(const Settings&) = delete;
@ -716,4 +717,5 @@ private:
Paths paths; Paths paths;
int globalSettingsVersion = 0; int globalSettingsVersion = 0;
int personalSettingsVersion = 0; int personalSettingsVersion = 0;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -19,7 +19,6 @@
#include "toxsave.h" #include "toxsave.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/gui.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/nexus.h" #include "src/nexus.h"
#include "src/widget/tool/profileimporter.h" #include "src/widget/tool/profileimporter.h"

View File

@ -18,7 +18,7 @@
*/ */
#include "aboutfriendform.h" #include "aboutfriendform.h"
#include "src/widget/gui.h" #include "src/widget/tool/imessageboxmanager.h"
#include "ui_aboutfriendform.h" #include "ui_aboutfriendform.h"
#include "src/core/core.h" #include "src/core/core.h"
#include "src/widget/style.h" #include "src/widget/style.h"
@ -37,12 +37,13 @@ QString getAutoAcceptDir(const QString& dir)
} // namespace } // namespace
AboutFriendForm::AboutFriendForm(std::unique_ptr<IAboutFriend> about_, AboutFriendForm::AboutFriendForm(std::unique_ptr<IAboutFriend> about_,
Settings& settings_, Style& style_, QWidget* parent) Settings& settings_, Style& style_, IMessageBoxManager& messageBoxManager_, QWidget* parent)
: QDialog(parent) : QDialog(parent)
, ui(new Ui::AboutFriendForm) , ui(new Ui::AboutFriendForm)
, about{std::move(about_)} , about{std::move(about_)}
, settings{settings_} , settings{settings_}
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
ui->setupUi(this); ui->setupUi(this);
ui->label_4->hide(); ui->label_4->hide();
@ -143,7 +144,7 @@ void AboutFriendForm::onAcceptedClicked()
void AboutFriendForm::onRemoveHistoryClicked() void AboutFriendForm::onRemoveHistoryClicked()
{ {
const bool retYes = GUI::askQuestion(tr("Confirmation"), const bool retYes = messageBoxManager.askQuestion(tr("Confirmation"),
tr("Are you sure to remove %1 chat history?").arg(about->getName()), tr("Are you sure to remove %1 chat history?").arg(about->getName()),
/* defaultAns = */ false, /* warning = */ true, /* yesno = */ true); /* defaultAns = */ false, /* warning = */ true, /* yesno = */ true);
if (!retYes) { if (!retYes) {
@ -153,7 +154,7 @@ void AboutFriendForm::onRemoveHistoryClicked()
const bool result = about->clearHistory(); const bool result = about->clearHistory();
if (!result) { if (!result) {
GUI::showWarning(tr("History removed"), messageBoxManager.showWarning(tr("History removed"),
tr("Failed to remove chat history with %1!").arg(about->getName()).toHtmlEscaped()); tr("Failed to remove chat history with %1!").arg(about->getName()).toHtmlEscaped());
return; return;
} }

View File

@ -32,6 +32,7 @@ class AboutFriendForm;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class AboutFriendForm : public QDialog class AboutFriendForm : public QDialog
{ {
@ -39,7 +40,7 @@ class AboutFriendForm : public QDialog
public: public:
AboutFriendForm(std::unique_ptr<IAboutFriend> about, Settings& settings, AboutFriendForm(std::unique_ptr<IAboutFriend> about, Settings& settings,
Style& style, QWidget* parent = nullptr); Style& style, IMessageBoxManager& messageBoxManager, QWidget* parent = nullptr);
~AboutFriendForm(); ~AboutFriendForm();
private: private:
@ -47,6 +48,7 @@ private:
const std::unique_ptr<IAboutFriend> about; const std::unique_ptr<IAboutFriend> about;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
signals: signals:
void histroyRemoved(); void histroyRemoved();

View File

@ -22,7 +22,6 @@
#include "src/model/status.h" #include "src/model/status.h"
#include "src/widget/gui.h"
#include "src/widget/maskablepixmapwidget.h" #include "src/widget/maskablepixmapwidget.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/tool/callconfirmwidget.h" #include "src/widget/tool/callconfirmwidget.h"

View File

@ -41,12 +41,13 @@
QHash<int, CircleWidget*> CircleWidget::circleList; QHash<int, CircleWidget*> CircleWidget::circleList;
CircleWidget::CircleWidget(const Core &core_, FriendListWidget* parent, int id_, CircleWidget::CircleWidget(const Core &core_, FriendListWidget* parent, int id_,
Settings& settings_, Style& style_) Settings& settings_, Style& style_, IMessageBoxManager& messageBoxManager_)
: CategoryWidget(isCompact(), settings_, style_, parent) : CategoryWidget(isCompact(), settings_, style_, parent)
, id(id_) , id(id_)
, core{core_} , core{core_}
, settings{settings_} , settings{settings_}
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
setName(settings.getCircleName(id), false); setName(settings.getCircleName(id), false);
circleList[id] = this; circleList[id] = this;
@ -117,7 +118,7 @@ void CircleWidget::contextMenuEvent(QContextMenuEvent* event)
circleList.remove(replacedCircle); circleList.remove(replacedCircle);
} else if (selectedItem == openAction) { } else if (selectedItem == openAction) {
ContentDialog* dialog = new ContentDialog(core, settings, style); ContentDialog* dialog = new ContentDialog(core, settings, style, messageBoxManager);
emit newContentDialog(*dialog); emit newContentDialog(*dialog);
for (int i = 0; i < friendOnlineLayout()->count(); ++i) { for (int i = 0; i < friendOnlineLayout()->count(); ++i) {
QWidget* const widget = friendOnlineLayout()->itemAt(i)->widget(); QWidget* const widget = friendOnlineLayout()->itemAt(i)->widget();

View File

@ -25,13 +25,14 @@ class ContentDialog;
class Core; class Core;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class CircleWidget final : public CategoryWidget class CircleWidget final : public CategoryWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
CircleWidget(const Core& core_, FriendListWidget* parent, int id_, Settings& settings, CircleWidget(const Core& core_, FriendListWidget* parent, int id_, Settings& settings,
Style& style); Style& style, IMessageBoxManager& messageboxManager);
~CircleWidget(); ~CircleWidget();
void editName(); void editName();
@ -59,4 +60,5 @@ private:
const Core& core; const Core& core;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -54,7 +54,7 @@ const QSize defaultSize(720, 400);
} // namespace } // namespace
ContentDialog::ContentDialog(const Core &core, Settings& settings_, ContentDialog::ContentDialog(const Core &core, Settings& settings_,
Style& style_, QWidget* parent) Style& style_, IMessageBoxManager& messageBoxManager_, QWidget* parent)
: ActivateDialog(style_, parent, Qt::Window) : ActivateDialog(style_, parent, Qt::Window)
, splitter{new QSplitter(this)} , splitter{new QSplitter(this)}
, friendLayout{new FriendListLayout(this)} , friendLayout{new FriendListLayout(this)}
@ -63,6 +63,7 @@ ContentDialog::ContentDialog(const Core &core, Settings& settings_,
, videoCount(0) , videoCount(0)
, settings{settings_} , settings{settings_}
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
friendLayout->setMargin(0); friendLayout->setMargin(0);
friendLayout->setSpacing(0); friendLayout->setSpacing(0);
@ -159,7 +160,7 @@ FriendWidget* ContentDialog::addFriend(std::shared_ptr<FriendChatroom> chatroom,
const auto compact = settings.getCompactLayout(); const auto compact = settings.getCompactLayout();
auto frnd = chatroom->getFriend(); auto frnd = chatroom->getFriend();
const auto& friendPk = frnd->getPublicKey(); const auto& friendPk = frnd->getPublicKey();
auto friendWidget = new FriendWidget(chatroom, compact, settings, style); auto friendWidget = new FriendWidget(chatroom, compact, settings, style, messageBoxManager);
emit connectFriendWidget(*friendWidget); emit connectFriendWidget(*friendWidget);
chatWidgets[friendPk] = friendWidget; chatWidgets[friendPk] = friendWidget;
friendLayout->addFriendWidget(friendWidget, frnd->getStatus()); friendLayout->addFriendWidget(friendWidget, frnd->getStatus());

View File

@ -47,12 +47,14 @@ class QSplitter;
class QScrollArea; class QScrollArea;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class ContentDialog : public ActivateDialog, public IDialogs class ContentDialog : public ActivateDialog, public IDialogs
{ {
Q_OBJECT Q_OBJECT
public: public:
ContentDialog(const Core& core, Settings& settings, Style& style, QWidget* parent = nullptr); ContentDialog(const Core& core, Settings& settings, Style& style,
IMessageBoxManager& messageBoxManager, QWidget* parent = nullptr);
~ContentDialog() override; ~ContentDialog() override;
FriendWidget* addFriend(std::shared_ptr<FriendChatroom> chatroom, GenericChatForm* form); FriendWidget* addFriend(std::shared_ptr<FriendChatroom> chatroom, GenericChatForm* form);
@ -139,4 +141,5 @@ private:
QString username; QString username;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -20,7 +20,6 @@
#include "contentlayout.h" #include "contentlayout.h"
#include "style.h" #include "style.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/gui.h"
#include <QFrame> #include <QFrame>
#include <QStyleFactory> #include <QStyleFactory>

View File

@ -22,10 +22,10 @@
#include "src/nexus.h" #include "src/nexus.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/contentlayout.h" #include "src/widget/contentlayout.h"
#include "src/widget/gui.h"
#include "src/widget/tool/croppinglabel.h" #include "src/widget/tool/croppinglabel.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/tool/imessageboxmanager.h"
#include <QApplication> #include <QApplication>
#include <QClipboard> #include <QClipboard>
#include <QErrorMessage> #include <QErrorMessage>
@ -61,10 +61,12 @@ namespace
* @brief Cached username so we can retranslate the invite message * @brief Cached username so we can retranslate the invite message
*/ */
AddFriendForm::AddFriendForm(ToxId ownId_, Settings& settings_, Style& style_) AddFriendForm::AddFriendForm(ToxId ownId_, Settings& settings_, Style& style_,
IMessageBoxManager& messageBoxManager_)
: ownId{ownId_} : ownId{ownId_}
, settings{settings_} , settings{settings_}
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
tabWidget = new QTabWidget(); tabWidget = new QTabWidget();
main = new QWidget(tabWidget); main = new QWidget(tabWidget);
@ -204,14 +206,14 @@ void AddFriendForm::addFriend(const QString& idText)
ToxId friendId(idText); ToxId friendId(idText);
if (!friendId.isValid()) { if (!friendId.isValid()) {
GUI::showWarning(tr("Couldn't add friend"), messageBoxManager.showWarning(tr("Couldn't add friend"),
tr("%1 Tox ID is invalid", "Tox address error").arg(idText)); tr("%1 Tox ID is invalid", "Tox address error").arg(idText));
return; return;
} }
deleteFriendRequest(friendId); deleteFriendRequest(friendId);
if (friendId == ownId) { if (friendId == ownId) {
GUI::showWarning(tr("Couldn't add friend"), messageBoxManager.showWarning(tr("Couldn't add friend"),
//: When trying to add your own Tox ID as friend //: When trying to add your own Tox ID as friend
tr("You can't add yourself as a friend!")); tr("You can't add yourself as a friend!"));
} else { } else {
@ -248,7 +250,7 @@ void AddFriendForm::onImportOpenClicked()
QFile contactFile(path); QFile contactFile(path);
if (!contactFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!contactFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
GUI::showWarning(tr("Couldn't open file"), messageBoxManager.showWarning(tr("Couldn't open file"),
//: Error message when trying to open a contact list file to import //: Error message when trying to open a contact list file to import
tr("Couldn't open the contact file")); tr("Couldn't open the contact file"));
return; return;
@ -271,7 +273,7 @@ void AddFriendForm::onImportOpenClicked()
} }
if (contactsToImport.isEmpty()) { if (contactsToImport.isEmpty()) {
GUI::showWarning(tr("Invalid file"), messageBoxManager.showWarning(tr("Invalid file"),
tr("We couldn't find any contacts to import in this file!")); tr("We couldn't find any contacts to import in this file!"));
} }

View File

@ -35,6 +35,7 @@ class QTabWidget;
class ContentLayout; class ContentLayout;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class AddFriendForm : public QObject class AddFriendForm : public QObject
{ {
@ -47,7 +48,8 @@ public:
FriendRequest = 2 FriendRequest = 2
}; };
AddFriendForm(ToxId ownId_, Settings& settings, Style& style); AddFriendForm(ToxId ownId_, Settings& settings, Style& style,
IMessageBoxManager& messageBoxManager);
AddFriendForm(const AddFriendForm&) = delete; AddFriendForm(const AddFriendForm&) = delete;
AddFriendForm& operator=(const AddFriendForm&) = delete; AddFriendForm& operator=(const AddFriendForm&) = delete;
~AddFriendForm(); ~AddFriendForm();
@ -117,4 +119,5 @@ private:
ToxId ownId; ToxId ownId;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -109,9 +109,9 @@ QString secondsToDHMS(quint32 duration)
ChatForm::ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_, ChatForm::ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_,
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache_, IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache_,
SmileyPack& smileyPack_, CameraSource& cameraSource_, Settings& settings_, SmileyPack& smileyPack_, CameraSource& cameraSource_, Settings& settings_,
Style& style_) Style& style_, IMessageBoxManager& messageBoxManager)
: GenericChatForm(profile.getCore(), chatFriend, chatLog_, messageDispatcher_, : GenericChatForm(profile.getCore(), chatFriend, chatLog_, messageDispatcher_,
documentCache_, smileyPack_, settings_, style_) documentCache_, smileyPack_, settings_, style_, messageBoxManager)
, core{profile.getCore()} , core{profile.getCore()}
, f(chatFriend) , f(chatFriend)
, isTyping{false} , isTyping{false}

View File

@ -46,6 +46,7 @@ class DocumentCache;
class SmileyPack; class SmileyPack;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class ChatForm : public GenericChatForm class ChatForm : public GenericChatForm
{ {
@ -53,7 +54,7 @@ class ChatForm : public GenericChatForm
public: public:
ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_, ChatForm(Profile& profile, Friend* chatFriend, IChatLog& chatLog_,
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache, SmileyPack& smileyPack, IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache, SmileyPack& smileyPack,
CameraSource& cameraSource, Settings& settings, Style& style); CameraSource& cameraSource, Settings& settings, Style& style, IMessageBoxManager& messageBoxManager);
~ChatForm() override; ~ChatForm() override;
void setStatusMessage(const QString& newMessage); void setStatusMessage(const QString& newMessage);

View File

@ -23,8 +23,11 @@
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/widget/tool/imessageboxmanager.h"
#include "src/friendlist.h" #include "src/friendlist.h"
#include "util/display.h" #include "util/display.h"
#include <QDesktopServices>
#include <QFileInfo> #include <QFileInfo>
#include <QWindow> #include <QWindow>
#include <QTableView> #include <QTableView>
@ -426,8 +429,9 @@ namespace FileTransferList
} // namespace FileTransferList } // namespace FileTransferList
FilesForm::FilesForm(CoreFile& coreFile, Settings& settings, Style& style) FilesForm::FilesForm(CoreFile& coreFile, Settings& settings, Style& style, IMessageBoxManager& messageBoxManager_)
: QObject() : QObject()
, messageBoxManager{messageBoxManager_}
{ {
head = new QWidget(); head = new QWidget();
QFont bold; QFont bold;
@ -515,13 +519,13 @@ void FilesForm::onFileUpdated(const ToxFile& inFile)
void FilesForm::onSentFileActivated(const QModelIndex& index) void FilesForm::onSentFileActivated(const QModelIndex& index)
{ {
const auto& filePath = sentModel->data(index, Qt::UserRole).toString(); const auto& filePath = sentModel->data(index, Qt::UserRole).toString();
Widget::confirmExecutableOpen(filePath); messageBoxManager.confirmExecutableOpen(filePath);
} }
void FilesForm::onReceivedFileActivated(const QModelIndex& index) void FilesForm::onReceivedFileActivated(const QModelIndex& index)
{ {
const auto& filePath = recvdModel->data(index, Qt::UserRole).toString(); const auto& filePath = recvdModel->data(index, Qt::UserRole).toString();
Widget::confirmExecutableOpen(filePath); messageBoxManager.confirmExecutableOpen(filePath);
} }
void FilesForm::retranslateUi() void FilesForm::retranslateUi()

View File

@ -36,6 +36,8 @@ class ContentLayout;
class QTableView; class QTableView;
class Settings; class Settings;
class Style; class Style;
class QFileInfo;
class IMessageBoxManager;
namespace FileTransferList namespace FileTransferList
{ {
@ -114,7 +116,8 @@ class FilesForm : public QObject
Q_OBJECT Q_OBJECT
public: public:
FilesForm(CoreFile& coreFile, Settings& settings, Style& style); FilesForm(CoreFile& coreFile, Settings& settings, Style& style,
IMessageBoxManager& messageBoxManager);
~FilesForm(); ~FilesForm();
bool isShown() const; bool isShown() const;
@ -142,4 +145,5 @@ private:
QTabWidget main; QTabWidget main;
QTableView *sent, *recvd; QTableView *sent, *recvd;
FileTransferList::Model *sentModel, *recvdModel; FileTransferList::Model *sentModel, *recvdModel;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -44,7 +44,6 @@
#include "src/widget/tool/flyoutoverlaywidget.h" #include "src/widget/tool/flyoutoverlaywidget.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/widget/gui.h"
#include <QClipboard> #include <QClipboard>
#include <QFileDialog> #include <QFileDialog>
@ -140,7 +139,7 @@ QPushButton* createButton(const QString& name, T* self, Fun onClickSlot,
GenericChatForm::GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_, GenericChatForm::GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_,
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache, IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache,
SmileyPack& smileyPack_, Settings& settings_, Style& style_, SmileyPack& smileyPack_, Settings& settings_, Style& style_,
QWidget* parent_) IMessageBoxManager& messageBoxManager, QWidget* parent_)
: QWidget(parent_, Qt::Window) : QWidget(parent_, Qt::Window)
, core{core_} , core{core_}
, audioInputFlag(false) , audioInputFlag(false)
@ -156,7 +155,7 @@ GenericChatForm::GenericChatForm(const Core& core_, const Chat* chat, IChatLog&
searchForm = new SearchForm(settings, style); searchForm = new SearchForm(settings, style);
dateInfo = new QLabel(this); dateInfo = new QLabel(this);
chatWidget = new ChatWidget(chatLog_, core, documentCache, smileyPack, chatWidget = new ChatWidget(chatLog_, core, documentCache, smileyPack,
settings, style, this); settings, style, messageBoxManager, this);
searchForm->hide(); searchForm->hide();
dateInfo->setAlignment(Qt::AlignHCenter); dateInfo->setAlignment(Qt::AlignHCenter);
dateInfo->setVisible(false); dateInfo->setVisible(false);

View File

@ -57,6 +57,7 @@ class DocumentCache;
class SmileyPack; class SmileyPack;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;
@ -75,7 +76,7 @@ public:
GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_, GenericChatForm(const Core& core_, const Chat* chat, IChatLog& chatLog_,
IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache, IMessageDispatcher& messageDispatcher_, DocumentCache& documentCache,
SmileyPack& smileyPack, Settings& settings, Style& style, SmileyPack& smileyPack, Settings& settings, Style& style,
QWidget* parent_ = nullptr); IMessageBoxManager& messageBoxmanager, QWidget* parent_ = nullptr);
~GenericChatForm() override; ~GenericChatForm() override;
void setName(const QString& newName); void setName(const QString& newName);

View File

@ -85,9 +85,9 @@ QString editName(const QString& name)
GroupChatForm::GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_, GroupChatForm::GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_,
IMessageDispatcher& messageDispatcher_, Settings& settings_, DocumentCache& documentCache_, IMessageDispatcher& messageDispatcher_, Settings& settings_, DocumentCache& documentCache_,
SmileyPack& smileyPack_, Style& style_) SmileyPack& smileyPack_, Style& style_, IMessageBoxManager& messageBoxManager)
: GenericChatForm(core_, chatGroup, chatLog_, messageDispatcher_, : GenericChatForm(core_, chatGroup, chatLog_, messageDispatcher_,
documentCache_, smileyPack_, settings_, style_) documentCache_, smileyPack_, settings_, style_, messageBoxManager)
, core{core_} , core{core_}
, group(chatGroup) , group(chatGroup)
, inCall(false) , inCall(false)

View File

@ -38,6 +38,7 @@ class Settings;
class DocumentCache; class DocumentCache;
class SmileyPack; class SmileyPack;
class Style; class Style;
class IMessageBoxManager;
class GroupChatForm : public GenericChatForm class GroupChatForm : public GenericChatForm
{ {
@ -45,7 +46,8 @@ class GroupChatForm : public GenericChatForm
public: public:
GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_, GroupChatForm(Core& core_, Group* chatGroup, IChatLog& chatLog_,
IMessageDispatcher& messageDispatcher_, Settings& settings_, IMessageDispatcher& messageDispatcher_, Settings& settings_,
DocumentCache& documentCache, SmileyPack& smileyPack, Style& style); DocumentCache& documentCache, SmileyPack& smileyPack, Style& style,
IMessageBoxManager& messageBoxManager);
~GroupChatForm(); ~GroupChatForm();
void peerAudioPlaying(ToxPk peerPk); void peerAudioPlaying(ToxPk peerPk);

View File

@ -19,8 +19,6 @@
#pragma once #pragma once
#include "src/widget/gui.h"
#include <QWidget> #include <QWidget>
class ContentLayout; class ContentLayout;

View File

@ -27,12 +27,12 @@
#include "src/widget/contentlayout.h" #include "src/widget/contentlayout.h"
#include "src/widget/form/setpassworddialog.h" #include "src/widget/form/setpassworddialog.h"
#include "src/widget/form/settingswidget.h" #include "src/widget/form/settingswidget.h"
#include "src/widget/gui.h"
#include "src/widget/maskablepixmapwidget.h" #include "src/widget/maskablepixmapwidget.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/tool/croppinglabel.h" #include "src/widget/tool/croppinglabel.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "src/widget/tool/imessageboxmanager.h"
#include <QApplication> #include <QApplication>
#include <QBuffer> #include <QBuffer>
#include <QClipboard> #include <QClipboard>
@ -100,11 +100,12 @@ const QPair<QString, QString> CAN_NOT_CHANGE_PASSWORD = {
} // namespace } // namespace
ProfileForm::ProfileForm(IProfileInfo* profileInfo_, Settings& settings_, ProfileForm::ProfileForm(IProfileInfo* profileInfo_, Settings& settings_,
Style& style, QWidget* parent) Style& style, IMessageBoxManager& messageBoxManager_, QWidget* parent)
: QWidget{parent} : QWidget{parent}
, qr{nullptr} , qr{nullptr}
, profileInfo{profileInfo_} , profileInfo{profileInfo_}
, settings{settings_} , settings{settings_}
, messageBoxManager{messageBoxManager_}
{ {
bodyUI = new Ui::IdentitySettings; bodyUI = new Ui::IdentitySettings;
bodyUI->setupUi(this); bodyUI->setupUi(this);
@ -321,7 +322,7 @@ void ProfileForm::onAvatarClicked()
return; return;
} }
GUI::showError(tr("Error"), SET_AVATAR_ERROR[result]); messageBoxManager.showError(tr("Error"), SET_AVATAR_ERROR[result]);
} }
void ProfileForm::onRenameClicked() void ProfileForm::onRenameClicked()
@ -339,7 +340,7 @@ void ProfileForm::onRenameClicked()
} }
const QPair<QString, QString> error = RENAME_ERROR[result]; const QPair<QString, QString> error = RENAME_ERROR[result];
GUI::showError(error.first, error.second.arg(name)); messageBoxManager.showError(error.first, error.second.arg(name));
prFileLabelUpdate(); prFileLabelUpdate();
} }
@ -360,7 +361,7 @@ void ProfileForm::onExportClicked()
} }
const QPair<QString, QString> error = SAVE_ERROR[result]; const QPair<QString, QString> error = SAVE_ERROR[result];
GUI::showWarning(error.first, error.second); messageBoxManager.showWarning(error.first, error.second);
} }
void ProfileForm::onDeleteClicked() void ProfileForm::onDeleteClicked()
@ -368,7 +369,7 @@ void ProfileForm::onDeleteClicked()
const QString title = tr("Delete profile", "deletion confirmation title"); const QString title = tr("Delete profile", "deletion confirmation title");
const QString question = tr("Are you sure you want to delete this profile?", const QString question = tr("Are you sure you want to delete this profile?",
"deletion confirmation text"); "deletion confirmation text");
if (!GUI::askQuestion(title, question)) { if (!messageBoxManager.askQuestion(title, question)) {
return; return;
} }
@ -386,7 +387,7 @@ void ProfileForm::onDeleteClicked()
//: deletion failed text part 2 //: deletion failed text part 2
message += "\n" + tr("Please manually remove them."); message += "\n" + tr("Please manually remove them.");
GUI::showError(tr("Files could not be deleted!", "deletion failed title"), message); messageBoxManager.showError(tr("Files could not be deleted!", "deletion failed title"), message);
} }
void ProfileForm::onLogoutClicked() void ProfileForm::onLogoutClicked()
@ -426,25 +427,25 @@ void ProfileForm::onSaveQrClicked()
} }
const QPair<QString, QString> error = SAVE_ERROR[result]; const QPair<QString, QString> error = SAVE_ERROR[result];
GUI::showWarning(error.first, error.second); messageBoxManager.showWarning(error.first, error.second);
} }
void ProfileForm::onDeletePassClicked() void ProfileForm::onDeletePassClicked()
{ {
if (!profileInfo->isEncrypted()) { if (!profileInfo->isEncrypted()) {
GUI::showInfo(tr("Nothing to remove"), tr("Your profile does not have a password!")); messageBoxManager.showInfo(tr("Nothing to remove"), tr("Your profile does not have a password!"));
return; return;
} }
const QString title = tr("Remove password", "deletion confirmation title"); const QString title = tr("Remove password", "deletion confirmation title");
//: deletion confirmation text //: deletion confirmation text
const QString body = tr("Are you sure you want to remove your password?"); const QString body = tr("Are you sure you want to remove your password?");
if (!GUI::askQuestion(title, body)) { if (!messageBoxManager.askQuestion(title, body)) {
return; return;
} }
if (!profileInfo->deletePassword()) { if (!profileInfo->deletePassword()) {
GUI::showInfo(CAN_NOT_CHANGE_PASSWORD.first, CAN_NOT_CHANGE_PASSWORD.second); messageBoxManager.showInfo(CAN_NOT_CHANGE_PASSWORD.first, CAN_NOT_CHANGE_PASSWORD.second);
} }
} }
@ -458,7 +459,7 @@ void ProfileForm::onChangePassClicked()
QString newPass = dialog->getPassword(); QString newPass = dialog->getPassword();
if (!profileInfo->setPassword(newPass)) { if (!profileInfo->setPassword(newPass)) {
GUI::showInfo(CAN_NOT_CHANGE_PASSWORD.first, CAN_NOT_CHANGE_PASSWORD.second); messageBoxManager.showInfo(CAN_NOT_CHANGE_PASSWORD.first, CAN_NOT_CHANGE_PASSWORD.second);
} }
} }

View File

@ -31,6 +31,7 @@ class IProfileInfo;
class MaskablePixmapWidget; class MaskablePixmapWidget;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
namespace Ui { namespace Ui {
class IdentitySettings; class IdentitySettings;
@ -56,7 +57,7 @@ class ProfileForm : public QWidget
Q_OBJECT Q_OBJECT
public: public:
ProfileForm(IProfileInfo* profileInfo_, Settings& settings, Style& style, ProfileForm(IProfileInfo* profileInfo_, Settings& settings, Style& style,
QWidget* parent = nullptr); IMessageBoxManager& messageBoxManager, QWidget* parent = nullptr);
~ProfileForm(); ~ProfileForm();
void show(ContentLayout* contentLayout); void show(ContentLayout* contentLayout);
bool isShown() const; bool isShown() const;
@ -97,4 +98,5 @@ private:
ClickableTE* toxId; ClickableTE* toxId;
IProfileInfo* profileInfo; IProfileInfo* profileInfo;
Settings& settings; Settings& settings;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -30,8 +30,8 @@
#include "src/model/status.h" #include "src/model/status.h"
#include "src/persistence/profile.h" #include "src/persistence/profile.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/gui.h"
#include "src/widget/tool/recursivesignalblocker.h" #include "src/widget/tool/recursivesignalblocker.h"
#include "src/widget/tool/imessageboxmanager.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
/** /**
@ -41,10 +41,11 @@
* Is also contains "Reset settings" button and "Make portable" checkbox. * Is also contains "Reset settings" button and "Make portable" checkbox.
*/ */
AdvancedForm::AdvancedForm(Settings& settings_, Style& style) AdvancedForm::AdvancedForm(Settings& settings_, Style& style, IMessageBoxManager& messageBoxManager_)
: GenericForm(QPixmap(":/img/settings/general.png"), style) : GenericForm(QPixmap(":/img/settings/general.png"), style)
, bodyUI(new Ui::AdvancedSettings) , bodyUI(new Ui::AdvancedSettings)
, settings{settings_} , settings{settings_}
, messageBoxManager{messageBoxManager_}
{ {
bodyUI->setupUi(this); bodyUI->setupUi(this);
@ -157,14 +158,14 @@ void AdvancedForm::on_btnCopyDebug_clicked()
void AdvancedForm::on_resetButton_clicked() void AdvancedForm::on_resetButton_clicked()
{ {
const QString titile = tr("Reset settings"); const QString titile = tr("Reset settings");
bool result = GUI::askQuestion(titile, tr("All settings will be reset to default. Are you sure?"), bool result = messageBoxManager.askQuestion(titile, tr("All settings will be reset to default. Are you sure?"),
tr("Yes"), tr("No")); tr("Yes"), tr("No"));
if (!result) if (!result)
return; return;
settings.resetToDefault(); settings.resetToDefault();
GUI::showInfo(titile, "Changes will take effect after restart"); messageBoxManager.showInfo(titile, "Changes will take effect after restart");
} }
void AdvancedForm::on_cbEnableIPv6_stateChanged() void AdvancedForm::on_cbEnableIPv6_stateChanged()

View File

@ -24,6 +24,7 @@
class Core; class Core;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
namespace Ui { namespace Ui {
class AdvancedSettings; class AdvancedSettings;
@ -33,7 +34,7 @@ class AdvancedForm : public GenericForm
{ {
Q_OBJECT Q_OBJECT
public: public:
AdvancedForm(Settings& settings, Style& style); AdvancedForm(Settings& settings, Style& style, IMessageBoxManager& messageBoxManager);
~AdvancedForm(); ~AdvancedForm();
QString getFormName() final QString getFormName() final
{ {
@ -61,4 +62,5 @@ private:
private: private:
Ui::AdvancedSettings* bodyUI; Ui::AdvancedSettings* bodyUI;
Settings& settings; Settings& settings;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -43,7 +43,7 @@ class AVForm : public GenericForm, private Ui::AVForm
Q_OBJECT Q_OBJECT
public: public:
AVForm(IAudioControl& audio_, CoreAV* coreAV_, CameraSource& camera_, AVForm(IAudioControl& audio_, CoreAV* coreAV_, CameraSource& camera_,
IAudioSettings* audioSettings_, IVideoSettings* videoSettings_, Style&); IAudioSettings* audioSettings_, IVideoSettings* videoSettings_, Style& style);
~AVForm() override; ~AVForm() override;
QString getFormName() final QString getFormName() final
{ {

View File

@ -18,7 +18,6 @@
*/ */
#include "genericsettings.h" #include "genericsettings.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include <QCheckBox> #include <QCheckBox>

View File

@ -27,7 +27,7 @@ class GenericForm : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
GenericForm(const QPixmap& icon, Style&); GenericForm(const QPixmap& icon, Style& style);
virtual ~GenericForm() virtual ~GenericForm()
{ {
} }

View File

@ -31,7 +31,6 @@
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/form/setpassworddialog.h" #include "src/widget/form/setpassworddialog.h"
#include "src/widget/form/settingswidget.h" #include "src/widget/form/settingswidget.h"
#include "src/widget/gui.h"
#include "src/widget/tool/recursivesignalblocker.h" #include "src/widget/tool/recursivesignalblocker.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"

View File

@ -43,7 +43,7 @@
SettingsWidget::SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, SettingsWidget::SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio,
Core* core, SmileyPack& smileyPack, CameraSource& cameraSource, Core* core, SmileyPack& smileyPack, CameraSource& cameraSource,
Settings& settings, Style& style, Widget* parent) Settings& settings, Style& style, IMessageBoxManager& messageBoxManager, Widget* parent)
: QWidget(parent, Qt::Window) : QWidget(parent, Qt::Window)
{ {
CoreAV* coreAV = core->getAv(); CoreAV* coreAV = core->getAv();
@ -67,7 +67,7 @@ SettingsWidget::SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio,
AVForm* rawAvfrm = new AVForm(audio, coreAV, cameraSource, audioSettings, videoSettings, style); AVForm* rawAvfrm = new AVForm(audio, coreAV, cameraSource, audioSettings, videoSettings, style);
std::unique_ptr<AVForm> avfrm(rawAvfrm); std::unique_ptr<AVForm> avfrm(rawAvfrm);
std::unique_ptr<AdvancedForm> expfrm(new AdvancedForm(settings, style)); std::unique_ptr<AdvancedForm> expfrm(new AdvancedForm(settings, style, messageBoxManager));
std::unique_ptr<AboutForm> abtfrm(new AboutForm(updateCheck, style)); std::unique_ptr<AboutForm> abtfrm(new AboutForm(updateCheck, style));
#if UPDATE_CHECK_ENABLED #if UPDATE_CHECK_ENABLED

View File

@ -42,6 +42,7 @@ class SmileyPack;
class CameraSource; class CameraSource;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class SettingsWidget : public QWidget class SettingsWidget : public QWidget
{ {
@ -49,7 +50,7 @@ class SettingsWidget : public QWidget
public: public:
SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, Core *core, SettingsWidget(UpdateCheck* updateCheck, IAudioControl& audio, Core *core,
SmileyPack& smileyPack, CameraSource& cameraSource, Settings& settings, SmileyPack& smileyPack, CameraSource& cameraSource, Settings& settings,
Style& style, Widget* parent = nullptr); Style& style, IMessageBoxManager& messageBoxManager, Widget* parent = nullptr);
~SettingsWidget(); ~SettingsWidget();
bool isShown() const; bool isShown() const;

View File

@ -100,11 +100,13 @@ qint64 timeUntilTomorrow()
} // namespace } // namespace
FriendListWidget::FriendListWidget(const Core &core_, Widget* parent, FriendListWidget::FriendListWidget(const Core &core_, Widget* parent,
Settings& settings_, Style& style_, bool groupsOnTop) Settings& settings_, Style& style_, IMessageBoxManager& messageBoxManager_,
bool groupsOnTop)
: QWidget(parent) : QWidget(parent)
, core{core_} , core{core_}
, settings{settings_} , settings{settings_}
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
int countContacts = core.getFriendList().size(); int countContacts = core.getFriendList().size();
manager = new FriendListManager(countContacts, this); manager = new FriendListManager(countContacts, this);
@ -616,7 +618,8 @@ CircleWidget* FriendListWidget::createCircleWidget(int id)
return CircleWidget::getFromID(id); return CircleWidget::getFromID(id);
} }
CircleWidget* circleWidget = new CircleWidget(core, this, id, settings, style); CircleWidget* circleWidget = new CircleWidget(core, this, id, settings, style,
messageBoxManager);
emit connectCircleWidget(*circleWidget); emit connectCircleWidget(*circleWidget);
connect(this, &FriendListWidget::onCompactChanged, circleWidget, &CircleWidget::onCompactChanged); connect(this, &FriendListWidget::onCompactChanged, circleWidget, &CircleWidget::onCompactChanged);
connect(circleWidget, &CircleWidget::renameRequested, this, &FriendListWidget::renameCircleWidget); connect(circleWidget, &CircleWidget::renameRequested, this, &FriendListWidget::renameCircleWidget);

View File

@ -40,13 +40,15 @@ class Friend;
class IFriendListItem; class IFriendListItem;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class FriendListWidget : public QWidget class FriendListWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
using SortingMode = Settings::FriendListSortingMode; using SortingMode = Settings::FriendListSortingMode;
FriendListWidget(const Core& core, Widget* parent, Settings& settings, Style& style, bool groupsOnTop = true); FriendListWidget(const Core& core, Widget* parent, Settings& settings, Style& style,
IMessageBoxManager& messageBoxManager, bool groupsOnTop = true);
~FriendListWidget(); ~FriendListWidget();
void setMode(SortingMode mode); void setMode(SortingMode mode);
SortingMode getMode() const; SortingMode getMode() const;
@ -101,4 +103,5 @@ private:
const Core& core; const Core& core;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -57,12 +57,13 @@
* When you click should open the chat with friend. Widget has a context menu. * When you click should open the chat with friend. Widget has a context menu.
*/ */
FriendWidget::FriendWidget(std::shared_ptr<FriendChatroom> chatroom_, bool compact_, FriendWidget::FriendWidget(std::shared_ptr<FriendChatroom> chatroom_, bool compact_,
Settings& settings_, Style& style_) Settings& settings_, Style& style_, IMessageBoxManager& messageBoxManager_)
: GenericChatroomWidget(compact_, settings_, style_) : GenericChatroomWidget(compact_, settings_, style_)
, chatroom{chatroom_} , chatroom{chatroom_}
, isDefaultAvatar{true} , isDefaultAvatar{true}
, settings{settings_} , settings{settings_}
, style{style_} , style{style_}
, messageBoxManager{messageBoxManager_}
{ {
avatar->setPixmap(QPixmap(":/img/contact.svg")); avatar->setPixmap(QPixmap(":/img/contact.svg"));
statusPic.setPixmap(QPixmap(Status::getIconPath(Status::Status::Offline))); statusPic.setPixmap(QPixmap(Status::getIconPath(Status::Status::Offline)));
@ -285,7 +286,8 @@ void FriendWidget::showDetails()
const auto frnd = chatroom->getFriend(); const auto frnd = chatroom->getFriend();
const auto iabout = new AboutFriend(frnd, &settings); const auto iabout = new AboutFriend(frnd, &settings);
std::unique_ptr<IAboutFriend> about = std::unique_ptr<IAboutFriend>(iabout); std::unique_ptr<IAboutFriend> about = std::unique_ptr<IAboutFriend>(iabout);
const auto aboutUser = new AboutFriendForm(std::move(about), settings, style, this); const auto aboutUser = new AboutFriendForm(std::move(about), settings, style,
messageBoxManager, this);
connect(aboutUser, &AboutFriendForm::histroyRemoved, this, &FriendWidget::friendHistoryRemoved); connect(aboutUser, &AboutFriendForm::histroyRemoved, this, &FriendWidget::friendHistoryRemoved);
aboutUser->show(); aboutUser->show();
} }

View File

@ -31,13 +31,14 @@ class MaskablePixmapWidget;
class CircleWidget; class CircleWidget;
class Settings; class Settings;
class Style; class Style;
class IMessageBoxManager;
class FriendWidget : public GenericChatroomWidget, public IFriendListItem class FriendWidget : public GenericChatroomWidget, public IFriendListItem
{ {
Q_OBJECT Q_OBJECT
public: public:
FriendWidget(std::shared_ptr<FriendChatroom> chatroom_, bool compact_, FriendWidget(std::shared_ptr<FriendChatroom> chatroom, bool compact_,
Settings& settings, Style& style); Settings& settings, Style& style, IMessageBoxManager& messageBoxManager);
void contextMenuEvent(QContextMenuEvent* event) final; void contextMenuEvent(QContextMenuEvent* event) final;
void setAsActiveChatroom() final; void setAsActiveChatroom() final;
@ -90,4 +91,5 @@ public:
bool isDefaultAvatar; bool isDefaultAvatar;
Settings& settings; Settings& settings;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };

View File

@ -20,7 +20,6 @@
#include "genericchatitemwidget.h" #include "genericchatitemwidget.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/tool/croppinglabel.h" #include "src/widget/tool/croppinglabel.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include <QVariant> #include <QVariant>

View File

@ -36,7 +36,7 @@ public:
FriendOnlineItem FriendOnlineItem
}; };
GenericChatItemWidget(bool compact_, Style&, QWidget* parent = nullptr); GenericChatItemWidget(bool compact_, Style& style, QWidget* parent = nullptr);
bool isCompact() const; bool isCompact() const;
void setCompact(bool compact_); void setCompact(bool compact_);

View File

@ -19,7 +19,6 @@
#include "searchform.h" #include "searchform.h"
#include "form/searchsettingsform.h" #include "form/searchsettingsform.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include <QVBoxLayout> #include <QVBoxLayout>

View File

@ -19,7 +19,6 @@
#include "style.h" #include "style.h"
#include "src/persistence/settings.h" #include "src/persistence/settings.h"
#include "src/widget/gui.h"
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>

View File

@ -19,7 +19,6 @@
#include "activatedialog.h" #include "activatedialog.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include <QEvent> #include <QEvent>

View File

@ -28,9 +28,9 @@ class ActivateDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
ActivateDialog(Style&, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); ActivateDialog(Style& style, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
#else #else
ActivateDialog(Style&, QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); ActivateDialog(Style& style, QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
#endif #endif
bool event(QEvent* event) override; bool event(QEvent* event) override;

View File

@ -0,0 +1,22 @@
/*
Copyright © 2022 by The qTox Project Contributors
This file is part of qTox, a Qt-based graphical interface for Tox.
qTox is libre software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
qTox is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#include "src/widget/tool/imessageboxmanager.h"
IMessageBoxManager::~IMessageBoxManager() = default;

View File

@ -0,0 +1,37 @@
/*
Copyright © 2022 by The qTox Project Contributors
This file is part of qTox, a Qt-based graphical interface for Tox.
qTox is libre software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
qTox is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
class QString;
class QFileInfo;
class IMessageBoxManager
{
public:
virtual ~IMessageBoxManager();
virtual void showInfo(const QString& title, const QString& msg) = 0;
virtual void showWarning(const QString& title, const QString& msg) = 0;
virtual void showError(const QString& title, const QString& msg) = 0;
virtual bool askQuestion(const QString& title, const QString& msg, bool defaultAns = false,
bool warning = true, bool yesno = true) = 0;
virtual bool askQuestion(const QString& title, const QString& msg, const QString& button1,
const QString& button2, bool defaultAns = false, bool warning = true) = 0;
virtual void confirmExecutableOpen(const QFileInfo& file) = 0;
};

View File

@ -1,5 +1,5 @@
/* /*
Copyright © 2015-2019 by The qTox Project Contributors Copyright © 2022 by The qTox Project Contributors
This file is part of qTox, a Qt-based graphical interface for Tox. This file is part of qTox, a Qt-based graphical interface for Tox.
@ -17,61 +17,27 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>. along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "messageboxmanager.h"
#include "gui.h"
#include "widget.h"
#include "src/nexus.h"
#include <QApplication> #include <QApplication>
#include <QCoreApplication> #include <QThread>
#include <QDebug>
#include <QDialogButtonBox>
#include <QInputDialog>
#include <QLabel>
#include <QMessageBox> #include <QMessageBox>
#include <QPushButton> #include <QPushButton>
#include <QThread> #include <QFileInfo>
#include <assert.h> #include <QDesktopServices>
#include <QUrl>
/**
* @class GUI
* @brief Abstracts the GUI from the target backend (DesktopGUI, ...)
*
* All the functions exposed here are thread-safe.
* Prefer calling this class to calling a GUI backend directly.
*
* @fn void GUI::resized()
* @brief Emitted when the GUI is resized on supported platforms.
*/
GUI::GUI(QObject* parent)
: QObject(parent)
{
assert(QThread::currentThread() == qApp->thread());
assert(Nexus::getDesktopGUI());
}
/**
* @brief Returns the singleton instance.
*/
GUI& GUI::getInstance()
{
static GUI gui;
return gui;
}
// Implementation of the public clean interface
/** /**
* @brief Show some text to the user. * @brief Show some text to the user.
* @param title Title of information window. * @param title Title of information window.
* @param msg Text in information window. * @param msg Text in information window.
*/ */
void GUI::showInfo(const QString& title, const QString& msg) void MessageBoxManager::showInfo(const QString& title, const QString& msg)
{ {
if (QThread::currentThread() == qApp->thread()) { if (QThread::currentThread() == qApp->thread()) {
getInstance()._showInfo(title, msg); _showInfo(title, msg);
} else { } else {
QMetaObject::invokeMethod(&getInstance(), "_showInfo", Qt::BlockingQueuedConnection, QMetaObject::invokeMethod(this, "_showInfo", Qt::BlockingQueuedConnection,
Q_ARG(const QString&, title), Q_ARG(const QString&, msg)); Q_ARG(const QString&, title), Q_ARG(const QString&, msg));
} }
} }
@ -81,12 +47,12 @@ void GUI::showInfo(const QString& title, const QString& msg)
* @param title Title of warning window. * @param title Title of warning window.
* @param msg Text in warning window. * @param msg Text in warning window.
*/ */
void GUI::showWarning(const QString& title, const QString& msg) void MessageBoxManager::showWarning(const QString& title, const QString& msg)
{ {
if (QThread::currentThread() == qApp->thread()) { if (QThread::currentThread() == qApp->thread()) {
getInstance()._showWarning(title, msg); _showWarning(title, msg);
} else { } else {
QMetaObject::invokeMethod(&getInstance(), "_showWarning", Qt::BlockingQueuedConnection, QMetaObject::invokeMethod(this, "_showWarning", Qt::BlockingQueuedConnection,
Q_ARG(const QString&, title), Q_ARG(const QString&, msg)); Q_ARG(const QString&, title), Q_ARG(const QString&, msg));
} }
} }
@ -96,17 +62,12 @@ void GUI::showWarning(const QString& title, const QString& msg)
* @param title Title of error window. * @param title Title of error window.
* @param msg Text in error window. * @param msg Text in error window.
*/ */
void GUI::showError(const QString& title, const QString& msg) void MessageBoxManager::showError(const QString& title, const QString& msg)
{ {
if (QThread::currentThread() == qApp->thread()) { if (QThread::currentThread() == qApp->thread()) {
// If the GUI hasn't started yet and we're on the main thread, _showError(title, msg);
// we still want to be able to show error messages
if (!Nexus::getDesktopGUI())
QMessageBox::critical(nullptr, title, msg);
else
getInstance()._showError(title, msg);
} else { } else {
QMetaObject::invokeMethod(&getInstance(), "_showError", Qt::BlockingQueuedConnection, QMetaObject::invokeMethod(this, "_showError", Qt::BlockingQueuedConnection,
Q_ARG(const QString&, title), Q_ARG(const QString&, msg)); Q_ARG(const QString&, title), Q_ARG(const QString&, msg));
} }
} }
@ -120,13 +81,13 @@ void GUI::showError(const QString& title, const QString& msg)
* @param yesno Show "Yes" and "No" buttons. * @param yesno Show "Yes" and "No" buttons.
* @return True if the answer is positive, false otherwise. * @return True if the answer is positive, false otherwise.
*/ */
bool GUI::askQuestion(const QString& title, const QString& msg, bool defaultAns, bool warning, bool yesno) bool MessageBoxManager::askQuestion(const QString& title, const QString& msg, bool defaultAns, bool warning, bool yesno)
{ {
if (QThread::currentThread() == qApp->thread()) { if (QThread::currentThread() == qApp->thread()) {
return getInstance()._askQuestion(title, msg, defaultAns, warning, yesno); return _askQuestion(title, msg, defaultAns, warning, yesno);
} else { } else {
bool ret; bool ret;
QMetaObject::invokeMethod(&getInstance(), "_askQuestion", Qt::BlockingQueuedConnection, QMetaObject::invokeMethod(this, "_askQuestion", Qt::BlockingQueuedConnection,
Q_RETURN_ARG(bool, ret), Q_ARG(const QString&, title), Q_RETURN_ARG(bool, ret), Q_ARG(const QString&, title),
Q_ARG(const QString&, msg), Q_ARG(bool, defaultAns), Q_ARG(const QString&, msg), Q_ARG(bool, defaultAns),
Q_ARG(bool, warning), Q_ARG(bool, yesno)); Q_ARG(bool, warning), Q_ARG(bool, yesno));
@ -146,14 +107,14 @@ bool GUI::askQuestion(const QString& title, const QString& msg, bool defaultAns,
* @param warning If is true, we will use a special warning style. * @param warning If is true, we will use a special warning style.
* @return True if the answer is positive, false otherwise. * @return True if the answer is positive, false otherwise.
*/ */
bool GUI::askQuestion(const QString& title, const QString& msg, const QString& button1, bool MessageBoxManager::askQuestion(const QString& title, const QString& msg, const QString& button1,
const QString& button2, bool defaultAns, bool warning) const QString& button2, bool defaultAns, bool warning)
{ {
if (QThread::currentThread() == qApp->thread()) { if (QThread::currentThread() == qApp->thread()) {
return getInstance()._askQuestion(title, msg, button1, button2, defaultAns, warning); return _askQuestion(title, msg, button1, button2, defaultAns, warning);
} else { } else {
bool ret; bool ret;
QMetaObject::invokeMethod(&getInstance(), "_askQuestion", Qt::BlockingQueuedConnection, QMetaObject::invokeMethod(this, "_askQuestion", Qt::BlockingQueuedConnection,
Q_RETURN_ARG(bool, ret), Q_ARG(const QString&, title), Q_RETURN_ARG(bool, ret), Q_ARG(const QString&, title),
Q_ARG(const QString&, msg), Q_ARG(bool, defaultAns), Q_ARG(const QString&, msg), Q_ARG(bool, defaultAns),
Q_ARG(bool, warning)); Q_ARG(bool, warning));
@ -161,30 +122,61 @@ bool GUI::askQuestion(const QString& title, const QString& msg, const QString& b
} }
} }
void MessageBoxManager::confirmExecutableOpen(const QFileInfo& file)
{
static const QStringList dangerousExtensions = {"app", "bat", "com", "cpl", "dmg",
"exe", "hta", "jar", "js", "jse",
"lnk", "msc", "msh", "msh1", "msh1xml",
"msh2", "msh2xml", "mshxml", "msi", "msp",
"pif", "ps1", "ps1xml", "ps2", "ps2xml",
"psc1", "psc2", "py", "reg", "scf",
"sh", "src", "vb", "vbe", "vbs",
"ws", "wsc", "wsf", "wsh"};
if (dangerousExtensions.contains(file.suffix())) {
bool answer = askQuestion(tr("Executable file", "popup title"),
tr("You have asked qTox to open an executable file. "
"Executable files can potentially damage your computer. "
"Are you sure want to open this file?",
"popup text"),
false, true);
if (!answer) {
return;
}
// The user wants to run this file, so make it executable and run it
QFile(file.filePath())
.setPermissions(file.permissions() | QFile::ExeOwner | QFile::ExeUser | QFile::ExeGroup
| QFile::ExeOther);
}
QDesktopServices::openUrl(QUrl::fromLocalFile(file.filePath()));
}
// Private implementations // Private implementations
void MessageBoxManager::_showInfo(const QString& title, const QString& msg)
void GUI::_showInfo(const QString& title, const QString& msg)
{ {
QMessageBox messageBox(QMessageBox::Information, title, msg, QMessageBox::Ok, getMainWidget()); QMessageBox messageBox(QMessageBox::Information, title, msg, QMessageBox::Ok, this);
messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok")); messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok"));
messageBox.exec(); messageBox.exec();
} }
void GUI::_showWarning(const QString& title, const QString& msg) void MessageBoxManager::_showWarning(const QString& title, const QString& msg)
{ {
QMessageBox messageBox(QMessageBox::Warning, title, msg, QMessageBox::Ok, getMainWidget()); QMessageBox messageBox(QMessageBox::Warning, title, msg, QMessageBox::Ok, this);
messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok")); messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok"));
messageBox.exec(); messageBox.exec();
} }
void GUI::_showError(const QString& title, const QString& msg) void MessageBoxManager::_showError(const QString& title, const QString& msg)
{ {
QMessageBox messageBox(QMessageBox::Critical, title, msg, QMessageBox::Ok, getMainWidget()); QMessageBox messageBox(QMessageBox::Critical, title, msg, QMessageBox::Ok, this);
messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok")); messageBox.setButtonText(QMessageBox::Ok, QApplication::tr("Ok"));
messageBox.exec(); messageBox.exec();
} }
bool GUI::_askQuestion(const QString& title, const QString& msg, bool defaultAns, bool warning,
bool MessageBoxManager::_askQuestion(const QString& title, const QString& msg, bool defaultAns, bool warning,
bool yesno) bool yesno)
{ {
QString positiveButton = yesno ? QApplication::tr("Yes") : QApplication::tr("Ok"); QString positiveButton = yesno ? QApplication::tr("Yes") : QApplication::tr("Ok");
@ -193,11 +185,11 @@ bool GUI::_askQuestion(const QString& title, const QString& msg, bool defaultAns
return _askQuestion(title, msg, positiveButton, negativeButton, defaultAns, warning); return _askQuestion(title, msg, positiveButton, negativeButton, defaultAns, warning);
} }
bool GUI::_askQuestion(const QString& title, const QString& msg, const QString& button1, bool MessageBoxManager::_askQuestion(const QString& title, const QString& msg, const QString& button1,
const QString& button2, bool defaultAns, bool warning) const QString& button2, bool defaultAns, bool warning)
{ {
QMessageBox::Icon icon = warning ? QMessageBox::Warning : QMessageBox::Question; QMessageBox::Icon icon = warning ? QMessageBox::Warning : QMessageBox::Question;
QMessageBox box(icon, title, msg, QMessageBox::NoButton, getMainWidget()); QMessageBox box(icon, title, msg, QMessageBox::NoButton, this);
QPushButton* pushButton1 = box.addButton(button1, QMessageBox::AcceptRole); QPushButton* pushButton1 = box.addButton(button1, QMessageBox::AcceptRole);
QPushButton* pushButton2 = box.addButton(button2, QMessageBox::RejectRole); QPushButton* pushButton2 = box.addButton(button2, QMessageBox::RejectRole);
box.setDefaultButton(defaultAns ? pushButton1 : pushButton2); box.setDefaultButton(defaultAns ? pushButton1 : pushButton2);
@ -206,16 +198,3 @@ bool GUI::_askQuestion(const QString& title, const QString& msg, const QString&
box.exec(); box.exec();
return box.clickedButton() == pushButton1; return box.clickedButton() == pushButton1;
} }
// Other
/**
* @brief Get the main widget.
* @return The main QWidget* of the application
*/
QWidget* GUI::getMainWidget()
{
QWidget* maingui{nullptr};
maingui = Nexus::getDesktopGUI();
return maingui;
}

View File

@ -1,5 +1,5 @@
/* /*
Copyright © 2015-2019 by The qTox Project Contributors Copyright © 2022 by The qTox Project Contributors
This file is part of qTox, a Qt-based graphical interface for Tox. This file is part of qTox, a Qt-based graphical interface for Tox.
@ -17,31 +17,28 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>. along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/ */
#pragma once #pragma once
#include <QObject> #include <QObject>
#include <QWidget>
class QWidget; #include "src/widget/tool/imessageboxmanager.h"
class GUI : public QObject class QFileInfo;
class MessageBoxManager : public QWidget, public IMessageBoxManager
{ {
Q_OBJECT Q_OBJECT
public: public:
static GUI& getInstance(); ~MessageBoxManager() override = default;
static QWidget* getMainWidget(); void showInfo(const QString& title, const QString& msg) override;
static void showInfo(const QString& title, const QString& msg); void showWarning(const QString& title, const QString& msg) override;
static void showWarning(const QString& title, const QString& msg); void showError(const QString& title, const QString& msg) override;
static void showError(const QString& title, const QString& msg); bool askQuestion(const QString& title, const QString& msg, bool defaultAns = false,
static bool askQuestion(const QString& title, const QString& msg, bool defaultAns = false, bool warning = true, bool yesno = true) override;
bool warning = true, bool yesno = true); bool askQuestion(const QString& title, const QString& msg, const QString& button1,
const QString& button2, bool defaultAns = false, bool warning = true) override;
static bool askQuestion(const QString& title, const QString& msg, const QString& button1, void confirmExecutableOpen(const QFileInfo& file) override;
const QString& button2, bool defaultAns = false, bool warning = true);
private:
explicit GUI(QObject* parent = nullptr);
private slots: private slots:
// Private implementation, those must be called from the GUI thread // Private implementation, those must be called from the GUI thread

View File

@ -76,9 +76,9 @@
#include "src/widget/form/groupinviteform.h" #include "src/widget/form/groupinviteform.h"
#include "src/widget/form/profileform.h" #include "src/widget/form/profileform.h"
#include "src/widget/form/settingswidget.h" #include "src/widget/form/settingswidget.h"
#include "src/widget/gui.h"
#include "src/widget/style.h" #include "src/widget/style.h"
#include "src/widget/translator.h" #include "src/widget/translator.h"
#include "src/widget/tool/imessageboxmanager.h"
#include "tool/removefrienddialog.h" #include "tool/removefrienddialog.h"
#include "src/persistence/smileypack.h" #include "src/persistence/smileypack.h"
@ -142,7 +142,7 @@ void Widget::acceptFileTransfer(const ToxFile& file, const QString& path)
Widget* Widget::instance{nullptr}; Widget* Widget::instance{nullptr};
Widget::Widget(Profile &profile_, IAudioControl& audio_, CameraSource& cameraSource_, Widget::Widget(Profile &profile_, IAudioControl& audio_, CameraSource& cameraSource_,
Settings& settings_, Style& style_, QWidget* parent) Settings& settings_, Style& style_, IMessageBoxManager& messageBoxManager_, QWidget* parent)
: QMainWindow(parent) : QMainWindow(parent)
, profile{profile_} , profile{profile_}
, trayMenu{nullptr} , trayMenu{nullptr}
@ -159,6 +159,7 @@ Widget::Widget(Profile &profile_, IAudioControl& audio_, CameraSource& cameraSou
, documentCache(new DocumentCache(*smileyPack, settings)) , documentCache(new DocumentCache(*smileyPack, settings))
, cameraSource{cameraSource_} , cameraSource{cameraSource_}
, style{style_} , style{style_}
, messageBoxManager(messageBoxManager_)
{ {
installEventFilter(this); installEventFilter(this);
QString locale = settings.getTranslation(); QString locale = settings.getTranslation();
@ -264,7 +265,8 @@ void Widget::init()
sharedMessageProcessorParams.reset(new MessageProcessor::SharedParams(core->getMaxMessageSize(), coreExt->getMaxExtendedMessageSize())); sharedMessageProcessorParams.reset(new MessageProcessor::SharedParams(core->getMaxMessageSize(), coreExt->getMaxExtendedMessageSize()));
chatListWidget = new FriendListWidget(*core, this, settings, style, settings.getGroupchatPosition()); chatListWidget = new FriendListWidget(*core, this, settings, style,
messageBoxManager, settings.getGroupchatPosition());
connect(chatListWidget, &FriendListWidget::searchCircle, this, &Widget::searchCircle); connect(chatListWidget, &FriendListWidget::searchCircle, this, &Widget::searchCircle);
connect(chatListWidget, &FriendListWidget::connectCircleWidget, this, connect(chatListWidget, &FriendListWidget::connectCircleWidget, this,
&Widget::connectCircleWidget); &Widget::connectCircleWidget);
@ -292,8 +294,8 @@ void Widget::init()
style.setThemeColor(settings, settings.getThemeColor()); style.setThemeColor(settings, settings.getThemeColor());
CoreFile* coreFile = core->getCoreFile(); CoreFile* coreFile = core->getCoreFile();
filesForm = new FilesForm(*coreFile, settings, style); filesForm = new FilesForm(*coreFile, settings, style, messageBoxManager);
addFriendForm = new AddFriendForm(core->getSelfId(), settings, style); addFriendForm = new AddFriendForm(core->getSelfId(), settings, style, messageBoxManager);
groupInviteForm = new GroupInviteForm(settings); groupInviteForm = new GroupInviteForm(settings);
#if UPDATE_CHECK_ENABLED #if UPDATE_CHECK_ENABLED
@ -301,13 +303,13 @@ void Widget::init()
connect(updateCheck.get(), &UpdateCheck::updateAvailable, this, &Widget::onUpdateAvailable); connect(updateCheck.get(), &UpdateCheck::updateAvailable, this, &Widget::onUpdateAvailable);
#endif #endif
settingsWidget = new SettingsWidget(updateCheck.get(), audio, core, *smileyPack, settingsWidget = new SettingsWidget(updateCheck.get(), audio, core, *smileyPack,
cameraSource, settings, style, this); cameraSource, settings, style, messageBoxManager, this);
#if UPDATE_CHECK_ENABLED #if UPDATE_CHECK_ENABLED
updateCheck->checkForUpdate(); updateCheck->checkForUpdate();
#endif #endif
profileInfo = new ProfileInfo(core, &profile, settings); profileInfo = new ProfileInfo(core, &profile, settings);
profileForm = new ProfileForm(profileInfo, settings, style); profileForm = new ProfileForm(profileInfo, settings, style, messageBoxManager);
#if DESKTOP_NOTIFICATIONS #if DESKTOP_NOTIFICATIONS
notificationGenerator.reset(new NotificationGenerator(settings, &profile)); notificationGenerator.reset(new NotificationGenerator(settings, &profile));
@ -921,37 +923,6 @@ void Widget::onTransferClicked()
} }
} }
void Widget::confirmExecutableOpen(const QFileInfo& file)
{
static const QStringList dangerousExtensions = {"app", "bat", "com", "cpl", "dmg",
"exe", "hta", "jar", "js", "jse",
"lnk", "msc", "msh", "msh1", "msh1xml",
"msh2", "msh2xml", "mshxml", "msi", "msp",
"pif", "ps1", "ps1xml", "ps2", "ps2xml",
"psc1", "psc2", "py", "reg", "scf",
"sh", "src", "vb", "vbe", "vbs",
"ws", "wsc", "wsf", "wsh"};
if (dangerousExtensions.contains(file.suffix())) {
bool answer = GUI::askQuestion(tr("Executable file", "popup title"),
tr("You have asked qTox to open an executable file. "
"Executable files can potentially damage your computer. "
"Are you sure want to open this file?",
"popup text"),
false, true);
if (!answer) {
return;
}
// The user wants to run this file, so make it executable and run it
QFile(file.filePath())
.setPermissions(file.permissions() | QFile::ExeOwner | QFile::ExeUser | QFile::ExeGroup
| QFile::ExeOther);
}
QDesktopServices::openUrl(QUrl::fromLocalFile(file.filePath()));
}
void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason) void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason)
{ {
if (reason == QSystemTrayIcon::Trigger) { if (reason == QSystemTrayIcon::Trigger) {
@ -1182,11 +1153,11 @@ void Widget::addFriend(uint32_t friendId, const ToxPk& friendPk)
settings.updateFriendAddress(friendPk.toString()); settings.updateFriendAddress(friendPk.toString());
Friend* newfriend = FriendList::addFriend(friendId, friendPk, settings); Friend* newfriend = FriendList::addFriend(friendId, friendPk, settings);
auto dialogManager = ContentDialogManager::getInstance(); auto contentDialogManager = ContentDialogManager::getInstance();
auto rawChatroom = new FriendChatroom(newfriend, dialogManager, *core, settings); auto rawChatroom = new FriendChatroom(newfriend, contentDialogManager, *core, settings);
std::shared_ptr<FriendChatroom> chatroom(rawChatroom); std::shared_ptr<FriendChatroom> chatroom(rawChatroom);
const auto compact = settings.getCompactLayout(); const auto compact = settings.getCompactLayout();
auto widget = new FriendWidget(chatroom, compact, settings, style); auto widget = new FriendWidget(chatroom, compact, settings, style, messageBoxManager);
connectFriendWidget(*widget); connectFriendWidget(*widget);
auto history = profile.getHistory(); auto history = profile.getHistory();
@ -1201,7 +1172,7 @@ void Widget::addFriend(uint32_t friendId, const ToxPk& friendPk)
*friendMessageDispatcher); *friendMessageDispatcher);
auto friendForm = new ChatForm(profile, newfriend, *chatHistory, auto friendForm = new ChatForm(profile, newfriend, *chatHistory,
*friendMessageDispatcher, *documentCache, *smileyPack, cameraSource, *friendMessageDispatcher, *documentCache, *smileyPack, cameraSource,
settings, style); settings, style, messageBoxManager);
connect(friendForm, &ChatForm::updateFriendActivity, this, &Widget::updateFriendActivity); connect(friendForm, &ChatForm::updateFriendActivity, this, &Widget::updateFriendActivity);
friendMessageDispatchers[friendPk] = friendMessageDispatcher; friendMessageDispatchers[friendPk] = friendMessageDispatcher;
@ -1865,7 +1836,7 @@ void Widget::onUpdateAvailable()
ContentDialog* Widget::createContentDialog() const ContentDialog* Widget::createContentDialog() const
{ {
ContentDialog* contentDialog = new ContentDialog(*core, settings, style); ContentDialog* contentDialog = new ContentDialog(*core, settings, style, messageBoxManager);
registerContentDialog(*contentDialog); registerContentDialog(*contentDialog);
return contentDialog; return contentDialog;
@ -2153,8 +2124,8 @@ Group* Widget::createGroup(uint32_t groupnumber, const GroupId& groupId)
av->invalidateGroupCallPeerSource(*newgroup, user); av->invalidateGroupCallPeerSource(*newgroup, user);
}); });
} }
auto dialogManager = ContentDialogManager::getInstance(); auto contentDialogManager = ContentDialogManager::getInstance();
auto rawChatroom = new GroupChatroom(newgroup, dialogManager, *core); auto rawChatroom = new GroupChatroom(newgroup, contentDialogManager, *core);
std::shared_ptr<GroupChatroom> chatroom(rawChatroom); std::shared_ptr<GroupChatroom> chatroom(rawChatroom);
const auto compact = settings.getCompactLayout(); const auto compact = settings.getCompactLayout();
@ -2188,7 +2159,7 @@ Group* Widget::createGroup(uint32_t groupnumber, const GroupId& groupId)
groupAlertConnections.insert(groupId, notifyReceivedConnection); groupAlertConnections.insert(groupId, notifyReceivedConnection);
auto form = new GroupChatForm(*core, newgroup, *groupChatLog, *messageDispatcher, auto form = new GroupChatForm(*core, newgroup, *groupChatLog, *messageDispatcher,
settings, *documentCache, *smileyPack, style); settings, *documentCache, *smileyPack, style, messageBoxManager);
connect(&settings, &Settings::nameColorsChanged, form, &GenericChatForm::setColorizedNames); connect(&settings, &Settings::nameColorsChanged, form, &GenericChatForm::setColorizedNames);
form->setColorizedNames(settings.getEnableGroupChatsColor()); form->setColorizedNames(settings.getEnableGroupChatsColor());
groupMessageDispatchers[groupId] = messageDispatcher; groupMessageDispatchers[groupId] = messageDispatcher;

View File

@ -86,6 +86,7 @@ class ChatHistory;
class SmileyPack; class SmileyPack;
class CameraSource; class CameraSource;
class Style; class Style;
class IMessageBoxManager;
class Widget final : public QMainWindow class Widget final : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -119,8 +120,9 @@ private:
}; };
public: public:
Widget(Profile& profile_, IAudioControl& audio_, CameraSource& cameraSource, Settings& settings, Widget(Profile& profile_, IAudioControl& audio_, CameraSource& cameraSource,
Style& style, QWidget* parent = nullptr); Settings& settings, Style& style, IMessageBoxManager& messageBoxManager,
QWidget* parent = nullptr);
~Widget() override; ~Widget() override;
void init(); void init();
void setCentralWidget(QWidget* widget, const QString& widgetName); void setCentralWidget(QWidget* widget, const QString& widgetName);
@ -141,8 +143,6 @@ public:
ContentDialog* createContentDialog() const; ContentDialog* createContentDialog() const;
ContentLayout* createContentDialog(DialogType type) const; ContentLayout* createContentDialog(DialogType type) const;
static void confirmExecutableOpen(const QFileInfo& file);
void clearAllReceipts(); void clearAllReceipts();
static inline QIcon prepareIcon(QString path, int w = 0, int h = 0); static inline QIcon prepareIcon(QString path, int w = 0, int h = 0);
@ -389,6 +389,7 @@ private:
std::unique_ptr<DocumentCache> documentCache; std::unique_ptr<DocumentCache> documentCache;
CameraSource& cameraSource; CameraSource& cameraSource;
Style& style; Style& style;
IMessageBoxManager& messageBoxManager;
}; };
bool toxActivateEventHandler(const QByteArray& data, void* userData); bool toxActivateEventHandler(const QByteArray& data, void* userData);

23
translations/ar.ts vendored
View File

@ -1713,6 +1713,19 @@ Please make sure to enter the same password twice.</source>
<translation>فتح إعدادات</translation> <translation>فتح إعدادات</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">ملف تنفيدي</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">هل انت متأكد من فتح الملف ؟</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2877,16 +2890,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Status</source> <source>Status</source>
<translation>الحالة</translation> <translation>الحالة</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>ملف تنفيدي</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>هل انت متأكد من فتح الملف ؟</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>اسمك</translation> <translation>اسمك</translation>

23
translations/be.ts vendored
View File

@ -1712,6 +1712,19 @@ Please make sure to enter the same password twice.</source>
<translation>Адкрыць налады</translation> <translation>Адкрыць налады</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Выканальны файл</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Вы просіце, каб qTox адкрыў выканальны файл. Выканальныя файлы патэнцыйна могуць нанесці шкоду вашаму камп’ютару. Вы сапраўды хочаце адкрыць гэты файл?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2905,16 +2918,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Кантакты</translation> <translation>Кантакты</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Выканальны файл</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Вы просіце, каб qTox адкрыў выканальны файл. Выканальныя файлы патэнцыйна могуць нанесці шкоду вашаму камп’ютару. Вы сапраўды хочаце адкрыць гэты файл?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Стан</translation> <translation>Стан</translation>

23
translations/bg.ts vendored
View File

@ -1711,6 +1711,19 @@ Please make sure to enter the same password twice.</source>
<translation>Отворете настройките</translation> <translation>Отворете настройките</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Изпълним файл</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Поискали сте qTox да отвори изпълним файл. Изпълнимите файлове могат да навредят на компютъра. Сигурни ли сте, че искате да файлът да бъде отворен?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2890,16 +2903,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Status</source> <source>Status</source>
<translation>Статус</translation> <translation>Статус</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Изпълним файл</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Поискали сте qTox да отвори изпълним файл. Изпълнимите файлове могат да навредят на компютъра. Сигурни ли сте, че искате да файлът да бъде отворен?</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>Вашето име</translation> <translation>Вашето име</translation>

23
translations/cs.ts vendored
View File

@ -1713,6 +1713,19 @@ Ujistěte se, že zadáváte stejné heslo dvakrát.</translation>
<translation>Otevřít Nastavení</translation> <translation>Otevřít Nastavení</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Spustitelný soubor</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Požadujete aby qTox spustil soubor Spustitelné soubory mohou být rizikem pro váš počítač. Jste si jistý, že chcete tento soubor spustit?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ ID zahrnuje kód NoSpam (modře) a kontrolní součet (šedě).</translation>
<source>Contacts</source> <source>Contacts</source>
<translation>Kontakty</translation> <translation>Kontakty</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Spustitelný soubor</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Požadujete aby qTox spustil soubor Spustitelné soubory mohou být rizikem pro váš počítač. Jste si jistý, že chcete tento soubor spustit?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Stav</translation> <translation>Stav</translation>

23
translations/da.ts vendored
View File

@ -1702,6 +1702,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Udførbar fil</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Du har bedt qTox at åbne en udførbar fil. Udførbare filer kan potentielt skade din computer. Er du sikker på, st du ønsker at udføre denne fil?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Kontakter</translation> <translation>Kontakter</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Udførbar fil</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Du har bedt qTox at åbne en udførbar fil. Udførbare filer kan potentielt skade din computer. Er du sikker på, st du ønsker at udføre denne fil?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Status</translation> <translation>Status</translation>

23
translations/de.ts vendored
View File

@ -1718,6 +1718,19 @@ Bitte gib in beide Felder das gleiche Passwort ein.</translation>
<translation>Einstellungen öffnen</translation> <translation>Einstellungen öffnen</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Ausführbare Datei</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Du hast qTox aufgefordert, eine Datei auszuführen. Bitte beachte, dass ausführbare Dateien ein Sicherheitsrisiko darstellen können. Bist du dir sicher, dass du die Datei ausführen möchtest?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2914,16 +2927,6 @@ Diese ID enthält den NoSpam-Code (in blau) und die Prüfsumme (in grau).</trans
<source>Contacts</source> <source>Contacts</source>
<translation>Kontakte</translation> <translation>Kontakte</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Ausführbare Datei</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Du hast qTox aufgefordert, eine Datei auszuführen. Bitte beachte, dass ausführbare Dateien ein Sicherheitsrisiko darstellen können. Bist du dir sicher, dass du die Datei ausführen möchtest?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Status</translation> <translation>Status</translation>

23
translations/el.ts vendored
View File

@ -1701,6 +1701,19 @@ Please make sure to enter the same password twice.</source>
<translation>Άνοιγμα Ρυθμίσεων</translation> <translation>Άνοιγμα Ρυθμίσεων</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Εκτελέσιμο αρχείο</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Έχετε ζητήσει απ&apos; το qTox να ανοίξει ένα εκτελέσιμο αρχείο. Τα εκτελέσιμα αρχεία μπορούν ενδεχομένως να βλάψουν τον υπολογιστή σας. Είστε βέβαιοι ότι θέλετε να ανοίξετε αυτό το αρχείο;</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2861,16 +2874,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Status</source> <source>Status</source>
<translation>Κατάσταση</translation> <translation>Κατάσταση</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Εκτελέσιμο αρχείο</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Έχετε ζητήσει απ&apos; το qTox να ανοίξει ένα εκτελέσιμο αρχείο. Τα εκτελέσιμα αρχεία μπορούν ενδεχομένως να βλάψουν τον υπολογιστή σας. Είστε βέβαιοι ότι θέλετε να ανοίξετε αυτό το αρχείο;</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>Το όνομα σας</translation> <translation>Το όνομα σας</translation>

23
translations/eo.ts vendored
View File

@ -1694,6 +1694,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2849,16 +2862,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Status</source> <source>Status</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>Via nomo</translation> <translation>Via nomo</translation>

23
translations/es.ts vendored
View File

@ -1711,6 +1711,19 @@ Verifica que sean la misma en ambos recuadros.</translation>
<translation>Abrir opciones</translation> <translation>Abrir opciones</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Archivo ejecutable</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Has seleccionado que qTox abra un archivo ejecutable. Los archivos ejecutables pueden ser dañinos para tu computador. ¿Estás seguro de que quieres abrirlo?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2941,16 +2954,6 @@ Este ID incluye el código NoSpam (en azul), y la suma de comprobación (en gris
<source>Contacts</source> <source>Contacts</source>
<translation>Amigos</translation> <translation>Amigos</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Archivo ejecutable</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Has seleccionado que qTox abra un archivo ejecutable. Los archivos ejecutables pueden ser dañinos para tu computador. ¿Estás seguro de que quieres abrirlo?</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>Tu nombre</translation> <translation>Tu nombre</translation>

23
translations/et.ts vendored
View File

@ -1711,6 +1711,19 @@ Palun vaata, et sa mõlemal korral sisestad sama salasõna.</translation>
<translation>Ava seaded</translation> <translation>Ava seaded</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Käivitatav fail</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Oled palunud qToxil avada käivitatava faili. Sellised failid võivad teoreetiliselt sinu arvutit kahjustada. Kas oled kindel, et soovid faili avada?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2876,16 +2889,6 @@ See ID sisaldab NoSpam koodi (sinine) ja kontrollsumma (hall).</translation>
<source>Status</source> <source>Status</source>
<translation>Olek</translation> <translation>Olek</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Käivitatav fail</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Oled palunud qToxil avada käivitatava faili. Sellised failid võivad teoreetiliselt sinu arvutit kahjustada. Kas oled kindel, et soovid faili avada?</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>Sinu nimi</translation> <translation>Sinu nimi</translation>

23
translations/fa.ts vendored
View File

@ -1706,6 +1706,19 @@ Please make sure to enter the same password twice.</source>
<translation>بازکردن تنظیمات</translation> <translation>بازکردن تنظیمات</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">فایل اجرایی</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">شما از qTox خواسته اید که یک فایل اجرایی را باز کند. فایل های اجرایی میتوانند به شکل بالقوه صدمه جدی به سیستم شما بزنند. آیا اطمینان دارید که میخواهید این فایل را اجرا کنید؟</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2897,16 +2910,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>مخاطبین</translation> <translation>مخاطبین</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>فایل اجرایی</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>شما از qTox خواسته اید که یک فایل اجرایی را باز کند. فایل های اجرایی میتوانند به شکل بالقوه صدمه جدی به سیستم شما بزنند. آیا اطمینان دارید که میخواهید این فایل را اجرا کنید؟</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>وضعیت</translation> <translation>وضعیت</translation>

23
translations/fi.ts vendored
View File

@ -1710,6 +1710,19 @@ Varmista, että syötät saman salasanan kahdesti.</translation>
<translation>Avaa asetukset</translation> <translation>Avaa asetukset</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Suoritettava tiedosto</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Olet pyytänyt qToxia avaamaan tiedoston. Tämän tyyppiset tiedostot voivat mahdollisesti vahingoittaa konettasi. Oletko varma, että haluat avata tämän tiedoston?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2892,16 +2905,6 @@ Tämä ID sisältää spammin estävän koodin(joka on sinisellä), ja tarkistus
<source>Status</source> <source>Status</source>
<translation>Tila</translation> <translation>Tila</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Suoritettava tiedosto</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Olet pyytänyt qToxia avaamaan tiedoston. Tämän tyyppiset tiedostot voivat mahdollisesti vahingoittaa konettasi. Oletko varma, että haluat avata tämän tiedoston?</translation>
</message>
<message> <message>
<source>Add new circle...</source> <source>Add new circle...</source>
<translation>Lisää uusi piiri...</translation> <translation>Lisää uusi piiri...</translation>

23
translations/fr.ts vendored
View File

@ -1710,6 +1710,19 @@ Veuillez vous assurer d&apos;entrer deux fois le même mot de passe.</translatio
<translation>Ouvrir les paramètres</translation> <translation>Ouvrir les paramètres</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Fichier exécutable</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Vous avez demandé à qTox d&apos;ouvrir un fichier exécutable. Les fichiers exécutables peuvent potentiellement endommager votre ordinateur. Êtes-vous sûr(e) de vouloir ouvrir ce fichier&#xa0;?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2904,16 +2917,6 @@ Cet identifiant comprend le code NoSpam (en bleu) et la somme de contrôle (en g
<source>Contacts</source> <source>Contacts</source>
<translation>Contacts</translation> <translation>Contacts</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Fichier exécutable</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Vous avez demandé à qTox d&apos;ouvrir un fichier exécutable. Les fichiers exécutables peuvent potentiellement endommager votre ordinateur. Êtes-vous sûr(e) de vouloir ouvrir ce fichier&#xa0;?</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>Votre nom</translation> <translation>Votre nom</translation>

23
translations/gl.ts vendored
View File

@ -1709,6 +1709,19 @@ Please make sure to enter the same password twice.</source>
<translation>Abrir Configuración</translation> <translation>Abrir Configuración</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Arquivo executable</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Pediu a qTox que abra un ficheiro executable. Os ficheiros executables poden danar o ordenador. Ten a certeza de querer abrir este ficheiro?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2901,16 +2914,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Contactos</translation> <translation>Contactos</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Arquivo executable</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Pediu a qTox que abra un ficheiro executable. Os ficheiros executables poden danar o ordenador. Ten a certeza de querer abrir este ficheiro?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Estado</translation> <translation>Estado</translation>

23
translations/he.ts vendored
View File

@ -1702,6 +1702,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

23
translations/hr.ts vendored
View File

@ -1704,6 +1704,19 @@ Please make sure to enter the same password twice.</source>
<translation>Otvori postavke</translation> <translation>Otvori postavke</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Izvršna datoteka</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Tražiš od qToxa da otvori izvršnu datoteku. Zlonamjerne izvršne datoteke mogu oštetiti podatke. Zaista želiš pokrenuti ovu datoteku?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2876,16 +2889,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<comment>Button to set your status to &apos;Busy&apos;</comment> <comment>Button to set your status to &apos;Busy&apos;</comment>
<translation>Zauzet(a)</translation> <translation>Zauzet(a)</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Izvršna datoteka</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Tražiš od qToxa da otvori izvršnu datoteku. Zlonamjerne izvršne datoteke mogu oštetiti podatke. Zaista želiš pokrenuti ovu datoteku?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Stanje</translation> <translation>Stanje</translation>

23
translations/hu.ts vendored
View File

@ -1698,6 +1698,19 @@ Please make sure to enter the same password twice.</source>
<translation>Beállítások megnyitása</translation> <translation>Beállítások megnyitása</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Futtatható fájl</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Meg akart nyitni egy futtatható fájlt. Ezek a fájlok potenciálisan veszélyeztethetik a számítógépét. Valóban meg szeretné nyitni ezt a fájlt?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2868,16 +2881,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<comment>Button to set your status to &apos;Busy&apos;</comment> <comment>Button to set your status to &apos;Busy&apos;</comment>
<translation>Elfoglalt</translation> <translation>Elfoglalt</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Futtatható fájl</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Meg akart nyitni egy futtatható fájlt. Ezek a fájlok potenciálisan veszélyeztethetik a számítógépét. Valóban meg szeretné nyitni ezt a fájlt?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Állapot</translation> <translation>Állapot</translation>

23
translations/is.ts vendored
View File

@ -1702,6 +1702,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

23
translations/it.ts vendored
View File

@ -1710,6 +1710,19 @@ Per favore assicurati di inserire la stessa password due volte.</translation>
<translation>Apri Impostazioni</translation> <translation>Apri Impostazioni</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">File eseguibile</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Hai chiesto a qTox di aprire un file eseguibile. I file eseguibili possono danneggiare il tuo computer. Sei sicuro di voler aprire questo file?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2917,16 +2930,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Search Contacts</source> <source>Search Contacts</source>
<translation>Cerca tra i contatti</translation> <translation>Cerca tra i contatti</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>File eseguibile</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Hai chiesto a qTox di aprire un file eseguibile. I file eseguibili possono danneggiare il tuo computer. Sei sicuro di voler aprire questo file?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Stato</translation> <translation>Stato</translation>

23
translations/ja.ts vendored
View File

@ -1697,6 +1697,19 @@ Please make sure to enter the same password twice.</source>
<translation>設定を開く</translation> <translation>設定を開く</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">実行可能なファイル</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">qTox で実行可能なファイルを開こうとしています。実行可能なファイルはお使いのコンピューターに危害を加える可能性があります。このファイルを開いてもよろしいですか?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2856,16 +2869,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Status</source> <source>Status</source>
<translation>ステータス</translation> <translation>ステータス</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>実行可能なファイル</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>qTox で実行可能なファイルを開こうとしています。実行可能なファイルはお使いのコンピューターに危害を加える可能性があります。このファイルを開いてもよろしいですか?</translation>
</message>
<message> <message>
<source>Your name</source> <source>Your name</source>
<translation>名前</translation> <translation>名前</translation>

23
translations/kn.ts vendored
View File

@ -1702,6 +1702,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

23
translations/ko.ts vendored
View File

@ -1701,6 +1701,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">실행파일</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">실행파일을 열기하는것은 위험할 수 있습니다. 파일을 열기하시겠습니까?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2887,16 +2900,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>실행파일</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>실행파일을 열기하는것은 위험할 수 있습니다. 파일을 열기하시겠습니까?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>상태</translation> <translation>상태</translation>

23
translations/lt.ts vendored
View File

@ -1713,6 +1713,19 @@ Please make sure to enter the same password twice.</source>
<translation>Atverti nustatymus</translation> <translation>Atverti nustatymus</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Vykdomasis failas</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Nurodėte qTox atidaryti vykdomąjį failą (programą). Vykdomieji failai gali pakenkti Jūsų kompiuteriui. Ar norite tęsti?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2947,16 +2960,6 @@ Pasidalinkite ja su draugais, kad pradėtumėte kalbėtis.
<source>Contacts</source> <source>Contacts</source>
<translation>Kontaktai</translation> <translation>Kontaktai</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Vykdomasis failas</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Nurodėte qTox atidaryti vykdomąjį failą (programą). Vykdomieji failai gali pakenkti Jūsų kompiuteriui. Ar norite tęsti?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Būsena</translation> <translation>Būsena</translation>

23
translations/lv.ts vendored
View File

@ -1719,6 +1719,19 @@ Please make sure to enter the same password twice.</source>
<translation>Atvērt iestatījumus</translation> <translation>Atvērt iestatījumus</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2912,16 +2925,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished">Statuss</translation> <translation type="unfinished">Statuss</translation>

23
translations/mk.ts vendored
View File

@ -1712,6 +1712,19 @@ Please make sure to enter the same password twice.</source>
<translation>Отвори Поставки</translation> <translation>Отвори Поставки</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Извршна датотека</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Побаравте qTox да отвори извршна датотека. Извршните датотеки можат да му нанесат штета на вашиот компјутер. Дали сте сигурни дека сакате да ја отворите оваа датотека?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2905,16 +2918,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Извршна датотека</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Побаравте qTox да отвори извршна датотека. Извршните датотеки можат да му нанесат штета на вашиот компјутер. Дали сте сигурни дека сакате да ја отворите оваа датотека?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation></translation> <translation></translation>

23
translations/nl.ts vendored
View File

@ -1701,6 +1701,19 @@ Please make sure to enter the same password twice.</source>
<translation>Instellingen openen</translation> <translation>Instellingen openen</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Uitvoerbaar bestand</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Je hebt qTox gevraagd een uitvoerbaar bestand te openen. Uitvoerbare bestanden kunnen schade toebrengen aan je computer. Weet je zeker dat je dit bestand wilt openen?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2888,16 +2901,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Contacten</translation> <translation>Contacten</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Uitvoerbaar bestand</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Je hebt qTox gevraagd een uitvoerbaar bestand te openen. Uitvoerbare bestanden kunnen schade toebrengen aan je computer. Weet je zeker dat je dit bestand wilt openen?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Status</translation> <translation>Status</translation>

23
translations/nl_BE.ts vendored
View File

@ -1709,6 +1709,19 @@ Please make sure to enter the same password twice.</source>
<translation>Open instellingen</translation> <translation>Open instellingen</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Uitvoerbaar bestand</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Ge hebt qTox gevraagd voor een uitvoerbaar bestand te openen. Uitvoerbare bestanden kunnen schade toebrengen aan uwe computer. Zijt ge zeker dat ge dit bestand wilt openen?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2901,16 +2914,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Contacten</translation> <translation>Contacten</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Uitvoerbaar bestand</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Ge hebt qTox gevraagd voor een uitvoerbaar bestand te openen. Uitvoerbare bestanden kunnen schade toebrengen aan uwe computer. Zijt ge zeker dat ge dit bestand wilt openen?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation></translation> <translation></translation>

23
translations/no_nb.ts vendored
View File

@ -1703,6 +1703,19 @@ Please make sure to enter the same password twice.</source>
<translation>Åpne innstillinger</translation> <translation>Åpne innstillinger</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Kjørbar fil</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Du har spurt qTox om å åpne en kjørbar fil. Kjørbare filer kan forårsake skader på din maskin. Er du sikker du vil åpne denne filen?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2922,16 +2935,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Venner</translation> <translation>Venner</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Kjørbar fil</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Du har spurt qTox om å åpne en kjørbar fil. Kjørbare filer kan forårsake skader på din maskin. Er du sikker du vil åpne denne filen?</translation>
</message>
<message> <message>
<source>Search Contacts</source> <source>Search Contacts</source>
<translation>Søk i kontakter</translation> <translation>Søk i kontakter</translation>

24
translations/pl.ts vendored
View File

@ -1727,6 +1727,19 @@ Please make sure to enter the same password twice.</source>
<translation>Otwórz ustawienia</translation> <translation>Otwórz ustawienia</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Plik wykonywalny</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Zażądano od qToxa aby otworzyć plik wykonywalny. Wykonywalne pliki mogą potencjalnie uszkodzić twój komputer. Czy na pewno chcesz otworzyć ten plik?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2949,17 +2962,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<translatorcomment>better translation?</translatorcomment> <translatorcomment>better translation?</translatorcomment>
<translation>Szukaj znajomych</translation> <translation>Szukaj znajomych</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translatorcomment>better translation?</translatorcomment>
<translation>Plik wykonywalny</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Zażądano od qToxa aby otworzyć plik wykonywalny. Wykonywalne pliki mogą potencjalnie uszkodzić twój komputer. Czy na pewno chcesz otworzyć ten plik?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Status</translation> <translation>Status</translation>

23
translations/pt.ts vendored
View File

@ -1710,6 +1710,19 @@ Certifique-se de introduziu a mesma palavra-passe duas vezes.</translation>
<translation>Abrir configurações</translation> <translation>Abrir configurações</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Ficheiro executável</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Pediu ao qTox para abrir um ficheiro executável. Os executáveis podem potencialmente danificar o seu computador. Tem a certeza que quer abrir este ficheiro?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2936,16 +2949,6 @@ Este ID inclui o código NoSpam (em azul) e o checkum (em cinzento).</translatio
<source>Contacts</source> <source>Contacts</source>
<translation>Contactos</translation> <translation>Contactos</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Ficheiro executável</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Pediu ao qTox para abrir um ficheiro executável. Os executáveis podem potencialmente danificar o seu computador. Tem a certeza que quer abrir este ficheiro?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Estado</translation> <translation>Estado</translation>

23
translations/pt_BR.ts vendored
View File

@ -1718,6 +1718,19 @@ Certifique-se de que você entrou a mesma senha duas vezes.</translation>
<translation>Abrir Configurações</translation> <translation>Abrir Configurações</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Arquivo executável</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Você pediu ao qTox para abrir um arquivo executável. Executáveis podem potencialmente danificar seu computador. Tem certeza de que deseja abrir este arquivo?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2913,16 +2926,6 @@ Este ID inclui o código NoSpam (em azul) e o checkum (em cinza).</translation>
<source>Contacts</source> <source>Contacts</source>
<translation>Contatos</translation> <translation>Contatos</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Arquivo executável</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Você pediu ao qTox para abrir um arquivo executável. Executáveis podem potencialmente danificar seu computador. Tem certeza de que deseja abrir este arquivo?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Status</translation> <translation>Status</translation>

23
translations/ro.ts vendored
View File

@ -1721,6 +1721,19 @@ Vă rugăm să vă asigurați că introduceți aceeași parolă de două ori.</t
<translation>Deschideți setările</translation> <translation>Deschideți setările</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Fișier executabil</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Sunteți întrebat de qTox pentru deschiderea unui fișier executabil. Fișierele executabile pot deteriora computerul. Sigur doriți să deschideți acest fișier?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2917,16 +2930,6 @@ Acest ID include codul NoSpam (în albastru) și suma de control (în gri).</tra
<source>Contacts</source> <source>Contacts</source>
<translation>Contacte</translation> <translation>Contacte</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Fișier executabil</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Sunteți întrebat de qTox pentru deschiderea unui fișier executabil. Fișierele executabile pot deteriora computerul. Sigur doriți să deschideți acest fișier?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Stare</translation> <translation>Stare</translation>

23
translations/ru.ts vendored
View File

@ -1716,6 +1716,19 @@ Please make sure to enter the same password twice.</source>
<translation>Открыть настройки</translation> <translation>Открыть настройки</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Исполняемый файл</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Вы просите qTox открыть исполняемый файл. Исполняемые файлы могут нанести вред вашему компьютеру. Вы уверены, что хотите открыть этот файл?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2960,16 +2973,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation>Контакты</translation> <translation>Контакты</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Исполняемый файл</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Вы просите qTox открыть исполняемый файл. Исполняемые файлы могут нанести вред вашему компьютеру. Вы уверены, что хотите открыть этот файл?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Статус</translation> <translation>Статус</translation>

23
translations/si.ts vendored
View File

@ -1702,6 +1702,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

23
translations/sk.ts vendored
View File

@ -1721,6 +1721,19 @@ Prosím, uistite sa, že ste zadali to isté heslo dvakrát.</translation>
<translation>Otvoriť nastavenia</translation> <translation>Otvoriť nastavenia</translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Spustiteľný súbor</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Požiadali ste qTox o spustenie spustiteľného súboru. Spustiteľné súbory môžu poškodiť váš počítač. Naozaj chcete tento súbor otvoriť?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2917,16 +2930,6 @@ Toto ID obsahuje kód NoSpam (modrou) a kontrolný súčet (šedou).</translatio
<source>Contacts</source> <source>Contacts</source>
<translation>Kontakty</translation> <translation>Kontakty</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Spustiteľný súbor</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Požiadali ste qTox o spustenie spustiteľného súboru. Spustiteľné súbory môžu poškodiť váš počítač. Naozaj chcete tento súbor otvoriť?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation>Stav</translation> <translation>Stav</translation>

23
translations/sl.ts vendored
View File

@ -1708,6 +1708,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished">Zagonska datoteka</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished">Želiš odpreti zagonsko datoteko. Te datoteke so lahko nevarne in škodijo računalniku. Želiš vseeno odpreti?</translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2878,16 +2891,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<comment>Button to set your status to &apos;Busy&apos;</comment> <comment>Button to set your status to &apos;Busy&apos;</comment>
<translation>Zaseden</translation> <translation>Zaseden</translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation>Zagonska datoteka</translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation>Želiš odpreti zagonsko datoteko. Te datoteke so lahko nevarne in škodijo računalniku. Želiš vseeno odpreti?</translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished">Stanje</translation> <translation type="unfinished">Stanje</translation>

23
translations/sq.ts vendored
View File

@ -1702,6 +1702,19 @@ Please make sure to enter the same password twice.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>MessageBoxManager</name>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>NetCamView</name> <name>NetCamView</name>
<message> <message>
@ -2889,16 +2902,6 @@ This ID includes the NoSpam code (in blue), and the checksum (in gray).</source>
<source>Contacts</source> <source>Contacts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Executable file</source>
<comment>popup title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<source>You have asked qTox to open an executable file. Executable files can potentially damage your computer. Are you sure want to open this file?</source>
<comment>popup text</comment>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Status</source> <source>Status</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>

Some files were not shown because too many files have changed in this diff Show More