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

default settings

This commit is contained in:
krepa098 2014-08-01 14:46:28 +02:00
parent 566402a1bf
commit 51ac007baf
3 changed files with 5 additions and 3 deletions

View File

@ -15,6 +15,7 @@
*/
#include "settings.h"
#include "smileypack.h"
#include <QApplication>
#include <QDir>
@ -22,6 +23,7 @@
#include <QSettings>
#include <QStandardPaths>
#include <QDebug>
#include <QList>
const QString Settings::FILENAME = "settings.ini";
bool Settings::makeToxPortable{false};
@ -92,7 +94,7 @@ void Settings::load()
s.beginGroup("GUI");
enableSmoothAnimation = s.value("smoothAnimation", true).toBool();
smileyPack = s.value("smileyPack").toByteArray();
smileyPack = s.value("smileyPack", !SmileyPack::listSmileyPacks().empty() ? SmileyPack::listSmileyPacks()[0].second : "").toString();
customEmojiFont = s.value("customEmojiFont", true).toBool();
emojiFontFamily = s.value("emojiFontFamily", "DejaVu Sans").toString();
emojiFontPointSize = s.value("emojiFontPointSize", QApplication::font().pointSize()).toInt();

View File

@ -28,7 +28,7 @@ class SmileyPack : public QObject
Q_OBJECT
public:
static SmileyPack& getInstance();
static QList<QPair<QString, QString>> listSmileyPacks(const QString& path);
static QList<QPair<QString, QString>> listSmileyPacks(const QString& path = "./smileys");
bool load(const QString &filename);
QString smileyfied(QString msg);

View File

@ -53,7 +53,7 @@ SettingsForm::SettingsForm()
makeToxPortable.setChecked(Settings::getInstance().getMakeToxPortable());
smileyPackLabel.setText(tr("Smiley Pack", "Text on smiley pack label"));
for (auto entry : SmileyPack::listSmileyPacks("./smileys"))
for (auto entry : SmileyPack::listSmileyPacks())
smileyPackBrowser.addItem(entry.first, entry.second);
smileyPackBrowser.setCurrentIndex(smileyPackBrowser.findData(Settings::getInstance().getSmileyPack()));