From 04657d2c1da2df8ee764adedf2e9656b48046bd4 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 12 Sep 2014 15:23:20 +0200 Subject: [PATCH 01/30] added ToxID struct --- corestructs.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/corestructs.h b/corestructs.h index ebaab4534..a2bb6f31f 100644 --- a/corestructs.h +++ b/corestructs.h @@ -10,6 +10,32 @@ class QTimer; enum class Status : int {Online = 0, Away, Busy, Offline}; +#define TOX_ID_PUBLIC_KEY_LENGTH 64 +#define TOX_ID_NO_SPAM_LENGTH 8 +#define TOX_ID_CHECKSUM_LENGTH 4 + +struct ToxID +{ + QString publicKey; + QString noSpam; + QString checkSum; + + QString toString() const + { + return publicKey + noSpam + checkSum; + } + + ToxID static fromString(QString id) + { + ToxID toxID; + toxID.publicKey = id.left(TOX_ID_PUBLIC_KEY_LENGTH); + toxID.noSpam = id.mid(TOX_ID_PUBLIC_KEY_LENGTH, TOX_ID_NO_SPAM_LENGTH); + toxID.checkSum = id.right(TOX_ID_CHECKSUM_LENGTH); + return toxID; + } + +}; + struct DhtServer { QString name; From c3a8cd01f37e4b0530c3b0c1e541328d87ab9e4c Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 12 Sep 2014 15:32:15 +0200 Subject: [PATCH 02/30] removed settingsform, removed selfcamview from widget --- qtox.pro | 2 - widget/form/settingsform.cpp | 142 ----------------------------------- widget/form/settingsform.h | 67 ----------------- widget/widget.cpp | 36 +-------- widget/widget.h | 6 -- 5 files changed, 1 insertion(+), 252 deletions(-) delete mode 100644 widget/form/settingsform.cpp delete mode 100644 widget/form/settingsform.h diff --git a/qtox.pro b/qtox.pro index 7b52d779c..4bc5bba89 100644 --- a/qtox.pro +++ b/qtox.pro @@ -79,7 +79,6 @@ win32 { HEADERS += widget/form/addfriendform.h \ widget/form/chatform.h \ widget/form/groupchatform.h \ - widget/form/settingsform.h \ widget/form/filesform.h \ widget/tool/chattextedit.h \ widget/tool/friendrequestdialog.h \ @@ -116,7 +115,6 @@ SOURCES += \ widget/form/addfriendform.cpp \ widget/form/chatform.cpp \ widget/form/groupchatform.cpp \ - widget/form/settingsform.cpp \ widget/form/filesform.cpp \ widget/tool/chattextedit.cpp \ widget/tool/friendrequestdialog.cpp \ diff --git a/widget/form/settingsform.cpp b/widget/form/settingsform.cpp deleted file mode 100644 index 3d4a213da..000000000 --- a/widget/form/settingsform.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2014 by Project Tox - - This file is part of qTox, a Qt-based graphical interface for Tox. - - This program 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. - This program 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 COPYING file for more details. -*/ - -#include "settingsform.h" -#include "widget/widget.h" -#include "settings.h" -#include "smileypack.h" -#include "ui_mainwindow.h" -#include -#include -#include -#include -#include - -SettingsForm::SettingsForm() - : QObject() -{ - main = new QWidget(), head = new QWidget(); - QFont bold, small; - bold.setBold(true); - small.setPixelSize(13); - small.setKerning(false); - headLabel.setText(tr("User Settings","\"Headline\" of the window")); - headLabel.setFont(bold); - - nameLabel.setText(tr("Name","Username/nick")); - statusTextLabel.setText(tr("Status","Status message")); - idLabel.setText("Tox ID " + tr("(click here to copy)", "Click on this text to copy TID to clipboard")); - id.setFont(small); - id.setTextInteractionFlags(Qt::TextSelectableByMouse); - id.setReadOnly(true); - id.setFrameStyle(QFrame::NoFrame); - id.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - id.setFixedHeight(id.document()->size().height()*2); - - videoTest.setText(tr("Test video","Text on a button to test the video/webcam")); - enableIPv6.setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); - enableIPv6.setChecked(Settings::getInstance().getEnableIPv6()); - useTranslations.setText(tr("Use translations","Text on a checkbox to enable translations")); - useTranslations.setChecked(Settings::getInstance().getUseTranslations()); - makeToxPortable.setText(tr("Make Tox portable","Text on a checkbox to make qTox a portable application")); - makeToxPortable.setChecked(Settings::getInstance().getMakeToxPortable()); - makeToxPortable.setToolTip(tr("Save settings to the working directory instead of the usual conf dir","describes makeToxPortable checkbox")); - - smileyPackLabel.setText(tr("Smiley Pack", "Text on smiley pack label")); - for (auto entry : SmileyPack::listSmileyPacks()) - smileyPackBrowser.addItem(entry.first, entry.second); - smileyPackBrowser.setCurrentIndex(smileyPackBrowser.findData(Settings::getInstance().getSmileyPack())); - - main->setLayout(&layout); - layout.addWidget(&nameLabel); - layout.addWidget(&name); - layout.addWidget(&statusTextLabel); - layout.addWidget(&statusText); - layout.addWidget(&idLabel); - layout.addWidget(&id); - layout.addWidget(&videoTest); - layout.addWidget(&enableIPv6); - layout.addWidget(&useTranslations); - layout.addWidget(&makeToxPortable); - layout.addWidget(&smileyPackLabel); - layout.addWidget(&smileyPackBrowser); - layout.addStretch(); - - head->setLayout(&headLayout); - headLayout.addWidget(&headLabel); - - connect(&videoTest, SIGNAL(clicked()), this, SLOT(onTestVideoClicked())); - connect(&enableIPv6, SIGNAL(stateChanged(int)), this, SLOT(onEnableIPv6Updated())); - connect(&useTranslations, SIGNAL(stateChanged(int)), this, SLOT(onUseTranslationUpdated())); - connect(&makeToxPortable, SIGNAL(stateChanged(int)), this, SLOT(onMakeToxPortableUpdated())); - connect(&idLabel, SIGNAL(clicked()), this, SLOT(copyIdClicked())); - connect(&smileyPackBrowser, SIGNAL(currentIndexChanged(int)), this, SLOT(onSmileyBrowserIndexChanged(int))); -} - -SettingsForm::~SettingsForm() -{ -} - -void SettingsForm::setFriendAddress(const QString& friendAddress) -{ - QString txt{friendAddress}; - txt.insert(38,'\n'); - id.setText(txt); -} - -void SettingsForm::show(Ui::MainWindow &ui) -{ - name.setText(ui.nameLabel->text()); - statusText.setText(ui.statusLabel->text()); - ui.mainContent->layout()->addWidget(main); - ui.mainHead->layout()->addWidget(head); - main->show(); - head->show(); -} - -void SettingsForm::onTestVideoClicked() -{ - Widget::getInstance()->showTestCamview(); -} - -void SettingsForm::onEnableIPv6Updated() -{ - Settings::getInstance().setEnableIPv6(enableIPv6.isChecked()); -} - -void SettingsForm::copyIdClicked() -{ - id.selectAll(); - QString txt = id.toPlainText(); - txt.replace('\n',""); - QApplication::clipboard()->setText(txt); -} - -void SettingsForm::onUseTranslationUpdated() -{ - Settings::getInstance().setUseTranslations(useTranslations.isChecked()); -} - -void SettingsForm::onMakeToxPortableUpdated() -{ - Settings::getInstance().setMakeToxPortable(makeToxPortable.isChecked()); -} - -void SettingsForm::onSmileyBrowserIndexChanged(int index) -{ - QString filename = smileyPackBrowser.itemData(index).toString(); - Settings::getInstance().setSmileyPack(filename); -} diff --git a/widget/form/settingsform.h b/widget/form/settingsform.h deleted file mode 100644 index a081d01fb..000000000 --- a/widget/form/settingsform.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2014 by Project Tox - - This file is part of qTox, a Qt-based graphical interface for Tox. - - This program 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. - This program 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 COPYING file for more details. -*/ - -#ifndef SETTINGSFORM_H -#define SETTINGSFORM_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "widget/croppinglabel.h" - -namespace Ui {class MainWindow;} -class QString; - -class SettingsForm : public QObject -{ - Q_OBJECT -public: - SettingsForm(); - ~SettingsForm(); - - void show(Ui::MainWindow &ui); - -public slots: - void setFriendAddress(const QString& friendAddress); - -private slots: - void onTestVideoClicked(); - void onEnableIPv6Updated(); - void onUseTranslationUpdated(); - void onMakeToxPortableUpdated(); - void onSmileyBrowserIndexChanged(int index); - void copyIdClicked(); - -private: - QLabel headLabel, nameLabel, statusTextLabel, smileyPackLabel; - QTextEdit id; - CroppingLabel idLabel; - QPushButton videoTest; - QCheckBox enableIPv6, useTranslations, makeToxPortable; - QVBoxLayout layout, headLayout; - QWidget *main, *head; - QComboBox smileyPackBrowser; -public: - QLineEdit name, statusText; -}; - -#endif // SETTINGSFORM_H diff --git a/widget/widget.cpp b/widget/widget.cpp index abe14460a..532a47664 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -155,7 +155,6 @@ Widget::Widget(QWidget *parent) ui->statusButton->style()->polish(ui->statusButton); camera = new Camera; - camview = new SelfCamView(camera); // Disable some widgets until we're connected to the DHT ui->statusButton->setEnabled(false); @@ -179,7 +178,6 @@ Widget::Widget(QWidget *parent) connect(core, &Core::statusSet, this, &Widget::onStatusSet); connect(core, &Core::usernameSet, this, &Widget::setUsername); connect(core, &Core::statusMessageSet, this, &Widget::setStatusMessage); - connect(core, &Core::friendAddressGenerated, &settingsForm, &SettingsForm::setFriendAddress); connect(core, SIGNAL(fileDownloadFinished(const QString&)), &filesForm, SLOT(onFileDownloadComplete(const QString&))); connect(core, SIGNAL(fileUploadFinished(const QString&)), &filesForm, SLOT(onFileUploadComplete(const QString&))); connect(core, &Core::friendAdded, this, &Widget::addFriend); @@ -210,8 +208,6 @@ Widget::Widget(QWidget *parent) connect(setStatusOnline, SIGNAL(triggered()), this, SLOT(setStatusOnline())); connect(setStatusAway, SIGNAL(triggered()), this, SLOT(setStatusAway())); connect(setStatusBusy, SIGNAL(triggered()), this, SLOT(setStatusBusy())); - connect(&settingsForm.name, SIGNAL(editingFinished()), this, SLOT(onUsernameChanged())); - connect(&settingsForm.statusText, SIGNAL(editingFinished()), this, SLOT(onStatusMessageChanged())); connect(&friendForm, SIGNAL(friendRequested(QString,QString)), this, SIGNAL(friendRequested(QString,QString))); coreThread->start(); @@ -228,7 +224,6 @@ Widget::~Widget() if (!coreThread->isFinished()) coreThread->terminate(); delete core; - delete camview; hideMainForms(); @@ -338,9 +333,7 @@ void Widget::onTransferClicked() void Widget::onSettingsClicked() { - hideMainForms(); - settingsForm.show(*ui); - activeChatroomWidget = nullptr; + } void Widget::hideMainForms() @@ -357,20 +350,10 @@ void Widget::hideMainForms() } } -void Widget::onUsernameChanged() -{ - const QString newUsername = settingsForm.name.text(); - ui->nameLabel->setText(newUsername); - ui->nameLabel->setToolTip(newUsername); // for overlength names - settingsForm.name.setText(newUsername); - core->setUsername(newUsername); -} - void Widget::onUsernameChanged(const QString& newUsername, const QString& oldUsername) { ui->nameLabel->setText(oldUsername); // restore old username until Core tells us to set it ui->nameLabel->setToolTip(oldUsername); // for overlength names - settingsForm.name.setText(oldUsername); core->setUsername(newUsername); } @@ -378,23 +361,12 @@ void Widget::setUsername(const QString& username) { ui->nameLabel->setText(username); ui->nameLabel->setToolTip(username); // for overlength names - settingsForm.name.setText(username); -} - -void Widget::onStatusMessageChanged() -{ - const QString newStatusMessage = settingsForm.statusText.text(); - ui->statusLabel->setText(newStatusMessage); - ui->statusLabel->setToolTip(newStatusMessage); // for overlength messsages - settingsForm.statusText.setText(newStatusMessage); - core->setStatusMessage(newStatusMessage); } void Widget::onStatusMessageChanged(const QString& newStatusMessage, const QString& oldStatusMessage) { ui->statusLabel->setText(oldStatusMessage); // restore old status message until Core tells us to set it ui->statusLabel->setToolTip(oldStatusMessage); // for overlength messsages - settingsForm.statusText.setText(oldStatusMessage); core->setStatusMessage(newStatusMessage); } @@ -402,7 +374,6 @@ void Widget::setStatusMessage(const QString &statusMessage) { ui->statusLabel->setText(statusMessage); ui->statusLabel->setToolTip(statusMessage); // for overlength messsages - settingsForm.statusText.setText(statusMessage); } void Widget::addFriend(int friendId, const QString &userId) @@ -677,11 +648,6 @@ Group *Widget::createGroup(int groupId) return newgroup; } -void Widget::showTestCamview() -{ - camview->show(); -} - void Widget::onEmptyGroupCreated(int groupId) { createGroup(groupId); diff --git a/widget/widget.h b/widget/widget.h index 1fbecb412..653d72f1f 100644 --- a/widget/widget.h +++ b/widget/widget.h @@ -19,7 +19,6 @@ #include #include "widget/form/addfriendform.h" -#include "widget/form/settingsform.h" #include "widget/form/filesform.h" #include "corestructs.h" @@ -54,7 +53,6 @@ public: QThread* getCoreThread(); Camera* getCamera(); static Widget* getInstance(); - void showTestCamview(); void newMessageAlert(); bool isFriendWidgetCurActiveWidget(Friend* f); bool getIsWindowMinimized(); @@ -83,8 +81,6 @@ private slots: void onFailedToStartCore(); void onUsernameChanged(const QString& newUsername, const QString& oldUsername); void onStatusMessageChanged(const QString& newStatusMessage, const QString& oldStatusMessage); - void onUsernameChanged(); - void onStatusMessageChanged(); void setUsername(const QString& username); void setStatusMessage(const QString &statusMessage); void addFriend(int friendId, const QString& userId); @@ -137,12 +133,10 @@ private: Core* core; QThread* coreThread; AddFriendForm friendForm; - SettingsForm settingsForm; FilesForm filesForm; static Widget* instance; GenericChatroomWidget* activeChatroomWidget; FriendListWidget* contactListWidget; - SelfCamView* camview; Camera* camera; bool notify(QObject *receiver, QEvent *event); bool eventFilter(QObject *, QEvent *event); From 28e8406be9aaad2e3fd523ce356d95b0e5b34f71 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 12 Sep 2014 15:41:41 +0200 Subject: [PATCH 03/30] added settingsdialog --- core.cpp | 5 +- core.h | 2 +- qtox.pro | 6 +- widget/form/addfriendform.cpp | 2 +- widget/settingsdialog.cpp | 355 ++++++++++++++++++++++++++++++++++ widget/settingsdialog.h | 64 ++++++ 6 files changed, 427 insertions(+), 7 deletions(-) create mode 100644 widget/settingsdialog.cpp create mode 100644 widget/settingsdialog.h diff --git a/core.cpp b/core.cpp index 876301a63..fe1e3187b 100644 --- a/core.cpp +++ b/core.cpp @@ -718,12 +718,11 @@ void Core::setUsername(const QString& username) } } -QString Core::getSelfId() +ToxID Core::getSelfId() { uint8_t friendAddress[TOX_FRIEND_ADDRESS_SIZE]; tox_get_address(tox, friendAddress); - - return CFriendAddress::toString(friendAddress); + return ToxID::fromString(CFriendAddress::toString(friendAddress)); } QString Core::getStatusMessage() diff --git a/core.h b/core.h index 96ab86d2d..13d051017 100644 --- a/core.h +++ b/core.h @@ -49,7 +49,7 @@ public: QString getUsername(); QString getStatusMessage(); - QString getSelfId(); + ToxID getSelfId(); void increaseVideoBusyness(); void decreaseVideoBusyness(); diff --git a/qtox.pro b/qtox.pro index 4bc5bba89..96e609c33 100644 --- a/qtox.pro +++ b/qtox.pro @@ -109,7 +109,8 @@ HEADERS += widget/form/addfriendform.h \ filetransferinstance.h \ corestructs.h \ coredefines.h \ - coreav.h + coreav.h \ + widget/settingsdialog.h SOURCES += \ widget/form/addfriendform.cpp \ @@ -145,4 +146,5 @@ SOURCES += \ widget/tool/chataction.cpp \ widget/chatareawidget.cpp \ filetransferinstance.cpp \ - corestructs.cpp + corestructs.cpp \ + widget/settingsdialog.cpp diff --git a/widget/form/addfriendform.cpp b/widget/form/addfriendform.cpp index 3a44ae672..2c9b197b2 100644 --- a/widget/form/addfriendform.cpp +++ b/widget/form/addfriendform.cpp @@ -95,7 +95,7 @@ void AddFriendForm::onSendTriggered() if (id.isEmpty()) { showWarning(tr("Please fill in a valid Tox ID","Tox ID of the friend you're sending a friend request to")); } else if (isToxId(id)) { - if (id.toUpper() == Core::getInstance()->getSelfId().toUpper()) + if (id.toUpper() == Core::getInstance()->getSelfId().toString().toUpper()) showWarning(tr("You can't add yourself as a friend !","When trying to add your own Tox ID as friend")); else emit friendRequested(id, getMessage()); diff --git a/widget/settingsdialog.cpp b/widget/settingsdialog.cpp new file mode 100644 index 000000000..09cb765c1 --- /dev/null +++ b/widget/settingsdialog.cpp @@ -0,0 +1,355 @@ +#include "settingsdialog.h" +#include "settings.h" +#include "widget.h" +#include "camera.h" +#include "selfcamview.h" +#include "core.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +// ======================================= +// settings pages +//======================================== +class GeneralPage : public QWidget +{ +public: + GeneralPage(QWidget *parent = 0) : + QWidget(parent) + { + QGroupBox *group = new QGroupBox(tr("General Settings"), this); + + enableIPv6 = new QCheckBox(this); + enableIPv6->setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); + useTranslations = new QCheckBox(this); + useTranslations->setText(tr("Use translations","Text on a checkbox to enable translations")); + makeToxPortable = new QCheckBox(this); + makeToxPortable->setText(tr("Make Tox portable","Text on a checkbox to make qTox a portable application")); + makeToxPortable->setToolTip(tr("Save settings to the working directory instead of the usual conf dir","describes makeToxPortable checkbox")); + + QVBoxLayout *vLayout = new QVBoxLayout(); + vLayout->addWidget(enableIPv6); + vLayout->addWidget(useTranslations); + vLayout->addWidget(makeToxPortable); + group->setLayout(vLayout); + + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->addWidget(group); + mainLayout->addStretch(1); + setLayout(mainLayout); + } + + QCheckBox* enableIPv6; + QCheckBox* useTranslations; + QCheckBox* makeToxPortable; +}; + +class IdentityPage : public QWidget +{ +public: + IdentityPage(QWidget* parent = 0) : + QWidget(parent) + { + // public + QGroupBox *publicGroup = new QGroupBox(tr("Public Information"), this); + QLabel* userNameLabel = new QLabel(tr("Name","Username/nick"), this); + userName = new QLineEdit(this); + QLabel* statusMessageLabel = new QLabel(tr("Status","Status message"), this); + statusMessage = new QLineEdit(this); + QVBoxLayout *vLayout = new QVBoxLayout(); + vLayout->addWidget(userNameLabel); + vLayout->addWidget(userName); + vLayout->addWidget(statusMessageLabel); + vLayout->addWidget(statusMessage); + publicGroup->setLayout(vLayout); + + // tox + QGroupBox* toxGroup = new QGroupBox(tr("Tox ID"), this); + QLabel* toxIdLabel = new QLabel(tr("Your Tox ID"), this); + toxID = new QLineEdit(this); + toxID->setReadOnly(true); + QVBoxLayout* toxLayout = new QVBoxLayout(); + toxLayout->addWidget(toxIdLabel); + toxLayout->addWidget(toxID); + toxGroup->setLayout(toxLayout); + + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->setSpacing(30); + mainLayout->addWidget(publicGroup); + mainLayout->addWidget(toxGroup); + mainLayout->addStretch(1); + setLayout(mainLayout); + } + + QLineEdit* userName; + QLineEdit* statusMessage; + QLineEdit* toxID; +}; + +class PrivacyPage : public QWidget +{ +public: + PrivacyPage(QWidget* parent = 0) : + QWidget(parent) + {} +}; + +class AVPage : public QWidget +{ + Q_OBJECT +public: + AVPage(SettingsDialog* parent = 0) : + QWidget(parent) + { + QGroupBox *group = new QGroupBox(tr("Video Settings"), this); + + camView = new SelfCamView(Camera::getInstance()); + camView->hide(); // hide by default + testVideo = new QPushButton("enable video"); + connect(testVideo, SIGNAL(clicked()), this, SLOT(onTestVideoPressed())); + + QVBoxLayout *vLayout = new QVBoxLayout(); + vLayout->addWidget(testVideo); + vLayout->addWidget(camView); + group->setLayout(vLayout); + + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->addWidget(group); + mainLayout->addStretch(1); + setLayout(mainLayout); + } + + ~AVPage() + { + delete camView; + } + + void showTestVideo() + { + testVideo->setText("disable video"); + camView->show(); + } + + void closeTestVideo() + { + testVideo->setText("enable video"); + camView->close(); + } + + QPushButton* testVideo; + SelfCamView* camView; + +public slots: + void onTestVideoPressed() + { + if (camView->isVisible()) { + closeTestVideo(); + } else { + showTestVideo(); + } + } +}; + +// allows Q_OBJECT macro inside cpp +#include "settingsdialog.moc" + + + +// ======================================= +// settings dialog +//======================================== +SettingsDialog::SettingsDialog(Widget *parent) : + QDialog(parent), + widget(parent) +{ + createPages(); + createButtons(); + createConnections(); + createLayout(); + setWindowTitle(tr("Settings Dialog")); +} + +void SettingsDialog::createPages() +{ + generalPage = new GeneralPage(this); + identityPage = new IdentityPage(this); + privacyPage = new PrivacyPage(this); + avPage = new AVPage(this); + + contentsWidget = new QListWidget; + contentsWidget->setViewMode(QListView::IconMode); + contentsWidget->setIconSize(QSize(100, 73)); + contentsWidget->setMovement(QListView::Static); + contentsWidget->setMaximumWidth(110); + contentsWidget->setMinimumWidth(110); + contentsWidget->setSpacing(0); + contentsWidget->setFlow(QListView::TopToBottom); + + pagesWidget = new QStackedWidget; + pagesWidget->addWidget(generalPage); + pagesWidget->addWidget(identityPage); + pagesWidget->addWidget(privacyPage); + pagesWidget->addWidget(avPage); + + QListWidgetItem *generalButton = new QListWidgetItem(contentsWidget); + generalButton->setIcon(QIcon(":/img/settings/general.png")); + generalButton->setText(tr("General")); + generalButton->setTextAlignment(Qt::AlignHCenter); + generalButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QListWidgetItem *identity = new QListWidgetItem(contentsWidget); + identity->setIcon(QIcon(":/img/settings/identity.png")); + identity->setText(tr("Identity")); + identity->setTextAlignment(Qt::AlignHCenter); + identity->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QListWidgetItem *privacy = new QListWidgetItem(contentsWidget); + privacy->setIcon(QIcon(":/img/settings/privacy.png")); + privacy->setText(tr("Privacy")); + privacy->setTextAlignment(Qt::AlignHCenter); + privacy->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QListWidgetItem *av = new QListWidgetItem(contentsWidget); + av->setIcon(QIcon(":/img/settings/av.png")); + av->setText(tr("Audio/Video")); + av->setTextAlignment(Qt::AlignHCenter); + av->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + contentsWidget->setCurrentRow(0); +} + +void SettingsDialog::createButtons() +{ + okButton = new QPushButton(tr("Ok"), this); + cancelButton = new QPushButton(tr("Cancel"), this); + applyButton = new QPushButton(tr("Apply"), this); +} + +void SettingsDialog::createConnections() +{ + connect(okButton, SIGNAL(clicked()), this, SLOT(okPressed())); + connect(cancelButton, SIGNAL(clicked()), this, SLOT(close())); + connect(applyButton, SIGNAL(clicked()), this, SLOT(applyPressed())); + connect( + contentsWidget, + SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), + this, + SLOT(changePage(QListWidgetItem*,QListWidgetItem*)) + ); +} + +void SettingsDialog::createLayout() +{ + setMinimumSize(800, 500); + + QHBoxLayout *buttonsLayout = new QHBoxLayout(); + buttonsLayout->addStretch(1); + buttonsLayout->addWidget(okButton); + buttonsLayout->addWidget(cancelButton); + buttonsLayout->addWidget(applyButton); + + QHBoxLayout *hLayout = new QHBoxLayout(); + hLayout->addWidget(contentsWidget); + hLayout->addWidget(pagesWidget, 1); + + QVBoxLayout *mainLayout = new QVBoxLayout(); + mainLayout->addLayout(hLayout); + mainLayout->addLayout(buttonsLayout); + setLayout(mainLayout); +} + +void SettingsDialog::changePage(QListWidgetItem *current, QListWidgetItem *previous) +{ + if (!current) { + current = previous; + } + pagesWidget->setCurrentIndex(contentsWidget->row(current)); +} + +void SettingsDialog::okPressed() +{ + writeConfig(); + close(); +} + +void SettingsDialog::cancelPressed() +{ + close(); +} + +void SettingsDialog::applyPressed() +{ + writeConfig(); +} + +void SettingsDialog::readConfig() +{ + Settings& settings = Settings::getInstance(); + Core* core = widget->getCore(); + + generalPage->enableIPv6->setChecked(settings.getEnableIPv6()); + generalPage->useTranslations->setChecked(settings.getUseTranslations()); + generalPage->makeToxPortable->setChecked(settings.getMakeToxPortable()); + + identityPage->userName->setText(core->getUsername()); + identityPage->statusMessage->setText(core->getStatusMessage()); + identityPage->toxID->setText(core->getSelfId().toString()); +} + +void SettingsDialog::writeConfig() +{ + Settings& settings = Settings::getInstance(); + Core* core = widget->getCore(); + + + // only save settings if something changed + bool saveSettings = false; + if (settings.getEnableIPv6() != generalPage->enableIPv6->isChecked()) { + settings.setEnableIPv6(generalPage->enableIPv6->isChecked()); + saveSettings = true; + } + + if (settings.getUseTranslations() != generalPage->useTranslations->isChecked()) { + settings.setUseTranslations(generalPage->useTranslations->isChecked()); + saveSettings = true; + } + + if (settings.getMakeToxPortable() != generalPage->makeToxPortable->isChecked()) { + settings.setMakeToxPortable(generalPage->makeToxPortable->isChecked()); + saveSettings = true; + } + + if (saveSettings) { + settings.save(); + } + + + // changing core settings will automatically save them + QString userName = identityPage->userName->text(); + if (core->getUsername() != userName) { + core->setUsername(userName); + } + + QString statusMessage = identityPage->statusMessage->text(); + if (core->getStatusMessage() != statusMessage) { + core->setStatusMessage(statusMessage); + } +} + +Widget* SettingsDialog::getWidget() +{ + return widget; +} + +void SettingsDialog::closeEvent(QCloseEvent* e){ + avPage->closeTestVideo(); + QDialog::closeEvent(e); +} diff --git a/widget/settingsdialog.h b/widget/settingsdialog.h new file mode 100644 index 000000000..55575b447 --- /dev/null +++ b/widget/settingsdialog.h @@ -0,0 +1,64 @@ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include +#include + +class Widget; +class SelfCamView; +class Camera; +class GeneralPage; +class IdentityPage; +class PrivacyPage; +class AVPage; + +class QListWidget; +class QListWidgetItem; +class QStackedWidget; +class QPushButton; +class QCheckBox; +class QLineEdit; + +// ======================================= +// settings dialog +//======================================== +class SettingsDialog : public QDialog +{ + Q_OBJECT +public: + explicit SettingsDialog(Widget *parent); + + void readConfig(); + void writeConfig(); + Widget* getWidget(); + void closeEvent(QCloseEvent *); + +public slots: + void changePage(QListWidgetItem *current, QListWidgetItem *previous); + void okPressed(); + void cancelPressed(); + void applyPressed(); + +private: + void createPages(); + void createButtons(); + void createConnections(); + void createLayout(); + + Widget* widget; + + // pages + GeneralPage* generalPage; + IdentityPage* identityPage; + PrivacyPage* privacyPage; + AVPage* avPage; + QListWidget* contentsWidget; + QStackedWidget* pagesWidget; + + // buttons + QPushButton* okButton; + QPushButton* cancelButton; + QPushButton* applyButton; +}; + +#endif // SETTINGSDIALOG_H From 4e5d1c170b2aa4b2f02986c8ac7fe8fc7dead950 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 12 Sep 2014 15:45:02 +0200 Subject: [PATCH 04/30] do not use getInstance of camera --- widget/settingsdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/settingsdialog.cpp b/widget/settingsdialog.cpp index 09cb765c1..0f11ee67c 100644 --- a/widget/settingsdialog.cpp +++ b/widget/settingsdialog.cpp @@ -111,7 +111,7 @@ public: { QGroupBox *group = new QGroupBox(tr("Video Settings"), this); - camView = new SelfCamView(Camera::getInstance()); + camView = new SelfCamView(parent->getWidget()->getCamera()); camView->hide(); // hide by default testVideo = new QPushButton("enable video"); connect(testVideo, SIGNAL(clicked()), this, SLOT(onTestVideoPressed())); From 1b2855e05be699e123f9b220e93207085bf6bfbc Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 12 Sep 2014 15:46:34 +0200 Subject: [PATCH 05/30] use settings dialog in widget --- widget/widget.cpp | 5 ++++- widget/widget.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/widget/widget.cpp b/widget/widget.cpp index 532a47664..36b2c33c1 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -31,6 +31,7 @@ #include "widget/friendlistwidget.h" #include "camera.h" #include "widget/form/chatform.h" +#include "widget/settingsdialog.h" #include #include #include @@ -155,6 +156,7 @@ Widget::Widget(QWidget *parent) ui->statusButton->style()->polish(ui->statusButton); camera = new Camera; + settingsDialog = new SettingsDialog(this); // Disable some widgets until we're connected to the DHT ui->statusButton->setEnabled(false); @@ -333,7 +335,8 @@ void Widget::onTransferClicked() void Widget::onSettingsClicked() { - + settingsDialog->readConfig(); + settingsDialog->show(); } void Widget::hideMainForms() diff --git a/widget/widget.h b/widget/widget.h index 653d72f1f..035ea2ae0 100644 --- a/widget/widget.h +++ b/widget/widget.h @@ -37,6 +37,7 @@ class QMenu; class Core; class Camera; class FriendListWidget; +class SettingsDialog; class Widget : public QMainWindow { @@ -134,6 +135,7 @@ private: QThread* coreThread; AddFriendForm friendForm; FilesForm filesForm; + SettingsDialog* settingsDialog; static Widget* instance; GenericChatroomWidget* activeChatroomWidget; FriendListWidget* contactListWidget; From f3ecf4fa0f39b5b80e55b176a6c8e3f4fc5ad4e5 Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 12 Sep 2014 15:50:39 +0200 Subject: [PATCH 06/30] added images --- img/settings/av.png | Bin 0 -> 6360 bytes img/settings/general.png | Bin 0 -> 2902 bytes img/settings/identity.png | Bin 0 -> 4771 bytes img/settings/privacy.png | Bin 0 -> 1883 bytes res.qrc | 4 ++++ 5 files changed, 4 insertions(+) create mode 100644 img/settings/av.png create mode 100644 img/settings/general.png create mode 100644 img/settings/identity.png create mode 100644 img/settings/privacy.png diff --git a/img/settings/av.png b/img/settings/av.png new file mode 100644 index 0000000000000000000000000000000000000000..f96f88ea84299b2428780a15d29ae37db6601c90 GIT binary patch literal 6360 zcmZ8mcRbYpAOGChBQ7p3iHjqN$WF*CL>)Su$Osu(*-0*YWUr7N%3c}ai|oW@l)aL@ zv&Zp!_wVn#&v_j89-M>;uP+c-R(4Z1^#N=7NMRx0 zH!K?Aaf>NLrrKfZzd;Q8jB#hRf+#}8z#qt^lcMWmvO8 zO-}4$n%7eb^7*Bur5!h?6}XYKZOU5Xz1t@`4h_4%7Qr-B292*t`;Ty>0bGHuQy7b& zZ;vIJiWV>8kF1K;v?oWKS=lN|C4S1_;X}qJUTflDLk=setFMGPBA@ZX4lgfGdTmU2 zoSqymY}Cv$bj0x7|AsM@5#|f^kQ-vPWa#R~rD??ODm~*;#rnarD z)tZkhc&EYZ?BMN9TFSl`nMR)BZ4Wz~mu&PTb#`{n^rT2``=T@S1r!G=!w4uw_7x`u z1iJghhy#B!YQs=WQz-@m7We1i;CRAJPk9{4A^Q?8zvWET*&{h+m}70Q-yVKRC2xQx zvcqqA*`{W~e)ze>$NW&mOvtD)L#6%koU-7^nwxpWNZ6x6k8S;gfR-6T$LyPqSy+pq ziGq#}^JRu0z1yk1XELtKgPn6R$UTvnD+i?0sX}~3`<$Z`xP4S0th*eca$YW-F+4mR zi@VTe&UE;SBR~-rpxFE>ow%UsS7gl=+C~?aY=JKopi@9JZOceS_yGuXI7MM-1iB*% z+VvCKz)n4JIQN~sy&G&ORInif_68OD`-J-xsiZqWFlBD{rD?^825-3lU7+drD{4&j zPlQl`*TSv?6cn#?E^LDV78kYr4iUFa@Kvks@y;$rLAlnstd=NBt7HkgzN6h0QlFJe zN4HSpI4#=kXF*{Q=j#JX6|Gat!@qNJe4z+(7<s0|p zKgTcE8eCmy7J#-#n&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V((X!aVC5xip;-AgovM~CTeigCe*5irdwP0y2O~R} zj$*MGWLZXQYb!KOLo5~x6N-wWAdyHw(=-r5!ZVWP`lGY6v$eCcv-|AXv&T#RvMvaz zDGnVv^!)z)`+r@Y?kFcCh`55z4y+{5Duj^GhmSkt2t0-@bh_ zBIG;3G|k1USFfJ#>gsxC%a$$eLqkI+UVH7e7vF#X{ogGtEQ|wa*t~i3<7>}>c%Fyz z=g*%xdi3aT-+c4U!)MN%`EzGy=a0I(ySp!4x^(%ix853 zb0!EvV^dR8YiDO?1^{MfXBV>B>|M@zu2yaO5Bn4=b6SA25dZ)H07*qoM6N<$f)8R< A^8f$< literal 0 HcmV?d00001 diff --git a/img/settings/identity.png b/img/settings/identity.png new file mode 100644 index 0000000000000000000000000000000000000000..806bb525efc2ea73d087891152331199cf543f99 GIT binary patch literal 4771 zcmV;U5?t+xP)pX+Z!05->?b zK~#9!?OSP(T-9~{&b{}&*UNOzD$Qs#qXn(VnB5EDfCLh@g(4shE*m?pa!A=u;!2Dw zq)5sOlpU&!9c)rm3cE;5oOr`Fp&XJ>#u(YbfDHj8EFmF~MiPTYGtz85-Tjt(&&iMX zrZo}{h_b|@>2K;x_jFI+`}%(OtoJ;ii6)w8qKPJ&XrhTGnrNblCYorXi6)w8qKPJ& zIL^?s@k<~2w-3>2on6Iw?LqhFuY7y_okyOtZ8+0`WEHNbn%?EF*#^)Gejln?DA6dz+D!wP|jAOM`>hy{Oj-WHm_&J~d`0TAQ@AMBh_MC(`1Z=Kq)zw*fIajoiP zC*#U@EnFLO_!*t|QH|?}NTb-=hPHAE6jwo~2!Qa-AGvt>*-b)D0BT9? zvnC)UHU@G9NUng%${5_#A#}EtF|WG|>(*V2C{7xm5fL>xId%Q4_aWc@yH9pirzSTF zu+C`Hoy+HS5adUdXEymk?%y|j;)cDiX1opO^)8HDeYY}9+IS##=qVP^-_eOh^ZU^` ze=$~_a~?W6yYRsMKgADz@FUb})l5^UUda2M-}~j>`m7`5?pv<)M@9}^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{pQa<_dk#B81I=|{@{wGy}dni+RSv6<(QEq7P*{< z(eWx;3c*pS(6O}W9{ImA<73Q>BynlbKm@G_&avzo7_M%4X73ZVYIIX;SANSIosi@1 z{srEpyE4^Eq!#|NO4g=606mw70ed?QKPs&-{w<7ii{f{D*xe`SI<5ni(}@RqyoqPD3e zdLkLl6@o%O;ke9>+lf$QM%l3|iy+S|1`3)of`s6N;S|V{LQG0kG|{9|Q~~J6HPSHL=#Ok(ZuVG{{unv?i}@|sk{IH002ovPDHLkV1ltS11|so literal 0 HcmV?d00001 diff --git a/img/settings/privacy.png b/img/settings/privacy.png new file mode 100644 index 0000000000000000000000000000000000000000..763478290b8b0592c3f155013ad7d4f4637608d1 GIT binary patch literal 1883 zcmV-h2c-CkP)gtR(J>n?~InQFIz8Zp$*KF3uN*QzsEcO+*L2 zVsvxPDEeXVbMj$R=K|s@i$dni#++G1%<$~a5JaK4vQi3dub1wFHSvXNOYd!Z;rzd~ z_c_mVpZ@N1&ON8+UVw^xFDhcjDpmk^#SmvO+S+WVD3HKm zYy_}Q!Vu#PaR#rg%~nmvkf+0#0pRr0&Mhh`sv|Km@lVrWQGR+?hrBca%_03oNgM|SAEX#HuJalk>baeC`KPCyj*q}fjR))U=>FMdE zNl8gvy>*3}54JLMf2cq_OCnyMlD0hP@mC6-l?0yZT zM>!mhp=VB?87zjc&aTdZk)ChF1L1jIyX&J}3wfRoxk@@59R>;{M0vel#jRVnUf5W) zaZ)ILTrQW=X0s(zARn((jj^>8+2_L!~1HL5QY6M3UR>)-PMStf;1@Cbl>2 zD~?yB$steK00DsZ_V(fLE_(Ol{8jl=?RNWsK-<;S)Wp`;*Qd)N$4FXS3~FbHN~N+7 z89L-z{Gj+I(_oWz?6|QvoE=V;Uaxo0nLDT9LED*GGvB{ne|_qc{1J{Q`V|m!irD~Q z1%TH8j0B*QB2Gp|#;5!C@B8Wg=MC#OOgehx=&Ih_aRc}pKskUC!jXUbOqXR&F~1Ig z1F#9e^HRZ3C=}gu-=2H<{^!k`Hjh8{!?6{;bf@#3>m~r4F9-Qoh%b>J!x1a_+2jjn z&Ys!pa5$KyOP0?1F;c@|7{;^vlih2ps;bPD zXDeqpoz5Xr+*bfdAso3QS0LK}6o#YJS(g1z5QHe6=d}`tDkdB$lIs`}mVVba6MrTQ zFeJ}OY9OP~_atdf10+6qNtd;wqN1Gf@$vQAf!a2uQYmyeI$~Q|T1HD;DQYC;QMZQpiYr_(*OTg2gTFhw5}rB_x~z7wV{Ojd)s=+9+DM@P5q*tuhqCChUANp>es zoE);gVEvY^uC7?I&q2yry;5cukT-8--ma&?002vt<#yi6yj{NegKQ)#AS04TT+CUV zLjtwWS)4;gB#*dAfk>pZw6qK1XhVSnsEHFNHin}O1rnfQV`JUnXhVSnsLPix$A_a0 z1rngnojW%!9Bn9&09AXXc1G=$T3rzKy4owXGbj*=#Phs1cX@7JApfV^?e+n=%X9PO zHd~k5#1PHR&0{Q?mcr_)YNJ1!>Z)p^CDT&a+}u1yZu!X$2mrKNTSsr*vNgM|uI{n! ztFEq2w{^?b>{e^*XgTI4yS1#ixVY>2tMfm5bZ5z<`u@A`llFYFXNk>b6MeZ{%C#(6 z0ZD!~`NH8NhY#rW`n!SH+wJxNv)`JXd*h!QFUtjpY`QFy$#k`>ysRWp7yzKx>+hD8 zmz9`IrmJ)e5m5}oxQn+JAL#8vpT*mY4=@blra(keYHI5F$x|lxdZ)+aDU4WWrS7uI`{1}+E@vQn0d({s7#+Tx literal 0 HcmV?d00001 diff --git a/res.qrc b/res.qrc index cbf038a58..6a121b0ad 100644 --- a/res.qrc +++ b/res.qrc @@ -135,5 +135,9 @@ ui/fileTransferInstance/emptyRGreenFileButton.png ui/fileTransferInstance/emptyRRedFileButton.png audio/notification.pcm + img/settings/general.png + img/settings/identity.png + img/settings/privacy.png + img/settings/av.png From 7e7cebf6b62f657f180d12ff87d573f90a1ea3b3 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Fri, 12 Sep 2014 19:09:05 +0200 Subject: [PATCH 07/30] added smiley selection to the new settings dialog, new default search- --- smileypack.cpp | 36 +++++++++++++++++++++++++----------- smileypack.h | 9 ++++++--- widget/settingsdialog.cpp | 23 +++++++++++++++++++++++ 3 files changed, 54 insertions(+), 14 deletions(-) diff --git a/smileypack.cpp b/smileypack.cpp index 5af07194f..57a754c76 100644 --- a/smileypack.cpp +++ b/smileypack.cpp @@ -40,24 +40,38 @@ SmileyPack& SmileyPack::getInstance() return smileyPack; } -QList > SmileyPack::listSmileyPacks(const QString &path) +QList > SmileyPack::listSmileyPacks(const QStringList &paths) { QList > smileyPacks; - QDir dir(path); - foreach (const QString& subdirectory, dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) + for (QString path : paths) { - dir.cd(subdirectory); + if (path.leftRef(1) == "~") + path.replace(0, 1, QDir::homePath()); - QFileInfoList entries = dir.entryInfoList(QStringList() << "emoticons.xml", QDir::Files); - if (entries.size() > 0) // does it contain a file called emoticons.xml? + QDir dir(path); + if (!dir.exists()) + continue; + + for (const QString& subdirectory : dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot)) { - QString packageName = dir.dirName(); - QString relPath = QDir(QCoreApplication::applicationDirPath()).relativeFilePath(entries[0].absoluteFilePath()); - smileyPacks << QPair(packageName, relPath); + dir.cd(subdirectory); + + QFileInfoList entries = dir.entryInfoList(QStringList() << "emoticons.xml", QDir::Files); + if (entries.size() > 0) // does it contain a file called emoticons.xml? + { + QString packageName = dir.dirName(); + QString absPath = entries[0].absoluteFilePath(); + QString relPath = QDir(QCoreApplication::applicationDirPath()).relativeFilePath(absPath); + + if (relPath.leftRef(2) == "..") + smileyPacks << QPair(packageName, absPath); + else + smileyPacks << QPair(packageName, relPath); // use relative path for subdirectories + } + + dir.cdUp(); } - - dir.cdUp(); } return smileyPacks; diff --git a/smileypack.h b/smileypack.h index 9f4ea31ba..1d4c9ef30 100644 --- a/smileypack.h +++ b/smileypack.h @@ -22,7 +22,10 @@ #include #include -#define SMILEYPACK_DEFAULT_PATH "./smileys" +#define SMILEYPACK_SEARCH_PATHS \ + { \ + "./smileys", "/usr/share/qtox/smileys", "/usr/share/emoticons", "~/.kde4/share/emoticons", "~/.kde/share/emoticons" \ + } //maps emoticons to smileys class SmileyPack : public QObject @@ -30,10 +33,10 @@ class SmileyPack : public QObject Q_OBJECT public: static SmileyPack& getInstance(); - static QList> listSmileyPacks(const QString& path = SMILEYPACK_DEFAULT_PATH); + static QList > listSmileyPacks(const QStringList& paths = SMILEYPACK_SEARCH_PATHS); static bool isValid(const QString& filename); - bool load(const QString &filename); + bool load(const QString& filename); QString smileyfied(QString msg); QList getEmoticons() const; QString getAsRichText(const QString& key); diff --git a/widget/settingsdialog.cpp b/widget/settingsdialog.cpp index 0f11ee67c..4f9c26a9b 100644 --- a/widget/settingsdialog.cpp +++ b/widget/settingsdialog.cpp @@ -4,6 +4,7 @@ #include "camera.h" #include "selfcamview.h" #include "core.h" +#include "smileypack.h" #include #include @@ -14,6 +15,7 @@ #include #include #include +#include // ======================================= @@ -41,8 +43,23 @@ public: vLayout->addWidget(makeToxPortable); group->setLayout(vLayout); + // theme + QGroupBox* themeGroup = new QGroupBox(tr("Theme")); + QLabel* smileyLabel = new QLabel(tr("Smiley Pack")); + smileyPack = new QComboBox(this); + + auto smileyPacks = SmileyPack::listSmileyPacks(); + for(auto pack : smileyPacks) + smileyPack->addItem(QString("%1 (%2)").arg(pack.first).arg(pack.second), pack.second); + + QVBoxLayout* themeLayout = new QVBoxLayout(); + themeLayout->addWidget(smileyLabel); + themeLayout->addWidget(smileyPack); + themeGroup->setLayout(themeLayout); + QVBoxLayout *mainLayout = new QVBoxLayout(); mainLayout->addWidget(group); + mainLayout->addWidget(themeGroup); mainLayout->addStretch(1); setLayout(mainLayout); } @@ -50,6 +67,7 @@ public: QCheckBox* enableIPv6; QCheckBox* useTranslations; QCheckBox* makeToxPortable; + QComboBox* smileyPack; }; class IdentityPage : public QWidget @@ -327,6 +345,11 @@ void SettingsDialog::writeConfig() saveSettings = true; } + if (settings.getSmileyPack() != generalPage->smileyPack->currentData().toString()) { + settings.setSmileyPack(generalPage->smileyPack->currentData().toString()); + saveSettings = true; + } + if (saveSettings) { settings.save(); } From 968b46a86bfaa3b1ed86405be45d8af9a81d6bf8 Mon Sep 17 00:00:00 2001 From: apprb Date: Sat, 13 Sep 2014 01:54:03 +0700 Subject: [PATCH 08/30] get rid of .setBlockFormat(..) in ChatAreaWidget::insertMessage(..) function --- widget/chatareawidget.cpp | 12 ++++++------ widget/tool/chataction.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/widget/chatareawidget.cpp b/widget/chatareawidget.cpp index 203633386..199420e9f 100644 --- a/widget/chatareawidget.cpp +++ b/widget/chatareawidget.cpp @@ -44,10 +44,10 @@ ChatAreaWidget::ChatAreaWidget(QWidget *parent) : chatTextTable->format().setCellSpacing(2); chatTextTable->format().setWidth(QTextLength(QTextLength::PercentageLength,100)); - nameFormat.setAlignment(Qt::AlignRight); - nameFormat.setNonBreakableLines(true); - dateFormat.setAlignment(Qt::AlignLeft); - dateFormat.setNonBreakableLines(true); +// nameFormat.setAlignment(Qt::AlignRight); +// nameFormat.setNonBreakableLines(true); +// dateFormat.setAlignment(Qt::AlignLeft); +// dateFormat.setNonBreakableLines(true); connect(this, &ChatAreaWidget::anchorClicked, this, &ChatAreaWidget::onAnchorClicked); connect(verticalScrollBar(), SIGNAL(rangeChanged(int,int)), this, SLOT(onSliderRangeChanged())); @@ -104,8 +104,8 @@ void ChatAreaWidget::insertMessage(ChatAction *msgAction) checkSlider(); int row = chatTextTable->rows() - 1; - chatTextTable->cellAt(row,0).firstCursorPosition().setBlockFormat(nameFormat); - chatTextTable->cellAt(row,2).firstCursorPosition().setBlockFormat(dateFormat); +// chatTextTable->cellAt(row,0).firstCursorPosition().setBlockFormat(nameFormat); +// chatTextTable->cellAt(row,2).firstCursorPosition().setBlockFormat(dateFormat); QTextCursor cur = chatTextTable->cellAt(row,1).firstCursorPosition(); cur.clearSelection(); cur.setKeepPositionOnInsert(true); diff --git a/widget/tool/chataction.cpp b/widget/tool/chataction.cpp index 0847abdda..3587eb600 100644 --- a/widget/tool/chataction.cpp +++ b/widget/tool/chataction.cpp @@ -43,9 +43,9 @@ QString ChatAction::QImage2base64(const QImage &img) QString ChatAction::getName() { if (isMe) - return QString("
" + toHtmlChars(name) + "
"); + return QString("
" + toHtmlChars(name) + "
"); else - return QString("
" + toHtmlChars(name) + "
"); + return QString("
" + toHtmlChars(name) + "
"); } QString ChatAction::getDate() From 77b44fde99f13c5dbc03e1699c06bb8a0132eaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=B0=D1=80=D0=B8=D0=BA?= Date: Fri, 12 Sep 2014 23:32:31 +0400 Subject: [PATCH 09/30] update russian translation --- translations/ru.qm | Bin 5393 -> 6821 bytes translations/ru.ts | 324 ++++++++++++++++++++++++++++++++------------- 2 files changed, 235 insertions(+), 89 deletions(-) diff --git a/translations/ru.qm b/translations/ru.qm index c772943133073ce31997eb21dd0a3a5bdfb10569..be9acca27be53db64295085b086a990c5702861b 100644 GIT binary patch delta 2933 zcmaJ?Yiv_x7=E{Yy{(sZT?Y$HIGaPnAdGF5ZtT`=uoV~^Fo!6jhxU{m>3T+c##sDO zjgVl_csYthmJFjLB2gd^<2Bw;kf=YrC5E6RMoGM2qQq-ZpYLnet&X{5{m%EE_wu~Y zdpVEXaLAu(cqvkP_NURuKP)eMVQRCm6H$a$QCLk1D+qR!zuyfOrhC-BEUzcvrp_M%F8!> z_UJD}wlOv`szYAE_J>{r&=R(P&tpV|yVIvzxy!tC<vp90C=0M`SUXf=zY|(ZPuG$C~DE1u(K?*Xze%S{LY$JiuZ-zSPSMo zfwRi`@aaDQ{O6SQ?8W(Zyo+maGD039oHkE?^$PZ12VMz==^E^t4L^*D{^cQ zb_ZRj&NRSorRz+^CjdO~F&;oEb-2zRfMJ2^E?ZoI+T7wU+aH0!ukM<$%|zCE_qss? zwVUN$xA!O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gJ)H==?! z*q;kO0%(Yf@UF-$r2z*B-Be{SWS?!plVFL)_flIpkGw@6CP!A}@2-F5e~6 zpEXRlZvp>;AuC$D(cv|N_{0bpwHPv^6$o52>UOJyJ~mpaFTx+soz`jN`cE%_&^?px z^cfH-Fl7hdBH~8OGmBv;mo}pGFHT4Vj_V6ZFrTw~F2z8o)IK~3$sM!y;n^zy zykS4$LA-IszC3;v(O)NsiW^p5D>%kw-E0r*W6i9Q`PqKr)i-NnKGwkoOe(YizrwD_ zNkNM6f+R{t)t39#>2W{9s#p-wZO994&nKR$sS&mS^Woi&I4>R*`yeVljtpOxg;*yW zqJ6nA7=x?{U_pcgSP<4`_|?=_HV98pOAE0=NOVJVVIj|-A~G!Z)?$SXH2-{_U!orjer zXR*@iys5nC=veu|xmTwwmGx&sREN&@qyIKk4QbLfX|i={UH8Hk#JC2aKqoZV!H(+l z{7UMg$wYL5j|&p|75OMw)~kH2M+8|;q)w!Jpp!O7KXU@Cl_`t%q+4O?U91=PbU;L}z@ zm7tmVl(nJ~WyxjE+D6iX#BXxhfv=(UKw`hTUKng{>mfMg^g{Lko&nZ^FLepke?map zYwR$*el($Ot{T53b9vp^lq`!WK9TZ7qH^LC7Hdk9gp{1j$!*9@Ua52ijGOlf*J%F! xxvMsRf8csDe?MMY^VmkbM%+MQ5@|X=Uwv4dR$JV}{JXRvpW9e=K$&&B{{sPmR$~AF diff --git a/translations/ru.ts b/translations/ru.ts index 1e2118770..6273249e8 100644 --- a/translations/ru.ts +++ b/translations/ru.ts @@ -1,77 +1,91 @@ + + AVPage + + + Video Settings + Настройки видео + + AddFriendForm - + Add Friends Добавление друзей - + Tox ID Tox ID of the person you're sending a friend request to Tox ID - + Message The message you send in friend requests Сообщение - + Send friend request Мне не нравится, но другого не придумал, и фейсбук использует это Отправить запрос на добавление в друзья - + Tox me maybe? Default message in friend requests if the field is left blank. Write something appropriate! Вот таким нехитрым и незамысловатым образом решаются сложные переводчиские проблемы Добавь меня, а? - + Please fill in a valid Tox ID Tox ID of the friend you're sending a friend request to Пожалуйста, введите корректный Tox ID - + + You can't add yourself as a friend ! + When trying to add your own Tox ID as friend + Нельзя добавить самого себя в друзья! + + + This address does not exist The DNS gives the Tox ID associated to toxme.se addresses Нет такого адреса - + Error while looking up DNS The DNS gives the Tox ID associated to toxme.se addresses Ошибка при просмотре DNS - + Unexpected number of text records Error with the DNS Непредвиденное количество текстовых записей - + Unexpected number of values in text record Error with the DNS Непредвиденное количество значений в текстовой записи - + The DNS lookup does not contain any Tox ID Error with the DNS В ответе DNS ни одного Tox ID - + The DNS lookup does not contain a valid Tox ID Error with the DNS Ответ DNS не содержит корректных Tox ID @@ -80,74 +94,87 @@ Camera - Camera eror - Ошибка камеры + Ошибка камеры - Camera format %1 not supported, can't use the camera - Формат камеры %1 не поддерживается, невозможно использовать камеру + Формат камеры %1 не поддерживается, невозможно использовать камеру ChatForm - + Send a file Отправить файл - - Save chat log - Сохранить лог чата + Сохранить лог чата CopyableElideLabel - Copy - Копировать + Копировать - FileTransfertWidget + FileTransferInstance - + Save a file Title of the file saving dialog Сохранить файл - + + Location not writable + Title of permissions popup + Непригодная для записи локация + + + + You do not have permission to write that location. Choose another, or cancel the save dialog. + text of permissions popup + У вас нет прав записи в эту локацию. Выберете другую или закройте диалог сохранения. + + + + FileTransfertWidget + + Save a file + Title of the file saving dialog + Сохранить файл + + Location not writable Title of permissions popup - + Непригодная для записи локация - You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup - + У вас нет прав записи в эту локацию. Выберете другую или закройте диалог сохранения. FilesForm - + Transfered Files "Headline" of the window Переданные файлы - + Downloads Загрузки - + Uploads Выгрузки @@ -193,246 +220,365 @@ FriendWidget - + Copy friend ID Menu to copy the Tox ID of that friend Копировать ID друга - + Invite in group Menu to invite a friend in a groupchat Пригласить в группу - + Remove friend Menu to remove the friend from our friendlist Удалить друга + + GeneralPage + + + General Settings + Основные настройки + + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + Включить IPv6 (рекомендуется) + + + + Use translations + Text on a checkbox to enable translations + Русскоязычный интерфейс + + + + Make Tox portable + Text on a checkbox to make qTox a portable application + Портативный режим + + + + Save settings to the working directory instead of the usual conf dir + describes makeToxPortable checkbox + Сохранять настройки в рабочую директорию вместо страндартной директории настроек + + + + Theme + Тема + + + + Smiley Pack + Набор смайликов + + + + GenericChatForm + + + + Save chat log + Сохранить лог чата + + GroupChatForm - + %1 users in chat Number of users in chat %1 пользователей в чате - + <Unknown> <Неизвестно> - + %1 users in chat %1 пользователей в чате - Save chat log - Сохранить лог чата + Сохранить лог чата GroupWidget - + Quit group Menu to quit a groupchat Покинуть группу - - + + %1 users in chat %1 пользователей в чате - - + + 0 users in chat Ни одного пользователя в чате + + IdentityPage + + + Public Information + Публичные данные + + + + Name + Username/nick + Имя + + + + Status + Status message + Статус + + + + Tox ID + Tox ID + + + + Your Tox ID + Ваш Tox ID + + MainWindow qTox - + qTox Your name - Ваше имя + Ваше имя Your status - Ваш статус + Ваш статус Add friends - Добавить друзей + Добавить друзей Create a group chat - Создать групповой чат + Создать групповой чат View completed file transfers - + Завершённые файлопередачи Change your settings - Изменить ваши настройки + Изменить ваши настройки Close - Закрыть + Закрыть Ctrl+Q - Ctrl+Q + Ctrl+Q SelfCamView - + Tox video test Title of the window to test the video/webcam Проверка видео + + SettingsDialog + + + Settings Dialog + Диалог настроек + + + + General + Основное + + + + Identity + Личные данные + + + + Privacy + Безопасность + + + + Audio/Video + Аудио и видео + + + + Ok + ОК + + + + Cancel + Отмена + + + + Apply + Применить + + SettingsForm - User Settings "Headline" of the window - Пользовательские настройки + Пользовательские настройки - Name Username/nick - Имя + Имя - Status Status message - Статус + Статус - (click here to copy) Click on this text to copy TID to clipboard - (нажмите здесь чтобы скопировать) + (нажмите здесь чтобы скопировать) - Test video Text on a button to test the video/webcam - Проверить видео + Проверить видео - Enable IPv6 (recommended) Text on a checkbox to enable IPv6 - Включить IPv6 (рекомендуется) + Включить IPv6 (рекомендуется) - Use translations Text on a checkbox to enable translations Так гораздо понятнее, чем «использовать переводы» - Русскоязычный интерфейс + Русскоязычный интерфейс - Make Tox portable Text on a checkbox to make qTox a portable application - Портативный режим + Портативный режим - Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - + Сохранять настройки в рабочую директорию вместо страндартной директории настроек - Smiley Pack Text on smiley pack label - + Набор смайликов Widget Tox - Tox + Tox Your name - Ваше имя + Ваше имя Your status - Ваш статус + Ваш статус Add friends - Добавить друзей + Добавить друзей Create a group chat - Создать групповой чат + Создать групповой чат (button inactive currently) - (кнопка на данный момент неактивна) + (кнопка на данный момент неактивна) Change your settings - Изменить ваши настройки + Изменить ваши настройки Close - Закрыть + Закрыть Ctrl+Q - Ctrl+Q + Ctrl+Q - + Online Button to set your status to 'Online' - В сети + В сети - + Away Button to set your status to 'Away' Вероятно, это не столь долгое путешествие - Отошёл + Отошёл - + Busy Button to set your status to 'Busy' - Занят + Занят + + + + <Unknown> + Placeholder when we don't know someone's name in a group chat + <Неизвестно> From 7e577359fd64d51983a22f36bf8ec91743875589 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 21:38:38 +0200 Subject: [PATCH 10/30] Improve chat form performance Should help with #266 --- widget/chatareawidget.cpp | 7 +++---- widget/tool/chataction.cpp | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/widget/chatareawidget.cpp b/widget/chatareawidget.cpp index 199420e9f..f06ec9534 100644 --- a/widget/chatareawidget.cpp +++ b/widget/chatareawidget.cpp @@ -20,6 +20,7 @@ #include #include #include +#include ChatAreaWidget::ChatAreaWidget(QWidget *parent) : QTextBrowser(parent) @@ -104,15 +105,13 @@ void ChatAreaWidget::insertMessage(ChatAction *msgAction) checkSlider(); int row = chatTextTable->rows() - 1; -// chatTextTable->cellAt(row,0).firstCursorPosition().setBlockFormat(nameFormat); -// chatTextTable->cellAt(row,2).firstCursorPosition().setBlockFormat(dateFormat); QTextCursor cur = chatTextTable->cellAt(row,1).firstCursorPosition(); cur.clearSelection(); cur.setKeepPositionOnInsert(true); + chatTextTable->appendRows(1); chatTextTable->cellAt(row,0).firstCursorPosition().insertHtml(msgAction->getName()); chatTextTable->cellAt(row,1).firstCursorPosition().insertHtml(msgAction->getMessage()); - chatTextTable->cellAt(row,2).firstCursorPosition().insertHtml(msgAction->getDate()); - chatTextTable->appendRows(1); + chatTextTable->cellAt(row,2).firstCursorPosition().insertText(msgAction->getDate()); msgAction->setTextCursor(cur); diff --git a/widget/tool/chataction.cpp b/widget/tool/chataction.cpp index 3587eb600..6625b061f 100644 --- a/widget/tool/chataction.cpp +++ b/widget/tool/chataction.cpp @@ -43,14 +43,14 @@ QString ChatAction::QImage2base64(const QImage &img) QString ChatAction::getName() { if (isMe) - return QString("
" + toHtmlChars(name) + "
"); + return QString("
" + toHtmlChars(name) + "
"); else - return QString("
" + toHtmlChars(name) + "
"); + return QString("
" + toHtmlChars(name) + "
"); } QString ChatAction::getDate() { - QString res = "
" + date + "
"; + QString res = date; return res; } From 70079015c73e1271eda3d14a78d18ddbdce2d1f4 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 21:57:33 +0200 Subject: [PATCH 11/30] Update translations, add Polish --- translations/de.ts | 281 +++++++++++++++++++--------- translations/fr.ts | 281 +++++++++++++++++++--------- translations/it.ts | 227 +++++++++++++++++------ translations/po.ts | 445 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1013 insertions(+), 221 deletions(-) create mode 100644 translations/po.ts diff --git a/translations/de.ts b/translations/de.ts index ab61ba9ad..3c2a7284c 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -1,75 +1,89 @@ + + AVPage + + + Video Settings + + + AddFriendForm - + Add Friends Freunde hinzufügen - + Tox ID Tox ID of the person you're sending a friend request to Tox ID - + Message The message you send in friend requests Nachricht - + Send friend request Freundschaftseinladung versenden - + Tox me maybe? Default message in friend requests if the field is left blank. Write something appropriate! Lass uns Toxen! - + Please fill in a valid Tox ID Tox ID of the friend you're sending a friend request to Bitte gib eine gültige Tox ID ein - + + You can't add yourself as a friend ! + When trying to add your own Tox ID as friend + + + + This address does not exist The DNS gives the Tox ID associated to toxme.se addresses - + Error while looking up DNS The DNS gives the Tox ID associated to toxme.se addresses Fehler beim Auflösen des DNS - + Unexpected number of text records Error with the DNS Unererwartete Anzahl von Texteinträgen - + Unexpected number of values in text record Error with the DNS Unerwartete Anzahl von Werten innerhalb des Texteintrages - + The DNS lookup does not contain any Tox ID Error with the DNS Der DNS Eintrag enthält keine gültige TOX ID - + The DNS lookup does not contain a valid Tox ID Error with the DNS Der DNS Eintrag enthält keine gültige TOX ID @@ -78,74 +92,77 @@ Camera - Camera eror - Kamerafehler + Kamerafehler - Camera format %1 not supported, can't use the camera - Kameraformat %1 wird nicht unterstützt. Die Kamera kann nicht verwendet werden + Kameraformat %1 wird nicht unterstützt. Die Kamera kann nicht verwendet werden ChatForm - + Send a file Datei versenden - - Save chat log - Chatverlauf speichern + Chatverlauf speichern CopyableElideLabel - Copy - Kopieren + Kopieren - FileTransfertWidget + FileTransferInstance - + Save a file Title of the file saving dialog - Datei speichern + Datei speichern - + Location not writable Title of permissions popup - + You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup + + FileTransfertWidget + + Save a file + Title of the file saving dialog + Datei speichern + + FilesForm - + Transfered Files "Headline" of the window - + Downloads - + Uploads @@ -189,69 +206,149 @@ FriendWidget - + Copy friend ID Menu to copy the Tox ID of that friend Tox ID kopieren - + Invite in group Menu to invite a friend in a groupchat In Gruppe einladen - + Remove friend Menu to remove the friend from our friendlist Freund entfernen + + GeneralPage + + + General Settings + + + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + IPv6 aktivieren (empfohlen) + + + + Use translations + Text on a checkbox to enable translations + + + + + Make Tox portable + Text on a checkbox to make qTox a portable application + + + + + Save settings to the working directory instead of the usual conf dir + describes makeToxPortable checkbox + + + + + Theme + + + + + Smiley Pack + + + + + GenericChatForm + + + + Save chat log + Chatverlauf speichern + + GroupChatForm - + %1 users in chat Number of users in chat %1 Personen im Chat - + <Unknown> <Unbekannt> - + %1 users in chat %1 Personen im Chat - Save chat log - Chatverlauf speichern + Chatverlauf speichern GroupWidget - - + + %1 users in chat %1 Personen im Chat - - + + 0 users in chat 0 Personen im Chat - + Quit group Menu to quit a groupchat Gruppe verlassen + + IdentityPage + + + Public Information + + + + + Name + Username/nick + Benutzername + + + + Status + Status message + Status + + + + Tox ID + Tox ID + + + + Your Tox ID + + + MainWindow @@ -303,73 +400,81 @@ SelfCamView - + Tox video test Title of the window to test the video/webcam Tox Video testen - SettingsForm + SettingsDialog - - User Settings - "Headline" of the window - Einstellungen + + Settings Dialog + - - Name - Username/nick - Benutzername + + General + - - Status - Status message - Status + + Identity + - - (click here to copy) - Click on this text to copy TID to clipboard + + Privacy - - Test video - Text on a button to test the video/webcam - Video testen + + Audio/Video + - - Enable IPv6 (recommended) - Text on a checkbox to enable IPv6 - IPv6 aktivieren (empfohlen) + + Ok + - - Use translations - Text on a checkbox to enable translations + + Cancel - - Make Tox portable - Text on a checkbox to make qTox a portable application + + Apply + + + SettingsForm - - Save settings to the working directory instead of the usual conf dir - describes makeToxPortable checkbox - + User Settings + "Headline" of the window + Einstellungen - - Smiley Pack - Text on smiley pack label - + Name + Username/nick + Benutzername + + + Status + Status message + Status + + + Test video + Text on a button to test the video/webcam + Video testen + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + IPv6 aktivieren (empfohlen) @@ -395,22 +500,28 @@ Strg+Q - + Online Button to set your status to 'Online' Online - + Away Button to set your status to 'Away' Abwesend - + Busy Button to set your status to 'Busy' Beschäftigt + + + <Unknown> + Placeholder when we don't know someone's name in a group chat + <Unbekannt> + diff --git a/translations/fr.ts b/translations/fr.ts index 435d022c7..50d9b31e1 100644 --- a/translations/fr.ts +++ b/translations/fr.ts @@ -1,75 +1,89 @@ + + AVPage + + + Video Settings + + + AddFriendForm - + Add Friends Ajouter des amis - + Tox ID Tox ID of the person you're sending a friend request to ID Tox - + Message The message you send in friend requests Message - + Send friend request Envoyer la demande d'ami - + Tox me maybe? Default message in friend requests if the field is left blank. Write something appropriate! Je souhaiterais vous ajouter à mes contacts - + Please fill in a valid Tox ID Tox ID of the friend you're sending a friend request to Merci de remplir un ID Tox valide - + + You can't add yourself as a friend ! + When trying to add your own Tox ID as friend + + + + This address does not exist The DNS gives the Tox ID associated to toxme.se addresses - + Error while looking up DNS The DNS gives the Tox ID associated to toxme.se addresses Erreur en consultant le serveur DNS - + Unexpected number of text records Error with the DNS Nombre d'entrées texte innatendu - + Unexpected number of values in text record Error with the DNS Nombre d'entrées numériques dans l'entrée texte innatendu - + The DNS lookup does not contain any Tox ID Error with the DNS La réponse DNS ne contient aucun ID Tox - + The DNS lookup does not contain a valid Tox ID Error with the DNS La réponse DNS ne contient pas d'ID Tox valide @@ -78,74 +92,77 @@ Camera - Camera eror - Erreur de caméra + Erreur de caméra - Camera format %1 not supported, can't use the camera - Format %1 de la caméra non supporté, impossible de l'utiliser + Format %1 de la caméra non supporté, impossible de l'utiliser ChatForm - + Send a file Envoyer un fichier - - Save chat log - Sauvegarder l'historique de conversation + Sauvegarder l'historique de conversation CopyableElideLabel - Copy - Copier + Copier - FileTransfertWidget + FileTransferInstance - + Save a file Title of the file saving dialog - Sauvegarder un fichier + Sauvegarder un fichier - + Location not writable Title of permissions popup - + You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup + + FileTransfertWidget + + Save a file + Title of the file saving dialog + Sauvegarder un fichier + + FilesForm - + Transfered Files "Headline" of the window - + Downloads - + Uploads @@ -189,69 +206,149 @@ FriendWidget - + Copy friend ID Menu to copy the Tox ID of that friend Copier l'ID ami - + Invite in group Menu to invite a friend in a groupchat Inviter dans un groupe - + Remove friend Menu to remove the friend from our friendlist Supprimer ami + + GeneralPage + + + General Settings + + + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + Activer IPv6 (recommandé) + + + + Use translations + Text on a checkbox to enable translations + + + + + Make Tox portable + Text on a checkbox to make qTox a portable application + + + + + Save settings to the working directory instead of the usual conf dir + describes makeToxPortable checkbox + + + + + Theme + + + + + Smiley Pack + + + + + GenericChatForm + + + + Save chat log + Sauvegarder l'historique de conversation + + GroupChatForm - + %1 users in chat Number of users in chat %1 personnes - + <Unknown> <Inconnu> - + %1 users in chat %1 personnes - Save chat log - Sauvegarder l'historique de conversation + Sauvegarder l'historique de conversation GroupWidget - - + + %1 users in chat %1 personnes - - + + 0 users in chat 0 personnes - + Quit group Menu to quit a groupchat Quitter le groupe + + IdentityPage + + + Public Information + + + + + Name + Username/nick + Nom + + + + Status + Status message + Status + + + + Tox ID + ID Tox + + + + Your Tox ID + + + MainWindow @@ -303,73 +400,81 @@ SelfCamView - + Tox video test Title of the window to test the video/webcam Test vidéo Tox - SettingsForm + SettingsDialog - - User Settings - "Headline" of the window - Configuration + + Settings Dialog + - - Name - Username/nick - Nom + + General + - - Status - Status message - Status + + Identity + - - (click here to copy) - Click on this text to copy TID to clipboard + + Privacy - - Test video - Text on a button to test the video/webcam - Tester la vidéo + + Audio/Video + - - Enable IPv6 (recommended) - Text on a checkbox to enable IPv6 - Activer IPv6 (recommandé) + + Ok + - - Use translations - Text on a checkbox to enable translations + + Cancel - - Make Tox portable - Text on a checkbox to make qTox a portable application + + Apply + + + SettingsForm - - Save settings to the working directory instead of the usual conf dir - describes makeToxPortable checkbox - + User Settings + "Headline" of the window + Configuration - - Smiley Pack - Text on smiley pack label - + Name + Username/nick + Nom + + + Status + Status message + Status + + + Test video + Text on a button to test the video/webcam + Tester la vidéo + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + Activer IPv6 (recommandé) @@ -395,22 +500,28 @@ Ctrl+Q - + Online Button to set your status to 'Online' Connecté - + Away Button to set your status to 'Away' Indisponnible - + Busy Button to set your status to 'Busy' Occupé + + + <Unknown> + Placeholder when we don't know someone's name in a group chat + <Inconnu> + diff --git a/translations/it.ts b/translations/it.ts index 65a34eb9f..dad9d73ca 100644 --- a/translations/it.ts +++ b/translations/it.ts @@ -1,75 +1,89 @@ + + AVPage + + + Video Settings + + + AddFriendForm - + Add Friends Aggiungi Contatto - + Tox ID Tox ID of the person you're sending a friend request to Tox ID - + Message The message you send in friend requests Messaggio - + Send friend request Invia richiesta d'amicizia - + Tox me maybe? Default message in friend requests if the field is left blank. Write something appropriate! Permettimi di aggiungerti alla mia lista contatti - + Please fill in a valid Tox ID Tox ID of the friend you're sending a friend request to Inserisci un Tox ID valido - + + You can't add yourself as a friend ! + When trying to add your own Tox ID as friend + + + + This address does not exist The DNS gives the Tox ID associated to toxme.se addresses Questo indirizzo non esiste - + Error while looking up DNS The DNS gives the Tox ID associated to toxme.se addresses Errore nel consultare il server DNS - + Unexpected number of text records Error with the DNS Numero inaspettato di text-records - + Unexpected number of values in text record Error with the DNS Numero inaspettato di valori nel text-record - + The DNS lookup does not contain any Tox ID Error with the DNS La risposta del server DNS non contiene nessun Tox ID - + The DNS lookup does not contain a valid Tox ID Error with the DNS La risposta del server DNS non contiene un Tox ID valido @@ -78,7 +92,7 @@ ChatForm - + Send a file Invia un file @@ -86,19 +100,19 @@ FileTransferInstance - + Save a file Title of the file saving dialog Salva file - + Location not writable Title of permissions popup Errore - + You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup Non hai sufficienti permessi per scrivere in questa locazione. Scegli un'altra posizione, o annulla il salvataggio. @@ -107,18 +121,18 @@ FilesForm - + Transfered Files "Headline" of the window Files Trasferiti - + Downloads Ricevuti - + Uploads Inviati @@ -162,29 +176,71 @@ FriendWidget - + Copy friend ID Menu to copy the Tox ID of that friend Copia Tox ID del contatto - + Invite in group Menu to invite a friend in a groupchat Invita nel gruppo - + Remove friend Menu to remove the friend from our friendlist Rimuovi contatto + + GeneralPage + + + General Settings + + + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + Abilita IPv6 (consigliato) + + + + Use translations + Text on a checkbox to enable translations + Abilita traduzioni + + + + Make Tox portable + Text on a checkbox to make qTox a portable application + Rendi qTox portabile + + + + Save settings to the working directory instead of the usual conf dir + describes makeToxPortable checkbox + Slava le impostazioni nella directory di lavoro corrente, invece della directory di default + + + + Theme + + + + + Smiley Pack + Emoticons + + GenericChatForm - - + + Save chat log Salva il log della chat @@ -192,18 +248,18 @@ GroupChatForm - + %1 users in chat Number of users in chat %1 utenti in chat - + <Unknown> <Sconosciuto> - + %1 users in chat %1 utenti in chat @@ -229,6 +285,36 @@ Esci dal gruppo + + IdentityPage + + + Public Information + + + + + Name + Username/nick + Nome + + + + Status + Status message + Stato + + + + Tox ID + Tox ID + + + + Your Tox ID + + + MainWindow @@ -280,94 +366,133 @@ SelfCamView - + Tox video test Title of the window to test the video/webcam qTox video test + + SettingsDialog + + + Settings Dialog + + + + + General + + + + + Identity + + + + + Privacy + + + + + Audio/Video + + + + + Ok + + + + + Cancel + + + + + Apply + + + SettingsForm - User Settings "Headline" of the window - Impostazioni + Impostazioni - Name Username/nick - Nome + Nome - Status Status message - Stato + Stato - (click here to copy) Click on this text to copy TID to clipboard - (clicca qui per copiare) + (clicca qui per copiare) - Test video Text on a button to test the video/webcam - Prova la webcam + Prova la webcam - Enable IPv6 (recommended) Text on a checkbox to enable IPv6 - Abilita IPv6 (consigliato) + Abilita IPv6 (consigliato) - Use translations Text on a checkbox to enable translations - Abilita traduzioni + Abilita traduzioni - Make Tox portable Text on a checkbox to make qTox a portable application - Rendi qTox portabile + Rendi qTox portabile - Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - Slava le impostazioni nella directory di lavoro corrente, invece della directory di default + Slava le impostazioni nella directory di lavoro corrente, invece della directory di default - Smiley Pack Text on smiley pack label - Emoticons + Emoticons Widget - + Online Button to set your status to 'Online' Online - + Away Button to set your status to 'Away' Assente - + Busy Button to set your status to 'Busy' Occupato + + + <Unknown> + Placeholder when we don't know someone's name in a group chat + <Sconosciuto> + diff --git a/translations/po.ts b/translations/po.ts new file mode 100644 index 000000000..f3a5a3144 --- /dev/null +++ b/translations/po.ts @@ -0,0 +1,445 @@ + + + + + AVPage + + + Video Settings + + + + + AddFriendForm + + + Add Friends + + + + + Tox ID + Tox ID of the person you're sending a friend request to + + + + + Message + The message you send in friend requests + + + + + Send friend request + + + + + Tox me maybe? + Default message in friend requests if the field is left blank. Write something appropriate! + + + + + Please fill in a valid Tox ID + Tox ID of the friend you're sending a friend request to + + + + + You can't add yourself as a friend ! + When trying to add your own Tox ID as friend + + + + + This address does not exist + The DNS gives the Tox ID associated to toxme.se addresses + + + + + Error while looking up DNS + The DNS gives the Tox ID associated to toxme.se addresses + + + + + Unexpected number of text records + Error with the DNS + + + + + Unexpected number of values in text record + Error with the DNS + + + + + The DNS lookup does not contain any Tox ID + Error with the DNS + + + + + + The DNS lookup does not contain a valid Tox ID + Error with the DNS + + + + + ChatForm + + + Send a file + + + + + FileTransferInstance + + + Save a file + Title of the file saving dialog + + + + + Location not writable + Title of permissions popup + + + + + You do not have permission to write that location. Choose another, or cancel the save dialog. + text of permissions popup + + + + + FilesForm + + + Transfered Files + "Headline" of the window + + + + + Downloads + + + + + Uploads + + + + + FriendRequestDialog + + + Friend request + Title of the window to aceept/deny a friend request + + + + + Someone wants to make friends with you + + + + + User ID: + + + + + Friend request message: + + + + + Accept + Accept a friend request + + + + + Reject + Reject a friend request + + + + + FriendWidget + + + Copy friend ID + Menu to copy the Tox ID of that friend + + + + + Invite in group + Menu to invite a friend in a groupchat + + + + + Remove friend + Menu to remove the friend from our friendlist + + + + + GeneralPage + + + General Settings + + + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + + + + + Use translations + Text on a checkbox to enable translations + + + + + Make Tox portable + Text on a checkbox to make qTox a portable application + + + + + Save settings to the working directory instead of the usual conf dir + describes makeToxPortable checkbox + + + + + Theme + + + + + Smiley Pack + + + + + GenericChatForm + + + + Save chat log + + + + + GroupChatForm + + + %1 users in chat + Number of users in chat + + + + + <Unknown> + + + + + %1 users in chat + + + + + GroupWidget + + + + %1 users in chat + + + + + + 0 users in chat + + + + + Quit group + Menu to quit a groupchat + + + + + IdentityPage + + + Public Information + + + + + Name + Username/nick + + + + + Status + Status message + + + + + Tox ID + + + + + Your Tox ID + + + + + MainWindow + + + qTox + + + + + Your name + + + + + Your status + + + + + Add friends + + + + + Create a group chat + + + + + View completed file transfers + + + + + Change your settings + + + + + Close + + + + + Ctrl+Q + + + + + SelfCamView + + + Tox video test + Title of the window to test the video/webcam + + + + + SettingsDialog + + + Settings Dialog + + + + + General + + + + + Identity + + + + + Privacy + + + + + Audio/Video + + + + + Ok + + + + + Cancel + + + + + Apply + + + + + Widget + + + Online + Button to set your status to 'Online' + + + + + Away + Button to set your status to 'Away' + + + + + Busy + Button to set your status to 'Busy' + + + + + <Unknown> + Placeholder when we don't know someone's name in a group chat + + + + From e9fa8de43d13555ea36531e362c5786ab4c48ece Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 21:59:49 +0200 Subject: [PATCH 12/30] Enable Polish translation --- qtox.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qtox.pro b/qtox.pro index 96e609c33..19413ea0d 100644 --- a/qtox.pro +++ b/qtox.pro @@ -32,7 +32,8 @@ CONFIG += c++11 TRANSLATIONS = translations/de.ts \ translations/fr.ts \ translations/it.ts \ - translations/ru.ts + translations/ru.ts \ + translations/po.ts RESOURCES += res.qrc From b6ccbfc62fffd19449114ab0e0f112d9bf6a8b60 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 22:24:29 +0200 Subject: [PATCH 13/30] Fix greentext Thanks to dewbasaur for reporting the bug --- ui/chatArea/innerStyle.css | 4 ++-- widget/tool/chataction.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/chatArea/innerStyle.css b/ui/chatArea/innerStyle.css index 61380b073..28bcb32c8 100644 --- a/ui/chatArea/innerStyle.css +++ b/ui/chatArea/innerStyle.css @@ -22,8 +22,8 @@ div.date { white-space: nowrap; } -div.quote { - background-color: #6bc260; +span.quote { + color: #6bc260; } div.green { diff --git a/widget/tool/chataction.cpp b/widget/tool/chataction.cpp index 6625b061f..bcd1f1080 100644 --- a/widget/tool/chataction.cpp +++ b/widget/tool/chataction.cpp @@ -102,9 +102,9 @@ QString MessageAction::getMessage() for (QString& s : messageLines) { if (QRegExp("^[ ]*>.*").exactMatch(s)) - message_ += "
" + s.right(s.length()-4) + "

"; + message_ += ">" + s.right(s.length()-4) + "
"; else - message_ += s + "
"; + message_ += s + "
"; } message_ = message_.left(message_.length()-4); From 904a584d75ec8d2abed1d3c10f2cf306ff881f1a Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 23:35:44 +0200 Subject: [PATCH 14/30] Change video preview button text --- widget/settingsdialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/widget/settingsdialog.cpp b/widget/settingsdialog.cpp index 4f9c26a9b..c4b764043 100644 --- a/widget/settingsdialog.cpp +++ b/widget/settingsdialog.cpp @@ -131,7 +131,7 @@ public: camView = new SelfCamView(parent->getWidget()->getCamera()); camView->hide(); // hide by default - testVideo = new QPushButton("enable video"); + testVideo = new QPushButton("Show video preview"); connect(testVideo, SIGNAL(clicked()), this, SLOT(onTestVideoPressed())); QVBoxLayout *vLayout = new QVBoxLayout(); @@ -152,13 +152,13 @@ public: void showTestVideo() { - testVideo->setText("disable video"); + testVideo->setText("Hide video preview"); camView->show(); } void closeTestVideo() { - testVideo->setText("enable video"); + testVideo->setText("Show video preview"); camView->close(); } From 627e5b178b1fe9bac3469b03f5f3136f2b36c3fc Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 23:41:13 +0200 Subject: [PATCH 15/30] Change settings dialog title --- widget/settingsdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/settingsdialog.cpp b/widget/settingsdialog.cpp index c4b764043..05ce3c165 100644 --- a/widget/settingsdialog.cpp +++ b/widget/settingsdialog.cpp @@ -192,7 +192,7 @@ SettingsDialog::SettingsDialog(Widget *parent) : createButtons(); createConnections(); createLayout(); - setWindowTitle(tr("Settings Dialog")); + setWindowTitle(tr("qTox – Settings")); } void SettingsDialog::createPages() From 5c1ae49f81508dc5ed4daf7c47f63747239f77e8 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Fri, 12 Sep 2014 23:55:37 +0200 Subject: [PATCH 16/30] Typo --- widget/form/addfriendform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/form/addfriendform.cpp b/widget/form/addfriendform.cpp index 2c9b197b2..55f5e80dd 100644 --- a/widget/form/addfriendform.cpp +++ b/widget/form/addfriendform.cpp @@ -96,7 +96,7 @@ void AddFriendForm::onSendTriggered() showWarning(tr("Please fill in a valid Tox ID","Tox ID of the friend you're sending a friend request to")); } else if (isToxId(id)) { if (id.toUpper() == Core::getInstance()->getSelfId().toString().toUpper()) - showWarning(tr("You can't add yourself as a friend !","When trying to add your own Tox ID as friend")); + showWarning(tr("You can't add yourself as a friend!","When trying to add your own Tox ID as friend")); else emit friendRequested(id, getMessage()); this->toxId.setText(""); From 965c76a31545c61303d4485c4326887cc6ba4ba3 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 13 Sep 2014 00:07:25 +0200 Subject: [PATCH 17/30] Add Manol translation Ayy ! You have mothafucking friend request you little bitch ! --- qtox.pro | 3 +- translations/de.ts | 4 +- translations/fr.ts | 4 +- translations/it.ts | 4 +- translations/mannol.ts | 445 +++++++++++++++++++++++++++++++++++++++++ translations/po.ts | 4 +- translations/ru.ts | 15 +- 7 files changed, 467 insertions(+), 12 deletions(-) create mode 100644 translations/mannol.ts diff --git a/qtox.pro b/qtox.pro index 19413ea0d..b733387b8 100644 --- a/qtox.pro +++ b/qtox.pro @@ -33,7 +33,8 @@ TRANSLATIONS = translations/de.ts \ translations/fr.ts \ translations/it.ts \ translations/ru.ts \ - translations/po.ts + translations/po.ts \ + translations/mannol.ts RESOURCES += res.qrc diff --git a/translations/de.ts b/translations/de.ts index 3c2a7284c..42adc68f9 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -47,7 +47,7 @@ - You can't add yourself as a friend ! + You can't add yourself as a friend! When trying to add your own Tox ID as friend @@ -410,7 +410,7 @@ SettingsDialog - Settings Dialog + qTox – Settings diff --git a/translations/fr.ts b/translations/fr.ts index 50d9b31e1..2f61287cb 100644 --- a/translations/fr.ts +++ b/translations/fr.ts @@ -47,7 +47,7 @@ - You can't add yourself as a friend ! + You can't add yourself as a friend! When trying to add your own Tox ID as friend @@ -410,7 +410,7 @@ SettingsDialog - Settings Dialog + qTox – Settings diff --git a/translations/it.ts b/translations/it.ts index dad9d73ca..a7c3f39c0 100644 --- a/translations/it.ts +++ b/translations/it.ts @@ -47,7 +47,7 @@ - You can't add yourself as a friend ! + You can't add yourself as a friend! When trying to add your own Tox ID as friend @@ -376,7 +376,7 @@ SettingsDialog - Settings Dialog + qTox – Settings diff --git a/translations/mannol.ts b/translations/mannol.ts new file mode 100644 index 000000000..93b9d0c3c --- /dev/null +++ b/translations/mannol.ts @@ -0,0 +1,445 @@ + + + + + AVPage + + + Video Settings + + + + + AddFriendForm + + + Add Friends + + + + + Tox ID + Tox ID of the person you're sending a friend request to + + + + + Message + The message you send in friend requests + + + + + Send friend request + + + + + Tox me maybe? + Default message in friend requests if the field is left blank. Write something appropriate! + + + + + Please fill in a valid Tox ID + Tox ID of the friend you're sending a friend request to + + + + + You can't add yourself as a friend! + When trying to add your own Tox ID as friend + + + + + This address does not exist + The DNS gives the Tox ID associated to toxme.se addresses + + + + + Error while looking up DNS + The DNS gives the Tox ID associated to toxme.se addresses + + + + + Unexpected number of text records + Error with the DNS + + + + + Unexpected number of values in text record + Error with the DNS + + + + + The DNS lookup does not contain any Tox ID + Error with the DNS + + + + + + The DNS lookup does not contain a valid Tox ID + Error with the DNS + + + + + ChatForm + + + Send a file + + + + + FileTransferInstance + + + Save a file + Title of the file saving dialog + + + + + Location not writable + Title of permissions popup + + + + + You do not have permission to write that location. Choose another, or cancel the save dialog. + text of permissions popup + + + + + FilesForm + + + Transfered Files + "Headline" of the window + + + + + Downloads + + + + + Uploads + + + + + FriendRequestDialog + + + Friend request + Title of the window to aceept/deny a friend request + + + + + Someone wants to make friends with you + + + + + User ID: + + + + + Friend request message: + + + + + Accept + Accept a friend request + + + + + Reject + Reject a friend request + + + + + FriendWidget + + + Copy friend ID + Menu to copy the Tox ID of that friend + + + + + Invite in group + Menu to invite a friend in a groupchat + + + + + Remove friend + Menu to remove the friend from our friendlist + + + + + GeneralPage + + + General Settings + + + + + Enable IPv6 (recommended) + Text on a checkbox to enable IPv6 + + + + + Use translations + Text on a checkbox to enable translations + + + + + Make Tox portable + Text on a checkbox to make qTox a portable application + + + + + Save settings to the working directory instead of the usual conf dir + describes makeToxPortable checkbox + + + + + Theme + + + + + Smiley Pack + + + + + GenericChatForm + + + + Save chat log + + + + + GroupChatForm + + + %1 users in chat + Number of users in chat + + + + + <Unknown> + + + + + %1 users in chat + + + + + GroupWidget + + + + %1 users in chat + + + + + + 0 users in chat + + + + + Quit group + Menu to quit a groupchat + + + + + IdentityPage + + + Public Information + + + + + Name + Username/nick + + + + + Status + Status message + + + + + Tox ID + + + + + Your Tox ID + + + + + MainWindow + + + qTox + + + + + Your name + + + + + Your status + + + + + Add friends + + + + + Create a group chat + + + + + View completed file transfers + + + + + Change your settings + + + + + Close + + + + + Ctrl+Q + + + + + SelfCamView + + + Tox video test + Title of the window to test the video/webcam + + + + + SettingsDialog + + + qTox – Settings + + + + + General + + + + + Identity + + + + + Privacy + + + + + Audio/Video + + + + + Ok + + + + + Cancel + + + + + Apply + + + + + Widget + + + Online + Button to set your status to 'Online' + + + + + Away + Button to set your status to 'Away' + + + + + Busy + Button to set your status to 'Busy' + + + + + <Unknown> + Placeholder when we don't know someone's name in a group chat + + + + diff --git a/translations/po.ts b/translations/po.ts index f3a5a3144..93b9d0c3c 100644 --- a/translations/po.ts +++ b/translations/po.ts @@ -47,7 +47,7 @@ - You can't add yourself as a friend ! + You can't add yourself as a friend! When trying to add your own Tox ID as friend @@ -376,7 +376,7 @@ SettingsDialog - Settings Dialog + qTox – Settings diff --git a/translations/ru.ts b/translations/ru.ts index 6273249e8..87c52b238 100644 --- a/translations/ru.ts +++ b/translations/ru.ts @@ -49,9 +49,14 @@ + You can't add yourself as a friend! + When trying to add your own Tox ID as friend + + + You can't add yourself as a friend ! When trying to add your own Tox ID as friend - Нельзя добавить самого себя в друзья! + Нельзя добавить самого себя в друзья! @@ -423,9 +428,13 @@ SettingsDialog - Settings Dialog - Диалог настроек + Диалог настроек + + + + qTox – Settings + From b2c75dbc5116c0299f0e03badd4411671d6831b6 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 13 Sep 2014 00:12:00 +0200 Subject: [PATCH 18/30] Update Mannol translation --- translations/mannol.qm | Bin 0 -> 234 bytes translations/mannol.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 translations/mannol.qm diff --git a/translations/mannol.qm b/translations/mannol.qm new file mode 100644 index 0000000000000000000000000000000000000000..1d4f6d7b644a1b48cc36ba7cefb5673c02d7c4a0 GIT binary patch literal 234 zcmX9&F%E)25L{!TG*&hi7DwYNY&6CPXe{hRSl|NO1vn)54=Zi_g^jT_BtF46_yxx^ zo4K9YotwMqEf}?*%jxBgAG_=QJtrb((4IHwB!Ooa$B|~#pai+VmNZr9F?n<#2Foxp zR)^U5l;EnO2%C@!aE1z?3a}gwrV@UE#D7u>k3pq2ZEuy2JiO=pKGFjwYn`!HENV}g lQWz~VFJTcDl2uTOTAEliy6VF^T-xD^^NLHekY1{z&KDe4II;i$ literal 0 HcmV?d00001 diff --git a/translations/mannol.ts b/translations/mannol.ts index 93b9d0c3c..a1856348e 100644 --- a/translations/mannol.ts +++ b/translations/mannol.ts @@ -148,7 +148,7 @@ Someone wants to make friends with you - + Ayy ! You have mothafucking friend request you little bitch ! From 1a6d2d925e804d5c6c718db791369ed989287d7d Mon Sep 17 00:00:00 2001 From: Zetok Zalbavar Date: Fri, 12 Sep 2014 23:21:02 +0100 Subject: [PATCH 19/30] Add Polish translation --- translations/{po.ts => pl.ts} | 148 +++++++++++++++++----------------- 1 file changed, 76 insertions(+), 72 deletions(-) rename translations/{po.ts => pl.ts} (75%) diff --git a/translations/po.ts b/translations/pl.ts similarity index 75% rename from translations/po.ts rename to translations/pl.ts index 93b9d0c3c..6aaa4e6d6 100644 --- a/translations/po.ts +++ b/translations/pl.ts @@ -1,12 +1,12 @@ - + AVPage Video Settings - + Ustawienia wideo @@ -14,79 +14,79 @@ Add Friends - + Dodaj znajomych Tox ID Tox ID of the person you're sending a friend request to - + Tox ID Message The message you send in friend requests - + Wiadomość Send friend request - + Wyślij zapytanie do znajomego Tox me maybe? Default message in friend requests if the field is left blank. Write something appropriate! - + Może Tox ze mną? Please fill in a valid Tox ID Tox ID of the friend you're sending a friend request to - + Proszę wpisać poprawny Tox ID You can't add yourself as a friend! When trying to add your own Tox ID as friend - + Nie możesz dodać siebie jako znajomego! This address does not exist The DNS gives the Tox ID associated to toxme.se addresses - + Ten adres nie istnieje Error while looking up DNS The DNS gives the Tox ID associated to toxme.se addresses - + Błąd podczas sprawdzania DNS Unexpected number of text records Error with the DNS - + Nieoczekiwana liczba wpisów tekstowych Unexpected number of values in text record Error with the DNS - + Nieoczekiwana liczba wartości we wpisie tekstowym The DNS lookup does not contain any Tox ID Error with the DNS - + DNS nie zawiera żadnego Tox ID The DNS lookup does not contain a valid Tox ID Error with the DNS - + DNS nie zawiera poprawnego Tox ID @@ -94,7 +94,7 @@ Send a file - + Wyślij plik @@ -103,19 +103,19 @@ Save a file Title of the file saving dialog - + Zapisz plik Location not writable Title of permissions popup - + Nie można zapisać w lokacji You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup - + Nie masz uprawnienia by zapisać w tej lokacji. Wybierz inną lub anuluj zapis. @@ -124,17 +124,17 @@ Transfered Files "Headline" of the window - + Przesłane pliki Downloads - + Pobrane Uploads - + Wysłane @@ -143,34 +143,36 @@ Friend request Title of the window to aceept/deny a friend request - + no idea how it shoule be translated + Zapytanie znajomego Someone wants to make friends with you - + Ktoś chce być twoim znajomym User ID: - + ID użytkownika: Friend request message: - + better wording needed? + Wiadomość w zapytaniu do znajomej/go: Accept Accept a friend request - + Zaakceptuj Reject Reject a friend request - + Odrzuć @@ -179,19 +181,19 @@ Copy friend ID Menu to copy the Tox ID of that friend - + Kopiuj ID znajomej/go Invite in group Menu to invite a friend in a groupchat - + Zaproś do grupy Remove friend Menu to remove the friend from our friendlist - + Usuń znajomego @@ -199,41 +201,42 @@ General Settings - + Główne ustawienia Enable IPv6 (recommended) Text on a checkbox to enable IPv6 - + Użyj IPv6 (rekomendowane) Use translations Text on a checkbox to enable translations - + Użyj tłumaczenia Make Tox portable Text on a checkbox to make qTox a portable application - + Zrób Tox przenośnym Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - + Zamiast domyślnego katalogu użyj obecnego do zapisania ustawień Theme - + Motyw Smiley Pack - + needs better translation + Paczka uśmiechów @@ -242,7 +245,7 @@ Save chat log - + Zapisz historię rozmowy @@ -251,17 +254,17 @@ %1 users in chat Number of users in chat - + %1 użytkowników w czacie <Unknown> - + <Nieznany/a> %1 users in chat - + %1 użytkowników w czacie @@ -270,19 +273,19 @@ %1 users in chat - + %1 użytkowników w czacie 0 users in chat - + 0 użytkowników w czacie Quit group Menu to quit a groupchat - + Opuść grupę @@ -290,29 +293,29 @@ Public Information - + Informacja publiczna Name Username/nick - + Nick Status Status message - + Status Tox ID - + Tox ID Your Tox ID - + Twój Tox ID @@ -320,47 +323,48 @@ qTox - + qTox Your name - + Twój nick Your status - + Twój status Add friends - + Dodaj znajomych Create a group chat - + Utwórz czat grupowy View completed file transfers - + Zobacz zakończone transfery plików Change your settings - + translated as "change settings"; seems to be simpler this way + Zmień ustawienia Close - + Zamknij Ctrl+Q - + Ctrl+Q @@ -369,7 +373,7 @@ Tox video test Title of the window to test the video/webcam - + Tox test wideo @@ -377,42 +381,42 @@ qTox – Settings - + qTox – Ustawienia General - + Główne Identity - + Tożsamość Privacy - + Prywatność Audio/Video - + Audio/Wideo Ok - + Ok Cancel - + Anuluj Apply - + Zastosuj @@ -421,25 +425,25 @@ Online Button to set your status to 'Online' - + Online Away Button to set your status to 'Away' - + Nieobecny/a Busy Button to set your status to 'Busy' - + Zajęty/a <Unknown> Placeholder when we don't know someone's name in a group chat - + <Nieznany/a> From 5e12a5fa3e14c3c2c80a619ffa69875a49894ea6 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 13 Sep 2014 11:49:58 +0200 Subject: [PATCH 20/30] Update translations --- qtox.pro | 2 +- translations/de.qm | Bin 4328 -> 3969 bytes translations/fr.qm | Bin 4515 -> 3969 bytes translations/it.qm | Bin 5964 -> 5820 bytes translations/pl.qm | Bin 0 -> 6709 bytes translations/ru.qm | Bin 6821 -> 6581 bytes 6 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 translations/pl.qm diff --git a/qtox.pro b/qtox.pro index b733387b8..250d3abc8 100644 --- a/qtox.pro +++ b/qtox.pro @@ -33,7 +33,7 @@ TRANSLATIONS = translations/de.ts \ translations/fr.ts \ translations/it.ts \ translations/ru.ts \ - translations/po.ts \ + translations/pl.ts \ translations/mannol.ts RESOURCES += res.qrc diff --git a/translations/de.qm b/translations/de.qm index c5132443ed394bc90ef30d8bba13ec0870e60e15..8a6769d20ef422e9932aed64235f71b97cd1ba2b 100644 GIT binary patch delta 731 zcmZWlOK1~O6g|_tnM^Wordh-ytwkzrt=3kNRumT{!G2X*Yqh!&V=_qx!$gv)F@nUP zg-8{JQCr&LDhsX97AguVC{&?z;No)LIq%$i&wHP0GV8B- z(|ur9E&*y9Z0Zi-48*QhKuMtGHv_~k@D1C5V*x!oZUDT((OvZmka`?TVSDAFk}w0FFS&xSn-A1e{6NJC%|-pSXYCYynt5 z?`)t!{G1w^J4MO4y13yhy%_4!B~t<8n+k$>3$G|&85!7JK| z+(D(;6Y}OY-VP(G55xmzBCN-|&4d*&gZlhyS#j7S+A*$l>ZTqKMEe2}-TuJ$%H;*Y z2-?kjryWx(?FPPJ@8*qkUbMe!TX=U!H!Z_T6*`*AHT}I8{1yZjWHB5c=iY#4~3Bn&H C;=F4B delta 1043 zcmZuuTSyd982-ndnVp^88O;nummJHrNV5bDe5fcdS&EUaMFiF8p1tJm&N6d$b$eN) z3xY+)R7y$@B|X%G!dg%i6;_0AQEx#7f%a}UBBFnGRkUI_^WVSk`_CCD{aiL&kU9x) zEC?XK2KIImfPVvAOC5mJ2NlmYVtxzM{$>H}w_s1)1hCD(fgM*duiN&Q`~(mf+w90W z0C>SB$0_!mU`Ge90Ei@OoiEwz^%%R{?A=QY&P}kBB}Wn8&OR#t0+7nN!G0h6gaC&) z&(`+<&MIzqupEE^?t*gy2|BntLo+xq&E21PivsrYy~R%vP~$aM6AHe_YmHqx|fE=g$D-Rtn6(S;YS)q}pym5V$$lb0owc*J=US4%fcTNFaZed{Z&Z&q#FoG62^uz1pyV!a!N}Tp#j@skv6T}Vf+{uR{6SkDw3@pdg>JS%izThLe9KY0!=x!3@{u;Rn}p3L z{LX^4&7m;y>T1;R6P+Fj`2vKd*Vvu5^qeR#=8)K&e&^&FlgRC+TRbkgItitrXuxPj zrRGPW&|Gj8=dVm=uH9vBm)EW5JE=!3!GnFTaG%tMyw5OZ{`w Sw&htxuFGAT9mJj-hWP`r)cl74 diff --git a/translations/fr.qm b/translations/fr.qm index e3d68b2e1a1bf5114c201fee7de16d73986ac815..98e9e1aaa0abc0d733d08a78db17bff6152751da 100644 GIT binary patch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DpY diff --git a/translations/pl.qm b/translations/pl.qm new file mode 100644 index 0000000000000000000000000000000000000000..d05682dd157ed6c4cdf4f6a3a40d7171139dab1b GIT binary patch literal 6709 zcmb_gdyG_P6+gqyV_!47>@EwGhaXrT1zez|6bLEV2amx53%d(xiPXDuzumdJGxrYn z-r3n9#%O$mrW%bCR1}?ml|v@d(ymT@dbn73)qd=$K03`{(j^uZO_7v40% zf2w8C#XlnkX3N>jqp;&z%j*YzM%4Op%bQoe2YGv1{uI9rf1<6wyqbiZc+y>lV zYkTkwJe&5m?_UqSJrA`zC*WuEx7y!b_j987-{Si7IqZ8p{`&RZ!0q?(>#Koxmxd>B zrDXiZCG2axKe2rCYOHTdEWe;*{f`n4JaY9JaG==SFAc#L%l%*o2DD8`B>(_O$&o-o~D;aUTd$0Q}JF7(Ppn=dp zC<0-Ea!P0l0yWqv@IOa3J{RySe^<75hz`?;ujHP+wr$y>kTx<>WGrhM7K?mN3>_X} zyX)xeq7%wwAdl(IPkN<)?G9VlPs8aCbU#RmxCyWv{0<%K-pvySO^-$ z+F3l4G~}yTF`SW_BgKS~$q2&~nwZfthAu{}S&DY26pMNcRpJ-e5fsEasEJTf{$D}LTR({nNzil z66bo(G>f`FVg8it^~E|}4IvqaD#vH%2ULpc;@)LWKJRM{Ti zpg7CPN|Duy<8n`fEO-Ptz^P@Ss#(l5-U{%W>s_c+-5P!7yeyMx|_~S21(V z%=-9jsB0t&6-C2E8!)#4c!x{Y3ech#6OaZh;3@@mD#CCSyyNPxKwWD9t!@p|D&Mk? zKWgPgN;B8FoKK=?%V+RvE!Jiv`(3iQv80Ou>$$zKv^?Z_4aTcq{>zy?uDH9NXPhuhzf~Sm zAHD&y*vDyQE7=CBgiDUs=J5;jg^5r6Rv~b%m_8q&PjP50P!RfZd;?-* zxkl=HRCaLDq+mi0-MIOV_wf2Qh2EGV{IwFsvBu=qN#472~SY4 zdp4APuy)Js|N@m;;!K}(dv6l;HETnu^xfC1%D?GY(#L7y`l%k-SuESZJ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 13 Sep 2014 14:00:37 +0200 Subject: [PATCH 21/30] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6358283e..dd7c45fdb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ However, it is not a fork. - Group chats - File transfers, with previewing of images - Audio calls -- Video calls (alpha) +- Video calls - Tox DNS - Translations in various languages From 54ab54543465aca7948f1c3fae9519b90007d0dd Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 13 Sep 2014 15:03:41 +0200 Subject: [PATCH 22/30] Embed new translations --- res.qrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res.qrc b/res.qrc index 6a121b0ad..f258db6f5 100644 --- a/res.qrc +++ b/res.qrc @@ -139,5 +139,7 @@ img/settings/identity.png img/settings/privacy.png img/settings/av.png + translations/pl.qm + translations/mannol.qm From 41261c5379975bc6577c79bfd36e4c9565fca6ef Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 13 Sep 2014 15:15:35 +0200 Subject: [PATCH 23/30] Update translations --- translations/de.ts | 55 ++++++++++++++++++++++--------------- translations/fr.ts | 55 ++++++++++++++++++++++--------------- translations/it.ts | 55 ++++++++++++++++++++++--------------- translations/mannol.ts | 55 ++++++++++++++++++++++--------------- translations/pl.ts | 57 ++++++++++++++++++++++++--------------- translations/ru.ts | 55 ++++++++++++++++++++++--------------- widget/settingsdialog.cpp | 8 +++--- 7 files changed, 210 insertions(+), 130 deletions(-) diff --git a/translations/de.ts b/translations/de.ts index 42adc68f9..f8b790182 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -4,10 +4,23 @@ AVPage - + Video Settings + + + + Show video preview + On a button + + + + + Hide video preview + On a button + + AddFriendForm @@ -227,41 +240,41 @@ GeneralPage - + General Settings - + Enable IPv6 (recommended) Text on a checkbox to enable IPv6 IPv6 aktivieren (empfohlen) - + Use translations Text on a checkbox to enable translations - + Make Tox portable Text on a checkbox to make qTox a portable application - + Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - + Theme - + Smiley Pack @@ -322,29 +335,29 @@ IdentityPage - + Public Information - + Name Username/nick Benutzername - + Status Status message Status - + Tox ID Tox ID - + Your Tox ID @@ -409,42 +422,42 @@ SettingsDialog - + qTox – Settings - + General - + Identity - + Privacy - + Audio/Video - + Ok - + Cancel - + Apply diff --git a/translations/fr.ts b/translations/fr.ts index 2f61287cb..53b39e179 100644 --- a/translations/fr.ts +++ b/translations/fr.ts @@ -4,10 +4,23 @@ AVPage - + Video Settings + + + + Show video preview + On a button + + + + + Hide video preview + On a button + + AddFriendForm @@ -227,41 +240,41 @@ GeneralPage - + General Settings - + Enable IPv6 (recommended) Text on a checkbox to enable IPv6 Activer IPv6 (recommandé) - + Use translations Text on a checkbox to enable translations - + Make Tox portable Text on a checkbox to make qTox a portable application - + Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - + Theme - + Smiley Pack @@ -322,29 +335,29 @@ IdentityPage - + Public Information - + Name Username/nick Nom - + Status Status message Status - + Tox ID ID Tox - + Your Tox ID @@ -409,42 +422,42 @@ SettingsDialog - + qTox – Settings - + General - + Identity - + Privacy - + Audio/Video - + Ok - + Cancel - + Apply diff --git a/translations/it.ts b/translations/it.ts index a7c3f39c0..35b4c928d 100644 --- a/translations/it.ts +++ b/translations/it.ts @@ -4,10 +4,23 @@ AVPage - + Video Settings + + + + Show video preview + On a button + + + + + Hide video preview + On a button + + AddFriendForm @@ -197,41 +210,41 @@ GeneralPage - + General Settings - + Enable IPv6 (recommended) Text on a checkbox to enable IPv6 Abilita IPv6 (consigliato) - + Use translations Text on a checkbox to enable translations Abilita traduzioni - + Make Tox portable Text on a checkbox to make qTox a portable application Rendi qTox portabile - + Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox Slava le impostazioni nella directory di lavoro corrente, invece della directory di default - + Theme - + Smiley Pack Emoticons @@ -288,29 +301,29 @@ IdentityPage - + Public Information - + Name Username/nick Nome - + Status Status message Stato - + Tox ID Tox ID - + Your Tox ID @@ -375,42 +388,42 @@ SettingsDialog - + qTox – Settings - + General - + Identity - + Privacy - + Audio/Video - + Ok - + Cancel - + Apply diff --git a/translations/mannol.ts b/translations/mannol.ts index a1856348e..ccc08ff82 100644 --- a/translations/mannol.ts +++ b/translations/mannol.ts @@ -4,10 +4,23 @@ AVPage - + Video Settings + + + + Show video preview + On a button + + + + + Hide video preview + On a button + + AddFriendForm @@ -197,41 +210,41 @@ GeneralPage - + General Settings - + Enable IPv6 (recommended) Text on a checkbox to enable IPv6 - + Use translations Text on a checkbox to enable translations - + Make Tox portable Text on a checkbox to make qTox a portable application - + Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - + Theme - + Smiley Pack @@ -288,29 +301,29 @@ IdentityPage - + Public Information - + Name Username/nick - + Status Status message - + Tox ID - + Your Tox ID @@ -375,42 +388,42 @@ SettingsDialog - + qTox – Settings - + General - + Identity - + Privacy - + Audio/Video - + Ok - + Cancel - + Apply diff --git a/translations/pl.ts b/translations/pl.ts index 6aaa4e6d6..edff773c3 100644 --- a/translations/pl.ts +++ b/translations/pl.ts @@ -1,13 +1,26 @@ - + AVPage - + Video Settings Ustawienia wideo + + + + Show video preview + On a button + + + + + Hide video preview + On a button + + AddFriendForm @@ -199,41 +212,41 @@ GeneralPage - + General Settings Główne ustawienia - + Enable IPv6 (recommended) Text on a checkbox to enable IPv6 Użyj IPv6 (rekomendowane) - + Use translations Text on a checkbox to enable translations Użyj tłumaczenia - + Make Tox portable Text on a checkbox to make qTox a portable application Zrób Tox przenośnym - + Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox Zamiast domyślnego katalogu użyj obecnego do zapisania ustawień - + Theme Motyw - + Smiley Pack needs better translation Paczka uśmiechów @@ -291,29 +304,29 @@ IdentityPage - + Public Information Informacja publiczna - + Name Username/nick Nick - + Status Status message Status - + Tox ID Tox ID - + Your Tox ID Twój Tox ID @@ -379,42 +392,42 @@ SettingsDialog - + qTox – Settings qTox – Ustawienia - + General Główne - + Identity Tożsamość - + Privacy Prywatność - + Audio/Video Audio/Wideo - + Ok Ok - + Cancel Anuluj - + Apply Zastosuj diff --git a/translations/ru.ts b/translations/ru.ts index 87c52b238..56c4aaebf 100644 --- a/translations/ru.ts +++ b/translations/ru.ts @@ -4,10 +4,23 @@ AVPage - + Video Settings Настройки видео + + + + Show video preview + On a button + + + + + Hide video preview + On a button + + AddFriendForm @@ -246,41 +259,41 @@ GeneralPage - + General Settings Основные настройки - + Enable IPv6 (recommended) Text on a checkbox to enable IPv6 Включить IPv6 (рекомендуется) - + Use translations Text on a checkbox to enable translations Русскоязычный интерфейс - + Make Tox portable Text on a checkbox to make qTox a portable application Портативный режим - + Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox Сохранять настройки в рабочую директорию вместо страндартной директории настроек - + Theme Тема - + Smiley Pack Набор смайликов @@ -341,29 +354,29 @@ IdentityPage - + Public Information Публичные данные - + Name Username/nick Имя - + Status Status message Статус - + Tox ID Tox ID - + Your Tox ID Ваш Tox ID @@ -432,42 +445,42 @@ Диалог настроек - + qTox – Settings - + General Основное - + Identity Личные данные - + Privacy Безопасность - + Audio/Video Аудио и видео - + Ok ОК - + Cancel Отмена - + Apply Применить diff --git a/widget/settingsdialog.cpp b/widget/settingsdialog.cpp index 05ce3c165..d81973286 100644 --- a/widget/settingsdialog.cpp +++ b/widget/settingsdialog.cpp @@ -23,6 +23,7 @@ //======================================== class GeneralPage : public QWidget { + Q_OBJECT public: GeneralPage(QWidget *parent = 0) : QWidget(parent) @@ -72,6 +73,7 @@ public: class IdentityPage : public QWidget { + Q_OBJECT public: IdentityPage(QWidget* parent = 0) : QWidget(parent) @@ -131,7 +133,7 @@ public: camView = new SelfCamView(parent->getWidget()->getCamera()); camView->hide(); // hide by default - testVideo = new QPushButton("Show video preview"); + testVideo = new QPushButton(tr("Show video preview","On a button")); connect(testVideo, SIGNAL(clicked()), this, SLOT(onTestVideoPressed())); QVBoxLayout *vLayout = new QVBoxLayout(); @@ -152,13 +154,13 @@ public: void showTestVideo() { - testVideo->setText("Hide video preview"); + testVideo->setText(tr("Hide video preview","On a button")); camView->show(); } void closeTestVideo() { - testVideo->setText("Show video preview"); + testVideo->setText(tr("Show video preview","On a button")); camView->close(); } From 1225a513c7cca7ff8aee5a52883331de76b55e34 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 13 Sep 2014 15:24:53 +0200 Subject: [PATCH 24/30] Update French translation --- translations/fr.qm | Bin 3969 -> 7085 bytes translations/fr.ts | 90 ++++++++++++++++++++++----------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/translations/fr.qm b/translations/fr.qm index 98e9e1aaa0abc0d733d08a78db17bff6152751da..278415266881501d4faa330eddeeb5386c01c6cc 100644 GIT binary patch literal 7085 zcmbVQYit}>6+X6i*RS>3vGZ^pH{66cuLdW51*MAGICku8XdK6nMCDN!?_7H)-ksUZ z%=%FYi2_wq1q3vdge0Ou6p7Fui9}VQQYZ?AM&a?NY5tW0{m~i_{m~#O5{U2IyF0t< z-F4C`a%OjD&bjA&=bZ1HGkbn&c3yk$!ZW{L-~GxLzW?(#_Yu_|APRqmXw4N0ef=q- z&Px=!a1qycDSY65qV_XXKa(U{-9z{NFGSSz1nqwFUZR$ls4sgOvPbB^+-}@IM+bL3 zL$uPSPyZcqt-qo3|Gkdy-=k+gA0~=LYeRjn;JNFyt;Z8Yt3FmMH@}W^w$`n_`4b|# zTo+&aALxIh?%J6rh-$9Xz47$>M2$B>3m1I+J`_3|e;IamhR&Y+Hc{IReO>X3(7E0C z-W~}(|BV`)_m9w}wU5BQ!=aZq-Xy9!75dltx1n!uxaSjpBwF#fzIHBzKY8#6u=Ahc zhmsp{|AVmHxu58cj_}u-pCf7>4FCAluZTLVcPtqHT>gF8&aD&osW(aueSlZTj^Kap-xn>EGYE z54c}%zW;SxLp{-K@1)Zn?Svcz663 zS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)-2Fv%^kAVjGva0Id z11c#VD~4+9;xgLT`ID?kSsL1^yRY}rx= zfZ~p9`8+`NtU7G@E}=lWf}K$UN()1#dVz=7a$0 zcFrRnyBHYQ7joX`1v-rVJ=c$ECJYQLc|7hKK!bSdc~dqN03B|_dqU|m(7_D6r)C4i z*@gLJW~2bcXYd7euLn9Pjc-HR7NGjynG6hk0?a^#3Ji`6Sq%9Mr3@tusSHJv9mEti zcQ7+EZ~n*ji*fQsP9H{{$$Nw(CpUAsZC=Y$%)EKGP%hKtcG0xSSHuh^hlm?a=9j3M MyiLMq@ Video Settings - + Options vidéo Show video preview On a button - + Montrer l'aperçu vidéo Hide video preview On a button - + Cacher l'aperçu vidéo @@ -62,13 +62,13 @@ You can't add yourself as a friend! When trying to add your own Tox ID as friend - + Vous ne pouvez pas vous ajouter vous même en temps qu'ami! This address does not exist The DNS gives the Tox ID associated to toxme.se addresses - + Cette addresse n'existe pas @@ -138,19 +138,19 @@ Save a file Title of the file saving dialog - Sauvegarder un fichier + Sauvegarder un fichier Location not writable Title of permissions popup - + Impossible d'écrire ici You do not have permission to write that location. Choose another, or cancel the save dialog. text of permissions popup - + Vous n'avez pas la permission d'écrire ici. Choisissez un audre endroit, ou annulez. @@ -167,17 +167,17 @@ Transfered Files "Headline" of the window - + Transfers Downloads - + Téléchargements Uploads - + Envois @@ -242,41 +242,41 @@ General Settings - + Options Générales Enable IPv6 (recommended) Text on a checkbox to enable IPv6 - Activer IPv6 (recommandé) + Activer IPv6 (recommandé) Use translations Text on a checkbox to enable translations - + Utiliser les traductions Make Tox portable Text on a checkbox to make qTox a portable application - + Rendre Tox portable Save settings to the working directory instead of the usual conf dir describes makeToxPortable checkbox - + Sauvegarde les options dans le dossier courant au lieu du dossier de configuration habituel Theme - + Thème Smiley Pack - + Pack de smileys @@ -285,7 +285,7 @@ Save chat log - Sauvegarder l'historique de conversation + Sauvegarder l'historique de conversation @@ -337,29 +337,29 @@ Public Information - + Informations Publiques Name Username/nick - Nom + Nom Status Status message - Status + Status Tox ID - ID Tox + ID Tox Your Tox ID - + Votre ID Tox @@ -367,47 +367,47 @@ qTox - + qTox Your name - Votre nom + Votre nom Your status - Votre status + Votre status Add friends - + Ajouter des amis Create a group chat - + Creer un groupe View completed file transfers - + Voir les transfers de fichiers terminés Change your settings - + Changer les options Close - Fermer + Fermer Ctrl+Q - Ctrl+Q + Ctrl+Q @@ -424,42 +424,42 @@ qTox – Settings - + qTox — Options General - + General Identity - + Identité Privacy - + Vie Privée Audio/Video - + Audio/Vidéo Ok - + Ok Cancel - + Annuler Apply - + Appliquer @@ -516,25 +516,25 @@ Online Button to set your status to 'Online' - Connecté + Connecté Away Button to set your status to 'Away' - Indisponnible + Indisponnible Busy Button to set your status to 'Busy' - Occupé + Occupé <Unknown> Placeholder when we don't know someone's name in a group chat - <Inconnu> + <Inconnu> From 59869b4a8771b3ddf14f789a67a544660bfdbf2a Mon Sep 17 00:00:00 2001 From: dubslow Date: Sat, 13 Sep 2014 00:55:21 -0500 Subject: [PATCH 25/30] first thing's first, gotta placate the ocd --- mainwindow.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mainwindow.ui b/mainwindow.ui index 7f9cd12c5..20e8269cf 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -3124,13 +3124,13 @@ QSplitter:handle{ 0 - 60 + 57 16777215 - 60 + 57 From e4e36dc946027b603fcb60ff3791e7d6a6625907 Mon Sep 17 00:00:00 2001 From: dubslow Date: Sat, 13 Sep 2014 03:32:24 -0500 Subject: [PATCH 26/30] initial new settings widget, subforms not started also "filing" some files under misc --- core.cpp | 6 +- main.cpp | 2 +- cdata.cpp => misc/cdata.cpp | 0 cdata.h => misc/cdata.h | 0 cstring.cpp => misc/cstring.cpp | 0 cstring.h => misc/cstring.h | 0 settings.cpp => misc/settings.cpp | 0 settings.h => misc/settings.h | 0 smileypack.cpp => misc/smileypack.cpp | 0 smileypack.h => misc/smileypack.h | 0 style.cpp => misc/style.cpp | 0 style.h => misc/style.h | 0 qtox.pro | 28 ++--- widget/emoticonswidget.cpp | 4 +- widget/form/genericchatform.cpp | 6 +- widget/form/settingswidget.cpp | 164 ++++++++++++++++++++++++++ widget/form/settingswidget.h | 62 ++++++++++ widget/groupwidget.cpp | 2 +- widget/tool/chataction.cpp | 2 +- widget/widget.cpp | 11 +- widget/widget.h | 4 +- 21 files changed, 258 insertions(+), 33 deletions(-) rename cdata.cpp => misc/cdata.cpp (100%) rename cdata.h => misc/cdata.h (100%) rename cstring.cpp => misc/cstring.cpp (100%) rename cstring.h => misc/cstring.h (100%) rename settings.cpp => misc/settings.cpp (100%) rename settings.h => misc/settings.h (100%) rename smileypack.cpp => misc/smileypack.cpp (100%) rename smileypack.h => misc/smileypack.h (100%) rename style.cpp => misc/style.cpp (100%) rename style.h => misc/style.h (100%) create mode 100644 widget/form/settingswidget.cpp create mode 100644 widget/form/settingswidget.h diff --git a/core.cpp b/core.cpp index fe1e3187b..81d022588 100644 --- a/core.cpp +++ b/core.cpp @@ -15,9 +15,9 @@ */ #include "core.h" -#include "cdata.h" -#include "cstring.h" -#include "settings.h" +#include "misc/cdata.h" +#include "misc/cstring.h" +#include "misc/settings.h" #include "widget/widget.h" #include diff --git a/main.cpp b/main.cpp index 1cdac827e..8e981baa5 100644 --- a/main.cpp +++ b/main.cpp @@ -15,7 +15,7 @@ */ #include "widget/widget.h" -#include "settings.h" +#include "misc/settings.h" #include #include #include diff --git a/cdata.cpp b/misc/cdata.cpp similarity index 100% rename from cdata.cpp rename to misc/cdata.cpp diff --git a/cdata.h b/misc/cdata.h similarity index 100% rename from cdata.h rename to misc/cdata.h diff --git a/cstring.cpp b/misc/cstring.cpp similarity index 100% rename from cstring.cpp rename to misc/cstring.cpp diff --git a/cstring.h b/misc/cstring.h similarity index 100% rename from cstring.h rename to misc/cstring.h diff --git a/settings.cpp b/misc/settings.cpp similarity index 100% rename from settings.cpp rename to misc/settings.cpp diff --git a/settings.h b/misc/settings.h similarity index 100% rename from settings.h rename to misc/settings.h diff --git a/smileypack.cpp b/misc/smileypack.cpp similarity index 100% rename from smileypack.cpp rename to misc/smileypack.cpp diff --git a/smileypack.h b/misc/smileypack.h similarity index 100% rename from smileypack.h rename to misc/smileypack.h diff --git a/style.cpp b/misc/style.cpp similarity index 100% rename from style.cpp rename to misc/style.cpp diff --git a/style.h b/misc/style.h similarity index 100% rename from style.h rename to misc/style.h diff --git a/qtox.pro b/qtox.pro index 250d3abc8..9112e95c0 100644 --- a/qtox.pro +++ b/qtox.pro @@ -81,6 +81,7 @@ win32 { HEADERS += widget/form/addfriendform.h \ widget/form/chatform.h \ widget/form/groupchatform.h \ + widget/form/settingswidget.h \ widget/form/filesform.h \ widget/tool/chattextedit.h \ widget/tool/friendrequestdialog.h \ @@ -90,17 +91,17 @@ HEADERS += widget/form/addfriendform.h \ friend.h \ group.h \ grouplist.h \ - settings.h \ + misc/settings.h \ core.h \ friendlist.h \ - cdata.h \ - cstring.h \ + misc/cdata.h \ + misc/cstring.h \ widget/selfcamview.h \ widget/camera.h \ widget/netcamview.h \ - smileypack.h \ + misc/smileypack.h \ widget/emoticonswidget.h \ - style.h \ + misc/style.h \ widget/adjustingscrollarea.h \ widget/croppinglabel.h \ widget/friendlistwidget.h \ @@ -111,13 +112,13 @@ HEADERS += widget/form/addfriendform.h \ filetransferinstance.h \ corestructs.h \ coredefines.h \ - coreav.h \ - widget/settingsdialog.h + coreav.h SOURCES += \ widget/form/addfriendform.cpp \ widget/form/chatform.cpp \ widget/form/groupchatform.cpp \ + widget/form/settingswidget.cpp \ widget/form/filesform.cpp \ widget/tool/chattextedit.cpp \ widget/tool/friendrequestdialog.cpp \ @@ -130,15 +131,15 @@ SOURCES += \ group.cpp \ grouplist.cpp \ main.cpp \ - settings.cpp \ - cdata.cpp \ - cstring.cpp \ + misc/settings.cpp \ + misc/cdata.cpp \ + misc/cstring.cpp \ widget/selfcamview.cpp \ widget/camera.cpp \ widget/netcamview.cpp \ - smileypack.cpp \ + misc/smileypack.cpp \ widget/emoticonswidget.cpp \ - style.cpp \ + misc/style.cpp \ widget/adjustingscrollarea.cpp \ widget/croppinglabel.cpp \ widget/friendlistwidget.cpp \ @@ -148,5 +149,4 @@ SOURCES += \ widget/tool/chataction.cpp \ widget/chatareawidget.cpp \ filetransferinstance.cpp \ - corestructs.cpp \ - widget/settingsdialog.cpp + corestructs.cpp diff --git a/widget/emoticonswidget.cpp b/widget/emoticonswidget.cpp index bab7abe8d..b0ffb6028 100644 --- a/widget/emoticonswidget.cpp +++ b/widget/emoticonswidget.cpp @@ -15,8 +15,8 @@ */ #include "emoticonswidget.h" -#include "smileypack.h" -#include "style.h" +#include "misc/smileypack.h" +#include "misc/style.h" #include #include diff --git a/widget/form/genericchatform.cpp b/widget/form/genericchatform.cpp index f5681f1c6..2aff5d2a7 100644 --- a/widget/form/genericchatform.cpp +++ b/widget/form/genericchatform.cpp @@ -17,11 +17,11 @@ #include "genericchatform.h" #include "ui_mainwindow.h" #include -#include "smileypack.h" +#include "misc/smileypack.h" #include "widget/emoticonswidget.h" -#include "style.h" +#include "misc/style.h" #include "widget/widget.h" -#include "settings.h" +#include "misc/settings.h" #include "widget/tool/chataction.h" #include "widget/chatareawidget.h" #include "widget/tool/chattextedit.h" diff --git a/widget/form/settingswidget.cpp b/widget/form/settingswidget.cpp new file mode 100644 index 000000000..6e2778de8 --- /dev/null +++ b/widget/form/settingswidget.cpp @@ -0,0 +1,164 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#include "settingswidget.h" +#include "widget/widget.h" +#include "ui_mainwindow.h" + +SettingsWidget::SettingsWidget() + : QObject() +{ + main = new QWidget(); + // this crap is copied from ui_mainwindow.h... there's no easy way around + // just straight up copying it like this... oh well + // the layout/icons obviously need to be improved, but it's a working model, + // not a pretty one + QSizePolicy sizePolicy3(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + head = new QWidget(); + head->setObjectName(QStringLiteral("head")); + head->setEnabled(true); + sizePolicy3.setHeightForWidth(head->sizePolicy().hasHeightForWidth()); + head->setSizePolicy(sizePolicy3); + QPalette palette5; + QBrush brush(QColor(255, 255, 255, 255)); + brush.setStyle(Qt::SolidPattern); + QBrush brush1(QColor(28, 28, 28, 255)); + brush1.setStyle(Qt::SolidPattern); + QBrush brush2(QColor(42, 42, 42, 255)); + brush2.setStyle(Qt::SolidPattern); + QBrush brush3(QColor(35, 35, 35, 255)); + brush3.setStyle(Qt::SolidPattern); + QBrush brush4(QColor(14, 14, 14, 255)); + brush4.setStyle(Qt::SolidPattern); + QBrush brush5(QColor(18, 18, 18, 255)); + brush5.setStyle(Qt::SolidPattern); + QBrush brush6(QColor(0, 0, 0, 255)); + brush6.setStyle(Qt::SolidPattern); + QBrush brush7(QColor(255, 255, 220, 255)); + brush7.setStyle(Qt::SolidPattern); + palette5.setBrush(QPalette::Active, QPalette::WindowText, brush); + palette5.setBrush(QPalette::Active, QPalette::Button, brush1); + palette5.setBrush(QPalette::Active, QPalette::Light, brush2); + palette5.setBrush(QPalette::Active, QPalette::Midlight, brush3); + palette5.setBrush(QPalette::Active, QPalette::Dark, brush4); + palette5.setBrush(QPalette::Active, QPalette::Mid, brush5); + palette5.setBrush(QPalette::Active, QPalette::Text, brush); + palette5.setBrush(QPalette::Active, QPalette::BrightText, brush); + palette5.setBrush(QPalette::Active, QPalette::ButtonText, brush); + palette5.setBrush(QPalette::Active, QPalette::Base, brush6); + palette5.setBrush(QPalette::Active, QPalette::Window, brush1); + palette5.setBrush(QPalette::Active, QPalette::Shadow, brush6); + palette5.setBrush(QPalette::Active, QPalette::AlternateBase, brush4); + palette5.setBrush(QPalette::Active, QPalette::ToolTipBase, brush7); + palette5.setBrush(QPalette::Active, QPalette::ToolTipText, brush6); + palette5.setBrush(QPalette::Inactive, QPalette::WindowText, brush); + palette5.setBrush(QPalette::Inactive, QPalette::Button, brush1); + palette5.setBrush(QPalette::Inactive, QPalette::Light, brush2); + palette5.setBrush(QPalette::Inactive, QPalette::Midlight, brush3); + palette5.setBrush(QPalette::Inactive, QPalette::Dark, brush4); + palette5.setBrush(QPalette::Inactive, QPalette::Mid, brush5); + palette5.setBrush(QPalette::Inactive, QPalette::Text, brush); + palette5.setBrush(QPalette::Inactive, QPalette::BrightText, brush); + palette5.setBrush(QPalette::Inactive, QPalette::ButtonText, brush); + palette5.setBrush(QPalette::Inactive, QPalette::Base, brush6); + palette5.setBrush(QPalette::Inactive, QPalette::Window, brush1); + palette5.setBrush(QPalette::Inactive, QPalette::Shadow, brush6); + palette5.setBrush(QPalette::Inactive, QPalette::AlternateBase, brush4); + palette5.setBrush(QPalette::Inactive, QPalette::ToolTipBase, brush7); + palette5.setBrush(QPalette::Inactive, QPalette::ToolTipText, brush6); + palette5.setBrush(QPalette::Disabled, QPalette::WindowText, brush4); + palette5.setBrush(QPalette::Disabled, QPalette::Button, brush1); + palette5.setBrush(QPalette::Disabled, QPalette::Light, brush2); + palette5.setBrush(QPalette::Disabled, QPalette::Midlight, brush3); + palette5.setBrush(QPalette::Disabled, QPalette::Dark, brush4); + palette5.setBrush(QPalette::Disabled, QPalette::Mid, brush5); + palette5.setBrush(QPalette::Disabled, QPalette::Text, brush4); + palette5.setBrush(QPalette::Disabled, QPalette::BrightText, brush); + palette5.setBrush(QPalette::Disabled, QPalette::ButtonText, brush4); + palette5.setBrush(QPalette::Disabled, QPalette::Base, brush1); + palette5.setBrush(QPalette::Disabled, QPalette::Window, brush1); + palette5.setBrush(QPalette::Disabled, QPalette::Shadow, brush6); + palette5.setBrush(QPalette::Disabled, QPalette::AlternateBase, brush1); + palette5.setBrush(QPalette::Disabled, QPalette::ToolTipBase, brush7); + palette5.setBrush(QPalette::Disabled, QPalette::ToolTipText, brush6); + head->setPalette(palette5); + head->setAutoFillBackground(true); + iconsLayout = new QHBoxLayout(head); + iconsLayout->setSpacing(0); + iconsLayout->setObjectName(QStringLiteral("iconsLayout")); + iconsLayout->setContentsMargins(0, 0, 0, 0); + + generalButton = new QPushButton(head); + generalButton->setObjectName(QStringLiteral("generalButton")); + generalButton->setMinimumSize(QSize(55, 35)); + generalButton->setMaximumSize(QSize(55, 35)); + generalButton->setFocusPolicy(Qt::NoFocus); + QIcon icon1; + icon1.addFile(QStringLiteral(":/img/add.png"), QSize(), QIcon::Normal, QIcon::Off); + generalButton->setIcon(icon1); + generalButton->setFlat(true); + iconsLayout->addWidget(generalButton); + + identityButton = new QPushButton(head); + identityButton->setObjectName(QStringLiteral("identityButton")); + identityButton->setMinimumSize(QSize(55, 35)); + identityButton->setMaximumSize(QSize(55, 35)); + identityButton->setFocusPolicy(Qt::NoFocus); + QIcon icon2; + icon2.addFile(QStringLiteral(":/img/group.png"), QSize(), QIcon::Normal, QIcon::Off); + identityButton->setIcon(icon2); + identityButton->setFlat(true); + iconsLayout->addWidget(identityButton); + + privacyButton = new QPushButton(head); + privacyButton->setObjectName(QStringLiteral("privacyButton")); + privacyButton->setMinimumSize(QSize(55, 35)); + privacyButton->setMaximumSize(QSize(55, 35)); + privacyButton->setFocusPolicy(Qt::NoFocus); + QIcon icon3; + icon3.addFile(QStringLiteral(":/img/transfer.png"), QSize(), QIcon::Normal, QIcon::Off); + privacyButton->setIcon(icon3); + privacyButton->setFlat(true); + iconsLayout->addWidget(privacyButton); + + avButton = new QPushButton(head); + avButton->setObjectName(QStringLiteral("avButton")); + avButton->setMinimumSize(QSize(55, 35)); + avButton->setMaximumSize(QSize(55, 35)); + avButton->setFocusPolicy(Qt::NoFocus); + QIcon icon4; + icon4.addFile(QStringLiteral(":/img/settings.png"), QSize(), QIcon::Normal, QIcon::Off); + avButton->setIcon(icon4); + avButton->setFlat(true); + iconsLayout->addWidget(avButton); + + head->setLayout(iconsLayout); + +} + +SettingsWidget::~SettingsWidget() +{ +} + +void SettingsWidget::show(Ui::MainWindow& ui) +{ + ui.mainContent->layout()->addWidget(main); + ui.mainHead->layout()->addWidget(head); + main->show(); + head->show(); +} diff --git a/widget/form/settingswidget.h b/widget/form/settingswidget.h new file mode 100644 index 000000000..a1cee909f --- /dev/null +++ b/widget/form/settingswidget.h @@ -0,0 +1,62 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#ifndef SETTINGSWIDGET_H +#define SETTINGSWIDGET_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "widget/croppinglabel.h" + +namespace Ui {class MainWindow;} +class QString; + +class SettingsWidget : public QObject +{ + Q_OBJECT +public: + SettingsWidget(); + ~SettingsWidget(); + + void show(Ui::MainWindow &ui); + +public slots: + //void setFriendAddress(const QString& friendAddress); + +private slots: + +private: + QWidget *main, *head; + // the code pertaining to the icons is mostly copied from ui_mainwindow.h + QHBoxLayout *iconsLayout; + QPushButton *generalButton; + QPushButton *identityButton; + QPushButton *privacyButton; + QPushButton *avButton; + + // now the actual pages and stuff + // ... +public: +}; + +#endif // SETTINGSFORM_H diff --git a/widget/groupwidget.cpp b/widget/groupwidget.cpp index b8c1cbcc0..0c02db3d2 100644 --- a/widget/groupwidget.cpp +++ b/widget/groupwidget.cpp @@ -17,7 +17,7 @@ #include "groupwidget.h" #include "grouplist.h" #include "group.h" -#include "settings.h" +#include "misc/settings.h" #include "widget/form/groupchatform.h" #include #include diff --git a/widget/tool/chataction.cpp b/widget/tool/chataction.cpp index bcd1f1080..c05fd36b9 100644 --- a/widget/tool/chataction.cpp +++ b/widget/tool/chataction.cpp @@ -15,7 +15,7 @@ */ #include "chataction.h" -#include "smileypack.h" +#include "misc/smileypack.h" #include #include #include "filetransferinstance.h" diff --git a/widget/widget.cpp b/widget/widget.cpp index 36b2c33c1..f1472bcd6 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -17,7 +17,7 @@ #include "widget.h" #include "ui_mainwindow.h" #include "core.h" -#include "settings.h" +#include "misc/settings.h" #include "friend.h" #include "friendlist.h" #include "widget/tool/friendrequestdialog.h" @@ -26,12 +26,11 @@ #include "group.h" #include "widget/groupwidget.h" #include "widget/form/groupchatform.h" -#include "style.h" +#include "misc/style.h" #include "selfcamview.h" #include "widget/friendlistwidget.h" #include "camera.h" #include "widget/form/chatform.h" -#include "widget/settingsdialog.h" #include #include #include @@ -156,7 +155,6 @@ Widget::Widget(QWidget *parent) ui->statusButton->style()->polish(ui->statusButton); camera = new Camera; - settingsDialog = new SettingsDialog(this); // Disable some widgets until we're connected to the DHT ui->statusButton->setEnabled(false); @@ -335,8 +333,9 @@ void Widget::onTransferClicked() void Widget::onSettingsClicked() { - settingsDialog->readConfig(); - settingsDialog->show(); + hideMainForms(); + settingsWidget.show(*ui); + activeChatroomWidget = nullptr; } void Widget::hideMainForms() diff --git a/widget/widget.h b/widget/widget.h index 035ea2ae0..9512f00e9 100644 --- a/widget/widget.h +++ b/widget/widget.h @@ -19,6 +19,7 @@ #include #include "widget/form/addfriendform.h" +#include "widget/form/settingswidget.h" #include "widget/form/filesform.h" #include "corestructs.h" @@ -37,7 +38,6 @@ class QMenu; class Core; class Camera; class FriendListWidget; -class SettingsDialog; class Widget : public QMainWindow { @@ -134,8 +134,8 @@ private: Core* core; QThread* coreThread; AddFriendForm friendForm; + SettingsWidget settingsWidget; FilesForm filesForm; - SettingsDialog* settingsDialog; static Widget* instance; GenericChatroomWidget* activeChatroomWidget; FriendListWidget* contactListWidget; From e55f15725ec9558bdca588c8a2cfe80f40fef5b7 Mon Sep 17 00:00:00 2001 From: bill Date: Sun, 14 Sep 2014 13:42:27 -0500 Subject: [PATCH 27/30] move buttons to bottom --- widget/form/settingswidget.cpp | 66 +++++++++++++++++++--------------- widget/form/settingswidget.h | 20 +++++------ 2 files changed, 48 insertions(+), 38 deletions(-) diff --git a/widget/form/settingswidget.cpp b/widget/form/settingswidget.cpp index 6e2778de8..fcbd2a981 100644 --- a/widget/form/settingswidget.cpp +++ b/widget/form/settingswidget.cpp @@ -19,9 +19,35 @@ #include "ui_mainwindow.h" SettingsWidget::SettingsWidget() - : QObject() + : QWidget() { + _main = new QWidget(); main = new QWidget(); + head = new QWidget(); + foot = new QWidget(); + prepButtons(); + foot->setLayout(iconsLayout); + _mainLayout = new QVBoxLayout(_main); + _mainLayout->addWidget(main); + _mainLayout->addWidget(foot); + // something something foot size + _main->setLayout(_mainLayout); +} + +SettingsWidget::~SettingsWidget() +{ +} + +void SettingsWidget::show(Ui::MainWindow& ui) +{ + ui.mainContent->layout()->addWidget(_main); + ui.mainHead->layout()->addWidget(head); + _main->show(); + head->show(); +} + +void SettingsWidget::prepButtons() +{ // this crap is copied from ui_mainwindow.h... there's no easy way around // just straight up copying it like this... oh well // the layout/icons obviously need to be improved, but it's a working model, @@ -29,11 +55,9 @@ SettingsWidget::SettingsWidget() QSizePolicy sizePolicy3(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); - head = new QWidget(); - head->setObjectName(QStringLiteral("head")); - head->setEnabled(true); - sizePolicy3.setHeightForWidth(head->sizePolicy().hasHeightForWidth()); - head->setSizePolicy(sizePolicy3); + foot->setObjectName(QStringLiteral("foot")); + foot->setEnabled(true); + foot->setSizePolicy(sizePolicy3); QPalette palette5; QBrush brush(QColor(255, 255, 255, 255)); brush.setStyle(Qt::SolidPattern); @@ -96,14 +120,15 @@ SettingsWidget::SettingsWidget() palette5.setBrush(QPalette::Disabled, QPalette::AlternateBase, brush1); palette5.setBrush(QPalette::Disabled, QPalette::ToolTipBase, brush7); palette5.setBrush(QPalette::Disabled, QPalette::ToolTipText, brush6); - head->setPalette(palette5); - head->setAutoFillBackground(true); - iconsLayout = new QHBoxLayout(head); + foot->setPalette(palette5); + foot->setAutoFillBackground(true); + + iconsLayout = new QHBoxLayout(foot); iconsLayout->setSpacing(0); iconsLayout->setObjectName(QStringLiteral("iconsLayout")); iconsLayout->setContentsMargins(0, 0, 0, 0); - generalButton = new QPushButton(head); + generalButton = new QPushButton(foot); generalButton->setObjectName(QStringLiteral("generalButton")); generalButton->setMinimumSize(QSize(55, 35)); generalButton->setMaximumSize(QSize(55, 35)); @@ -114,7 +139,7 @@ SettingsWidget::SettingsWidget() generalButton->setFlat(true); iconsLayout->addWidget(generalButton); - identityButton = new QPushButton(head); + identityButton = new QPushButton(foot); identityButton->setObjectName(QStringLiteral("identityButton")); identityButton->setMinimumSize(QSize(55, 35)); identityButton->setMaximumSize(QSize(55, 35)); @@ -125,7 +150,7 @@ SettingsWidget::SettingsWidget() identityButton->setFlat(true); iconsLayout->addWidget(identityButton); - privacyButton = new QPushButton(head); + privacyButton = new QPushButton(foot); privacyButton->setObjectName(QStringLiteral("privacyButton")); privacyButton->setMinimumSize(QSize(55, 35)); privacyButton->setMaximumSize(QSize(55, 35)); @@ -136,7 +161,7 @@ SettingsWidget::SettingsWidget() privacyButton->setFlat(true); iconsLayout->addWidget(privacyButton); - avButton = new QPushButton(head); + avButton = new QPushButton(foot); avButton->setObjectName(QStringLiteral("avButton")); avButton->setMinimumSize(QSize(55, 35)); avButton->setMaximumSize(QSize(55, 35)); @@ -146,19 +171,4 @@ SettingsWidget::SettingsWidget() avButton->setIcon(icon4); avButton->setFlat(true); iconsLayout->addWidget(avButton); - - head->setLayout(iconsLayout); - -} - -SettingsWidget::~SettingsWidget() -{ -} - -void SettingsWidget::show(Ui::MainWindow& ui) -{ - ui.mainContent->layout()->addWidget(main); - ui.mainHead->layout()->addWidget(head); - main->show(); - head->show(); } diff --git a/widget/form/settingswidget.h b/widget/form/settingswidget.h index a1cee909f..c901ce906 100644 --- a/widget/form/settingswidget.h +++ b/widget/form/settingswidget.h @@ -17,21 +17,15 @@ #ifndef SETTINGSWIDGET_H #define SETTINGSWIDGET_H -#include -#include -#include -#include -#include +#include #include -#include -#include - +#include #include "widget/croppinglabel.h" namespace Ui {class MainWindow;} class QString; -class SettingsWidget : public QObject +class SettingsWidget : public QWidget { Q_OBJECT public: @@ -46,7 +40,9 @@ public slots: private slots: private: - QWidget *main, *head; + QWidget *_main, *main, *head, *foot; + // _main consists of main+foot + QVBoxLayout *_mainLayout; // the code pertaining to the icons is mostly copied from ui_mainwindow.h QHBoxLayout *iconsLayout; QPushButton *generalButton; @@ -56,6 +52,10 @@ private: // now the actual pages and stuff // ... + + + + void prepButtons(); // just so I can move the crap to the bottom of the file public: }; From 5ec79fc26080eae03350877686336d1caba223a2 Mon Sep 17 00:00:00 2001 From: bill Date: Mon, 15 Sep 2014 05:45:59 -0500 Subject: [PATCH 28/30] new settings infrastructure done, though there's a double free or something in ~Widget() --- qtox.pro | 9 ++++ widget/form/settings/avform.cpp | 26 ++++++++++ widget/form/settings/avform.h | 33 ++++++++++++ widget/form/settings/generalform.cpp | 46 ++++++++++++++++ widget/form/settings/generalform.h | 41 +++++++++++++++ widget/form/settings/genericsettings.h | 46 ++++++++++++++++ widget/form/settings/identityform.cpp | 38 ++++++++++++++ widget/form/settings/identityform.h | 34 ++++++++++++ widget/form/settings/privacyform.cpp | 27 ++++++++++ widget/form/settings/privacyform.h | 33 ++++++++++++ widget/form/settingswidget.cpp | 72 +++++++++++++++++++++++--- widget/form/settingswidget.h | 41 +++++++++------ 12 files changed, 423 insertions(+), 23 deletions(-) create mode 100644 widget/form/settings/avform.cpp create mode 100644 widget/form/settings/avform.h create mode 100644 widget/form/settings/generalform.cpp create mode 100644 widget/form/settings/generalform.h create mode 100644 widget/form/settings/genericsettings.h create mode 100644 widget/form/settings/identityform.cpp create mode 100644 widget/form/settings/identityform.h create mode 100644 widget/form/settings/privacyform.cpp create mode 100644 widget/form/settings/privacyform.h diff --git a/qtox.pro b/qtox.pro index 9112e95c0..5c550cd1f 100644 --- a/qtox.pro +++ b/qtox.pro @@ -82,6 +82,11 @@ HEADERS += widget/form/addfriendform.h \ widget/form/chatform.h \ widget/form/groupchatform.h \ widget/form/settingswidget.h \ + widget/form/settings/genericsettings.h \ + widget/form/settings/generalform.h \ + widget/form/settings/identityform.h \ + widget/form/settings/privacyform.h \ + widget/form/settings/avform.h \ widget/form/filesform.h \ widget/tool/chattextedit.h \ widget/tool/friendrequestdialog.h \ @@ -119,6 +124,10 @@ SOURCES += \ widget/form/chatform.cpp \ widget/form/groupchatform.cpp \ widget/form/settingswidget.cpp \ + widget/form/settings/generalform.cpp \ + widget/form/settings/identityform.cpp \ + widget/form/settings/privacyform.cpp \ + widget/form/settings/avform.cpp \ widget/form/filesform.cpp \ widget/tool/chattextedit.cpp \ widget/tool/friendrequestdialog.cpp \ diff --git a/widget/form/settings/avform.cpp b/widget/form/settings/avform.cpp new file mode 100644 index 000000000..347a1cfbb --- /dev/null +++ b/widget/form/settings/avform.cpp @@ -0,0 +1,26 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#include "avform.h" + +AVForm::AVForm() +{ + prep(); +} + +AVForm::~AVForm() +{ +} diff --git a/widget/form/settings/avform.h b/widget/form/settings/avform.h new file mode 100644 index 000000000..e214e133e --- /dev/null +++ b/widget/form/settings/avform.h @@ -0,0 +1,33 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#ifndef AVFORM_H +#define AVFORM_H + +#include "genericsettings.h" + +class AVForm : public GenericForm +{ + Q_OBJECT +public: + AVForm(); + ~AVForm(); + +private: + +}; + +#endif diff --git a/widget/form/settings/generalform.cpp b/widget/form/settings/generalform.cpp new file mode 100644 index 000000000..050d4f7eb --- /dev/null +++ b/widget/form/settings/generalform.cpp @@ -0,0 +1,46 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#include "generalform.h" +#include "widget/form/settingswidget.h" + +GeneralForm::GeneralForm() +{ + prep(); + group = new QGroupBox(tr("General Settings")); + enableIPv6 = new QCheckBox(); + enableIPv6->setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); + useTranslations = new QCheckBox(); + useTranslations->setText(tr("Use translations","Text on a checkbox to enable translations")); + makeToxPortable = new QCheckBox(); + makeToxPortable->setText(tr("Make Tox portable","Text on a checkbox to make qTox a portable application")); + makeToxPortable->setToolTip(tr("Save settings to the working directory instead of the usual conf dir","describes makeToxPortable checkbox")); + + QVBoxLayout *vLayout = new QVBoxLayout(); + vLayout->addWidget(enableIPv6); + vLayout->addWidget(useTranslations); + vLayout->addWidget(makeToxPortable); + group->setLayout(vLayout); + + label.setText(tr("General Settings")); + + headLayout.addWidget(&label); + layout.addWidget(group); +} + +GeneralForm::~GeneralForm() +{ +} diff --git a/widget/form/settings/generalform.h b/widget/form/settings/generalform.h new file mode 100644 index 000000000..c484a436d --- /dev/null +++ b/widget/form/settings/generalform.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#ifndef GENERALFORM_H +#define GENERALFORM_H + +#include "genericsettings.h" +#include +#include +#include + + +class GeneralForm : public GenericForm +{ + Q_OBJECT +public: + GeneralForm(); + ~GeneralForm(); + +private: + QGroupBox *group; + QCheckBox* enableIPv6; + QCheckBox* useTranslations; + QCheckBox* makeToxPortable; + QLabel label; +}; + +#endif diff --git a/widget/form/settings/genericsettings.h b/widget/form/settings/genericsettings.h new file mode 100644 index 000000000..9353d21df --- /dev/null +++ b/widget/form/settings/genericsettings.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#ifndef GENERICFORM_H +#define GENERICFORM_H + +#include +#include +#include "widget/form/settingswidget.h" + +class GenericForm : public QObject +{ + Q_OBJECT +public: + virtual void show(SettingsWidget& sw) + { + sw.body->layout()->addWidget(&body); + body.show(); + sw.head->layout()->addWidget(&head); + head.show(); + } + +protected: + QVBoxLayout layout, headLayout; + QWidget head, body; + void prep() // call in subclass constructor + { + head.setLayout(&headLayout); + body.setLayout(&layout); + } +}; + +#endif diff --git a/widget/form/settings/identityform.cpp b/widget/form/settings/identityform.cpp new file mode 100644 index 000000000..dbd5574c5 --- /dev/null +++ b/widget/form/settings/identityform.cpp @@ -0,0 +1,38 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#include "identityform.h" +#include "widget/form/settingswidget.h" +#include +#include + +IdentityForm::IdentityForm() +{ + prep(); + toxGroup = new QGroupBox(tr("Tox ID")); + QLabel* toxIdLabel = new QLabel(tr("Your Tox ID")); + QLineEdit* toxID = new QLineEdit(); + toxID->setReadOnly(true); + QVBoxLayout* toxLayout = new QVBoxLayout(); + toxLayout->addWidget(toxIdLabel); + toxLayout->addWidget(toxID); + toxGroup->setLayout(toxLayout); + layout.addWidget(toxGroup); +} + +IdentityForm::~IdentityForm() +{ +} diff --git a/widget/form/settings/identityform.h b/widget/form/settings/identityform.h new file mode 100644 index 000000000..dc616d75e --- /dev/null +++ b/widget/form/settings/identityform.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#ifndef IDENTITYFORM_H +#define IDENTITYFORM_H + +#include "genericsettings.h" +#include + +class IdentityForm : public GenericForm +{ + Q_OBJECT +public: + IdentityForm(); + ~IdentityForm(); + +private: + QGroupBox* toxGroup; +}; + +#endif diff --git a/widget/form/settings/privacyform.cpp b/widget/form/settings/privacyform.cpp new file mode 100644 index 000000000..856f64954 --- /dev/null +++ b/widget/form/settings/privacyform.cpp @@ -0,0 +1,27 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#include "privacyform.h" +#include "widget/form/settingswidget.h" + +PrivacyForm::PrivacyForm() +{ + prep(); +} + +PrivacyForm::~PrivacyForm() +{ +} diff --git a/widget/form/settings/privacyform.h b/widget/form/settings/privacyform.h new file mode 100644 index 000000000..ae1e61956 --- /dev/null +++ b/widget/form/settings/privacyform.h @@ -0,0 +1,33 @@ +/* + Copyright (C) 2014 by Project Tox + + This file is part of qTox, a Qt-based graphical interface for Tox. + + This program 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. + This program 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 COPYING file for more details. +*/ + +#ifndef PRIVACYFORM_H +#define PRIVACYFORM_H + +#include "genericsettings.h" + +class PrivacyForm : public GenericForm +{ + Q_OBJECT +public: + PrivacyForm(); + ~PrivacyForm(); + +private: + +}; + +#endif diff --git a/widget/form/settingswidget.cpp b/widget/form/settingswidget.cpp index fcbd2a981..3a13c1cdb 100644 --- a/widget/form/settingswidget.cpp +++ b/widget/form/settingswidget.cpp @@ -17,21 +17,41 @@ #include "settingswidget.h" #include "widget/widget.h" #include "ui_mainwindow.h" +#include "widget/form/settings/generalform.h" +#include "widget/form/settings/identityform.h" +#include "widget/form/settings/privacyform.h" +#include "widget/form/settings/avform.h" SettingsWidget::SettingsWidget() : QWidget() { - _main = new QWidget(); + generalForm = new GeneralForm(); + identityForm = new IdentityForm(); + privacyForm = new PrivacyForm(); + avForm = new AVForm(); + main = new QWidget(); + body = new QWidget(); head = new QWidget(); foot = new QWidget(); + + head->setLayout(new QVBoxLayout()); + body->setLayout(new QVBoxLayout()); + prepButtons(); foot->setLayout(iconsLayout); - _mainLayout = new QVBoxLayout(_main); - _mainLayout->addWidget(main); - _mainLayout->addWidget(foot); + mainLayout = new QVBoxLayout(main); + mainLayout->addWidget(body); + mainLayout->addWidget(foot); // something something foot size - _main->setLayout(_mainLayout); + main->setLayout(mainLayout); + + connect(generalButton, &QPushButton::clicked, this, &SettingsWidget::onGeneralClicked); + connect(identityButton, &QPushButton::clicked, this, &SettingsWidget::onIdentityClicked); + connect(privacyButton, &QPushButton::clicked, this, &SettingsWidget::onPrivacyClicked); + connect(avButton, &QPushButton::clicked, this, &SettingsWidget::onAVClicked); + + active = generalForm; } SettingsWidget::~SettingsWidget() @@ -40,12 +60,50 @@ SettingsWidget::~SettingsWidget() void SettingsWidget::show(Ui::MainWindow& ui) { - ui.mainContent->layout()->addWidget(_main); + active->show(*this); + ui.mainContent->layout()->addWidget(main); ui.mainHead->layout()->addWidget(head); - _main->show(); + main->show(); head->show(); } +void SettingsWidget::onGeneralClicked() +{ + hideSettingsForms(); + active = generalForm; + generalForm->show(*this); +} + +void SettingsWidget::onIdentityClicked() +{ + hideSettingsForms(); + active = identityForm; + identityForm->show(*this); +} + +void SettingsWidget::onPrivacyClicked() +{ + hideSettingsForms(); + active = privacyForm; + privacyForm->show(*this); +} + +void SettingsWidget::onAVClicked() +{ + hideSettingsForms(); + active = avForm; + avForm->show(*this); +} + +void SettingsWidget::hideSettingsForms() +{ + QLayoutItem *item; + while ((item = head->layout()->takeAt(0)) != 0) + item->widget()->hide(); + while ((item = body->layout()->takeAt(0)) != 0) + item->widget()->hide(); +} + void SettingsWidget::prepButtons() { // this crap is copied from ui_mainwindow.h... there's no easy way around diff --git a/widget/form/settingswidget.h b/widget/form/settingswidget.h index c901ce906..6ee45f90d 100644 --- a/widget/form/settingswidget.h +++ b/widget/form/settingswidget.h @@ -19,11 +19,12 @@ #include #include -#include -#include "widget/croppinglabel.h" - -namespace Ui {class MainWindow;} -class QString; +class GenericForm; +class GeneralForm; +class IdentityForm; +class PrivacyForm; +class AVForm; +namespace Ui {class MainWindow;}; class SettingsWidget : public QWidget { @@ -33,30 +34,38 @@ public: ~SettingsWidget(); void show(Ui::MainWindow &ui); + + QWidget *head, *body; // keep the others private public slots: //void setFriendAddress(const QString& friendAddress); private slots: + void onGeneralClicked(); + void onIdentityClicked(); + void onPrivacyClicked(); + void onAVClicked(); private: - QWidget *_main, *main, *head, *foot; - // _main consists of main+foot - QVBoxLayout *_mainLayout; + QWidget *main, *foot; + // main consists of body+foot for Ui::MainWindow + QVBoxLayout *mainLayout; + + GenericForm* active; + GeneralForm* generalForm; + IdentityForm* identityForm; + PrivacyForm* privacyForm; + AVForm* avForm; + void hideSettingsForms(); + + // the code pertaining to the icons is mostly copied from ui_mainwindow.h QHBoxLayout *iconsLayout; QPushButton *generalButton; QPushButton *identityButton; QPushButton *privacyButton; QPushButton *avButton; - - // now the actual pages and stuff - // ... - - - void prepButtons(); // just so I can move the crap to the bottom of the file -public: }; -#endif // SETTINGSFORM_H +#endif // SETTINGSWIDGET_H From 575862f25f1b0f5b18ff4c2698c572a590d26277 Mon Sep 17 00:00:00 2001 From: dubslow Date: Mon, 15 Sep 2014 08:31:42 -0500 Subject: [PATCH 29/30] cosmetics --- widget/form/settings/avform.cpp | 2 ++ widget/form/settings/generalform.cpp | 2 ++ widget/form/settings/genericsettings.h | 8 +++++++- widget/form/settings/identityform.cpp | 2 ++ widget/form/settings/privacyform.cpp | 2 ++ widget/form/settingswidget.cpp | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/widget/form/settings/avform.cpp b/widget/form/settings/avform.cpp index 347a1cfbb..5c0b38da3 100644 --- a/widget/form/settings/avform.cpp +++ b/widget/form/settings/avform.cpp @@ -19,6 +19,8 @@ AVForm::AVForm() { prep(); + icon.addFile(":/img/settings/av.png"); + label.setText(tr("Audio/Video settings")); } AVForm::~AVForm() diff --git a/widget/form/settings/generalform.cpp b/widget/form/settings/generalform.cpp index 050d4f7eb..a9810c1ae 100644 --- a/widget/form/settings/generalform.cpp +++ b/widget/form/settings/generalform.cpp @@ -20,6 +20,8 @@ GeneralForm::GeneralForm() { prep(); + icon.addFile(":/img/settings/general.png"); + label.setText(tr("General settings")); group = new QGroupBox(tr("General Settings")); enableIPv6 = new QCheckBox(); enableIPv6->setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6")); diff --git a/widget/form/settings/genericsettings.h b/widget/form/settings/genericsettings.h index 9353d21df..94f8fe90f 100644 --- a/widget/form/settings/genericsettings.h +++ b/widget/form/settings/genericsettings.h @@ -34,13 +34,19 @@ public: } protected: - QVBoxLayout layout, headLayout; + QVBoxLayout layout; + QHBoxLayout headLayout; + QIcon icon; + QLabel label; QWidget head, body; void prep() // call in subclass constructor { head.setLayout(&headLayout); + headLayout.addWidget(&icon); + headLayout.addWidget(&label); body.setLayout(&layout); } + }; #endif diff --git a/widget/form/settings/identityform.cpp b/widget/form/settings/identityform.cpp index dbd5574c5..ac89257a9 100644 --- a/widget/form/settings/identityform.cpp +++ b/widget/form/settings/identityform.cpp @@ -22,6 +22,8 @@ IdentityForm::IdentityForm() { prep(); + icon.addFile(":/img/settings/identity.png"); + label.setText(tr("Your identity")); toxGroup = new QGroupBox(tr("Tox ID")); QLabel* toxIdLabel = new QLabel(tr("Your Tox ID")); QLineEdit* toxID = new QLineEdit(); diff --git a/widget/form/settings/privacyform.cpp b/widget/form/settings/privacyform.cpp index 856f64954..ef7c54c4b 100644 --- a/widget/form/settings/privacyform.cpp +++ b/widget/form/settings/privacyform.cpp @@ -20,6 +20,8 @@ PrivacyForm::PrivacyForm() { prep(); + icon.addFile(":/img/settings/privacy.png"); + label.setText(tr("Privacy settings")); } PrivacyForm::~PrivacyForm() diff --git a/widget/form/settingswidget.cpp b/widget/form/settingswidget.cpp index 3a13c1cdb..9b5dc7856 100644 --- a/widget/form/settingswidget.cpp +++ b/widget/form/settingswidget.cpp @@ -110,7 +110,7 @@ void SettingsWidget::prepButtons() // just straight up copying it like this... oh well // the layout/icons obviously need to be improved, but it's a working model, // not a pretty one - QSizePolicy sizePolicy3(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + QSizePolicy sizePolicy3(QSizePolicy::Fixed, QSizePolicy::Fixed); sizePolicy3.setHorizontalStretch(0); sizePolicy3.setVerticalStretch(0); foot->setObjectName(QStringLiteral("foot")); From 9d36833a8ba0aea01bd0d615ff1e19cf2b62b81a Mon Sep 17 00:00:00 2001 From: dubslow Date: Mon, 15 Sep 2014 08:48:17 -0500 Subject: [PATCH 30/30] scaling still isn't quite right... --- widget/form/settings/avform.cpp | 2 +- widget/form/settings/generalform.cpp | 2 +- widget/form/settings/genericsettings.h | 4 ++-- widget/form/settings/identityform.cpp | 2 +- widget/form/settings/privacyform.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/widget/form/settings/avform.cpp b/widget/form/settings/avform.cpp index 5c0b38da3..e0b0773f9 100644 --- a/widget/form/settings/avform.cpp +++ b/widget/form/settings/avform.cpp @@ -19,7 +19,7 @@ AVForm::AVForm() { prep(); - icon.addFile(":/img/settings/av.png"); + icon.setPixmap(QPixmap(":/img/settings/av.png").scaledToHeight(headLayout.sizeHint().height(), Qt::SmoothTransformation)); label.setText(tr("Audio/Video settings")); } diff --git a/widget/form/settings/generalform.cpp b/widget/form/settings/generalform.cpp index a9810c1ae..7a6734383 100644 --- a/widget/form/settings/generalform.cpp +++ b/widget/form/settings/generalform.cpp @@ -20,7 +20,7 @@ GeneralForm::GeneralForm() { prep(); - icon.addFile(":/img/settings/general.png"); + icon.setPixmap(QPixmap(":/img/settings/general.png").scaledToHeight(headLayout.sizeHint().height(), Qt::SmoothTransformation)); label.setText(tr("General settings")); group = new QGroupBox(tr("General Settings")); enableIPv6 = new QCheckBox(); diff --git a/widget/form/settings/genericsettings.h b/widget/form/settings/genericsettings.h index 94f8fe90f..760d39cb0 100644 --- a/widget/form/settings/genericsettings.h +++ b/widget/form/settings/genericsettings.h @@ -19,6 +19,7 @@ #include #include +#include #include "widget/form/settingswidget.h" class GenericForm : public QObject @@ -36,8 +37,7 @@ public: protected: QVBoxLayout layout; QHBoxLayout headLayout; - QIcon icon; - QLabel label; + QLabel label, icon; QWidget head, body; void prep() // call in subclass constructor { diff --git a/widget/form/settings/identityform.cpp b/widget/form/settings/identityform.cpp index ac89257a9..696b2141a 100644 --- a/widget/form/settings/identityform.cpp +++ b/widget/form/settings/identityform.cpp @@ -22,7 +22,7 @@ IdentityForm::IdentityForm() { prep(); - icon.addFile(":/img/settings/identity.png"); + icon.setPixmap(QPixmap(":/img/settings/identity.png").scaledToHeight(headLayout.sizeHint().height(), Qt::SmoothTransformation)); label.setText(tr("Your identity")); toxGroup = new QGroupBox(tr("Tox ID")); QLabel* toxIdLabel = new QLabel(tr("Your Tox ID")); diff --git a/widget/form/settings/privacyform.cpp b/widget/form/settings/privacyform.cpp index ef7c54c4b..e1f737975 100644 --- a/widget/form/settings/privacyform.cpp +++ b/widget/form/settings/privacyform.cpp @@ -20,7 +20,7 @@ PrivacyForm::PrivacyForm() { prep(); - icon.addFile(":/img/settings/privacy.png"); + icon.setPixmap(QPixmap(":/img/settings/privacy.png").scaledToHeight(headLayout.sizeHint().height(), Qt::SmoothTransformation)); label.setText(tr("Privacy settings")); }