mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branches 'pr1030' and 'pr1032'
This commit is contained in:
commit
89544c5d16
@ -136,7 +136,9 @@ void Settings::load()
|
||||
currentProfile = s.value("currentProfile", "").toString();
|
||||
autoAwayTime = s.value("autoAwayTime", 10).toInt();
|
||||
checkUpdates = s.value("checkUpdates", false).toBool();
|
||||
showWindow = s.value("showWindow", true).toBool();
|
||||
showInFront = s.value("showInFront", false).toBool();
|
||||
groupAlwaysNotify = s.value("groupAlwaysNotify", false).toBool();
|
||||
fauxOfflineMessaging = s.value("fauxOfflineMessaging", true).toBool();
|
||||
autoSaveEnabled = s.value("autoSaveEnabled", false).toBool();
|
||||
globalAutoAcceptDir = s.value("globalAutoAcceptDir",
|
||||
@ -290,7 +292,9 @@ void Settings::save(QString path, bool writeFriends)
|
||||
s.setValue("currentProfile", currentProfile);
|
||||
s.setValue("autoAwayTime", autoAwayTime);
|
||||
s.setValue("checkUpdates", checkUpdates);
|
||||
s.setValue("showWindow", showWindow);
|
||||
s.setValue("showInFront", showInFront);
|
||||
s.setValue("groupAlwaysNotify", groupAlwaysNotify);
|
||||
s.setValue("fauxOfflineMessaging", fauxOfflineMessaging);
|
||||
s.setValue("compactLayout", compactLayout);
|
||||
s.setValue("autoSaveEnabled", autoSaveEnabled);
|
||||
@ -563,7 +567,17 @@ bool Settings::getShowInFront() const
|
||||
|
||||
void Settings::setShowInFront(bool newValue)
|
||||
{
|
||||
showInFront = newValue;
|
||||
showInFront = newValue;
|
||||
}
|
||||
|
||||
bool Settings::getGroupAlwaysNotify() const
|
||||
{
|
||||
return groupAlwaysNotify;
|
||||
}
|
||||
|
||||
void Settings::setGroupAlwaysNotify(bool newValue)
|
||||
{
|
||||
groupAlwaysNotify = newValue;
|
||||
}
|
||||
|
||||
QString Settings::getTranslation() const
|
||||
@ -856,6 +870,16 @@ void Settings::setCheckUpdates(bool newValue)
|
||||
checkUpdates = newValue;
|
||||
}
|
||||
|
||||
bool Settings::getShowWindow() const
|
||||
{
|
||||
return showWindow;
|
||||
}
|
||||
|
||||
void Settings::setShowWindow(bool newValue)
|
||||
{
|
||||
showWindow = newValue;
|
||||
}
|
||||
|
||||
QByteArray Settings::getSplitterState() const
|
||||
{
|
||||
return splitterState;
|
||||
|
@ -115,9 +115,15 @@ public:
|
||||
bool getCheckUpdates() const;
|
||||
void setCheckUpdates(bool newValue);
|
||||
|
||||
bool getShowWindow() const;
|
||||
void setShowWindow(bool newValue);
|
||||
|
||||
bool getShowInFront() const;
|
||||
void setShowInFront(bool newValue);
|
||||
|
||||
bool getGroupAlwaysNotify() const;
|
||||
void setGroupAlwaysNotify(bool newValue);
|
||||
|
||||
QPixmap getSavedAvatar(const QString& ownerId);
|
||||
void saveAvatar(QPixmap& pic, const QString& ownerId);
|
||||
|
||||
@ -259,7 +265,9 @@ private:
|
||||
bool lightTrayIcon;
|
||||
bool useEmoticons;
|
||||
bool checkUpdates;
|
||||
bool showWindow;
|
||||
bool showInFront;
|
||||
bool groupAlwaysNotify;
|
||||
|
||||
bool forceTCP;
|
||||
|
||||
|
@ -30,6 +30,7 @@ AdvancedForm::AdvancedForm() :
|
||||
bodyUI->dbLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||
bodyUI->dbLabel->setOpenExternalLinks(true);
|
||||
|
||||
bodyUI->cbMakeToxPortable->setChecked(Settings::getInstance().getMakeToxPortable());
|
||||
bodyUI->syncTypeComboBox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
|
||||
bodyUI->syncTypeComboBox->addItems({tr("FULL - very safe, slowest (recommended)"),
|
||||
tr("NORMAL - almost as safe as FULL, about 20% faster than FULL"),
|
||||
@ -38,6 +39,7 @@ AdvancedForm::AdvancedForm() :
|
||||
int index = 2 - static_cast<int>(Settings::getInstance().getDbSyncType());
|
||||
bodyUI->syncTypeComboBox->setCurrentIndex(index);
|
||||
|
||||
connect(bodyUI->cbMakeToxPortable, &QCheckBox::stateChanged, this, &AdvancedForm::onMakeToxPortableUpdated);
|
||||
connect(bodyUI->syncTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onDbSyncTypeUpdated()));
|
||||
connect(bodyUI->resetButton, SIGNAL(clicked()), this, SLOT(resetToDefault()));
|
||||
}
|
||||
@ -47,6 +49,11 @@ AdvancedForm::~AdvancedForm()
|
||||
delete bodyUI;
|
||||
}
|
||||
|
||||
void AdvancedForm::onMakeToxPortableUpdated()
|
||||
{
|
||||
Settings::getInstance().setMakeToxPortable(bodyUI->cbMakeToxPortable->isChecked());
|
||||
}
|
||||
|
||||
void AdvancedForm::onDbSyncTypeUpdated()
|
||||
{
|
||||
int index = 2 - bodyUI->syncTypeComboBox->currentIndex();
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
virtual ~AdvancedForm();
|
||||
|
||||
private slots:
|
||||
void onMakeToxPortableUpdated();
|
||||
void onDbSyncTypeUpdated();
|
||||
void resetToDefault();
|
||||
|
||||
|
@ -29,6 +29,16 @@
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbMakeToxPortable">
|
||||
<property name="toolTip">
|
||||
<string extracomment="describes makeToxPortable checkbox">Save settings to the working directory instead of the usual conf dir</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Make Tox portable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="warningLabel">
|
||||
<property name="text">
|
||||
|
@ -45,13 +45,11 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
||||
|
||||
bodyUI->checkUpdates->setVisible(AUTOUPDATE_ENABLED);
|
||||
bodyUI->checkUpdates->setChecked(Settings::getInstance().getCheckUpdates());
|
||||
bodyUI->trayBehavior->addStretch();
|
||||
|
||||
bodyUI->cbEnableIPv6->setChecked(Settings::getInstance().getEnableIPv6());
|
||||
for (int i = 0; i < langs.size(); i++)
|
||||
bodyUI->transComboBox->insertItem(i, langs[i]);
|
||||
bodyUI->transComboBox->setCurrentIndex(locales.indexOf(Settings::getInstance().getTranslation()));
|
||||
bodyUI->cbMakeToxPortable->setChecked(Settings::getInstance().getMakeToxPortable());
|
||||
|
||||
bool showSystemTray = Settings::getInstance().getShowSystemTray();
|
||||
|
||||
@ -68,7 +66,9 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
||||
bodyUI->useEmoticons->setChecked(Settings::getInstance().getUseEmoticons());
|
||||
bodyUI->autoacceptFiles->setChecked(Settings::getInstance().getAutoSaveEnabled());
|
||||
bodyUI->autoSaveFilesDir->setText(Settings::getInstance().getGlobalAutoAcceptDir());
|
||||
bodyUI->showWindow->setChecked(Settings::getInstance().getShowWindow());
|
||||
bodyUI->showInFront->setChecked(Settings::getInstance().getShowInFront());
|
||||
bodyUI->groupAlwaysNotify->setChecked(Settings::getInstance().getGroupAlwaysNotify());
|
||||
bodyUI->cbFauxOfflineMessaging->setChecked(Settings::getInstance().getFauxOfflineMessaging());
|
||||
bodyUI->cbCompactLayout->setChecked(Settings::getInstance().getCompactLayout());
|
||||
|
||||
@ -118,7 +118,6 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
||||
//general
|
||||
connect(bodyUI->checkUpdates, &QCheckBox::stateChanged, this, &GeneralForm::onCheckUpdateChanged);
|
||||
connect(bodyUI->transComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onTranslationUpdated()));
|
||||
connect(bodyUI->cbMakeToxPortable, &QCheckBox::stateChanged, this, &GeneralForm::onMakeToxPortableUpdated);
|
||||
connect(bodyUI->showSystemTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowSystemTray);
|
||||
connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray);
|
||||
connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray);
|
||||
@ -126,7 +125,9 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
||||
connect(bodyUI->lightTrayIcon, &QCheckBox::stateChanged, this, &GeneralForm::onSetLightTrayIcon);
|
||||
connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange);
|
||||
connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged()));
|
||||
connect(bodyUI->showWindow, &QCheckBox::stateChanged, this, &GeneralForm::onShowWindowChanged);
|
||||
connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront);
|
||||
connect(bodyUI->groupAlwaysNotify, &QCheckBox::stateChanged, this, &GeneralForm::onSetGroupAlwaysNotify);
|
||||
connect(bodyUI->autoacceptFiles, &QCheckBox::stateChanged, this, &GeneralForm::onAutoAcceptFileChange);
|
||||
if (bodyUI->autoacceptFiles->isChecked())
|
||||
connect(bodyUI->autoSaveFilesDir, SIGNAL(clicked()), this, SLOT(onAutoSaveDirChange()));
|
||||
@ -169,11 +170,6 @@ void GeneralForm::onTranslationUpdated()
|
||||
Widget::getInstance()->setTranslation();
|
||||
}
|
||||
|
||||
void GeneralForm::onMakeToxPortableUpdated()
|
||||
{
|
||||
Settings::getInstance().setMakeToxPortable(bodyUI->cbMakeToxPortable->isChecked());
|
||||
}
|
||||
|
||||
void GeneralForm::onSetShowSystemTray()
|
||||
{
|
||||
Settings::getInstance().setShowSystemTray(bodyUI->showSystemTray->isChecked());
|
||||
@ -332,9 +328,19 @@ void GeneralForm::onCheckUpdateChanged()
|
||||
Settings::getInstance().setCheckUpdates(bodyUI->checkUpdates->isChecked());
|
||||
}
|
||||
|
||||
void GeneralForm::onShowWindowChanged()
|
||||
{
|
||||
Settings::getInstance().setShowWindow(bodyUI->showWindow->isChecked());
|
||||
}
|
||||
|
||||
void GeneralForm::onSetShowInFront()
|
||||
{
|
||||
Settings::getInstance().setShowInFront(bodyUI->showInFront->isChecked());
|
||||
Settings::getInstance().setShowInFront(bodyUI->showInFront->isChecked());
|
||||
}
|
||||
|
||||
void GeneralForm::onSetGroupAlwaysNotify()
|
||||
{
|
||||
Settings::getInstance().setGroupAlwaysNotify(bodyUI->groupAlwaysNotify->isChecked());
|
||||
}
|
||||
|
||||
void GeneralForm::onFauxOfflineMessaging()
|
||||
|
@ -33,7 +33,6 @@ public:
|
||||
private slots:
|
||||
void onEnableIPv6Updated();
|
||||
void onTranslationUpdated();
|
||||
void onMakeToxPortableUpdated();
|
||||
void onSetShowSystemTray();
|
||||
void onSetAutostartInTray();
|
||||
void onSetCloseToTray();
|
||||
@ -54,7 +53,9 @@ private slots:
|
||||
void onAutoAcceptFileChange();
|
||||
void onAutoSaveDirChange();
|
||||
void onCheckUpdateChanged();
|
||||
void onShowWindowChanged();
|
||||
void onSetShowInFront();
|
||||
void onSetGroupAlwaysNotify();
|
||||
void onFauxOfflineMessaging();
|
||||
void onCompactLayout();
|
||||
void onThemeColorChanged(int);
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>545</width>
|
||||
<width>573</width>
|
||||
<height>644</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -34,16 +34,16 @@
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-173</y>
|
||||
<width>511</width>
|
||||
<height>797</height>
|
||||
<y>0</y>
|
||||
<width>540</width>
|
||||
<height>779</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
</property>
|
||||
@ -57,14 +57,14 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="transLayout">
|
||||
<layout class="QHBoxLayout" name="generalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="transLabel">
|
||||
<property name="toolTip">
|
||||
<string>The translation may not load until qTox restarts.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Translation</string>
|
||||
<string>Language:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -81,27 +81,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="generalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbMakeToxPortable">
|
||||
<property name="toolTip">
|
||||
<string extracomment="describes makeToxPortable checkbox">Save settings to the working directory instead of the usual conf dir</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Make Tox portable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="trayGroup">
|
||||
<property name="title">
|
||||
<string>System tray</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="showSystemTray">
|
||||
<property name="text">
|
||||
@ -109,49 +112,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="trayBehavior">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="startInTray">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start in tray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="closeToTray">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close to tray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="minimizeToTray">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Minimize to tray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="lightTrayIcon">
|
||||
<property name="text">
|
||||
@ -159,16 +119,61 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="startInTray">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start in tray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="closeToTray">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close to tray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QCheckBox" name="minimizeToTray">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Minimize to tray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<spacer name="traySpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="statusChanges">
|
||||
<property name="text">
|
||||
<string>Show contacts' status changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkUpdates">
|
||||
<property name="text">
|
||||
@ -177,42 +182,41 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showInFront">
|
||||
<property name="text">
|
||||
<string>Focus qTox when a message is received</string>
|
||||
<layout class="QGridLayout" name="autoLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbFauxOfflineMessaging">
|
||||
<property name="text">
|
||||
<string>Faux offline messaging</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbCompactLayout">
|
||||
<property name="text">
|
||||
<string>Compact contact list (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="QLabel" name="autoAwayLabel">
|
||||
<property name="toolTip">
|
||||
<string>Provided in minutes</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="autoSaveFilesDirLabel">
|
||||
<property name="text">
|
||||
<string>Auto away after (0 to disable)</string>
|
||||
<string>Save to:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="autoacceptFiles">
|
||||
<property name="toolTip">
|
||||
<string comment="autoaccept cb tooltip">You can set this on a per-friend basis by right clicking them.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Autoaccept files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="autoSaveFilesDir">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="autoAwaySpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@ -237,46 +241,99 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="fileLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoacceptFiles">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="autoAwayLabel">
|
||||
<property name="toolTip">
|
||||
<string comment="autoaccept cb tooltip">You can set this on a per-friend basis by right clicking them.</string>
|
||||
<string>Provided in minutes</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Autoaccept files</string>
|
||||
<string>Auto away after (0 to disable):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="chatGroupBox">
|
||||
<property name="title">
|
||||
<string>Chat</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="groupAlwaysNotify">
|
||||
<property name="text">
|
||||
<string>Group chats always notify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="statusChanges">
|
||||
<property name="text">
|
||||
<string>Show contacts' status changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>On new message:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="onMessageLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showWindow">
|
||||
<property name="text">
|
||||
<string>Show window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="saveFilesHLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="autoSaveFilesDirLabel">
|
||||
<property name="text">
|
||||
<string>Save files in</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="autoSaveFilesDir">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QCheckBox" name="showInFront">
|
||||
<property name="text">
|
||||
<string>Focus window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="chatSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="cbFauxOfflineMessaging">
|
||||
<property name="text">
|
||||
<string>Faux offline messaging</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="cbCompactLayout">
|
||||
<property name="text">
|
||||
<string>Compact contact list (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -313,7 +370,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="smileyPackLabel">
|
||||
<property name="text">
|
||||
<string extracomment="Text on smiley pack label">Smiley Pack</string>
|
||||
<string extracomment="Text on smiley pack label">Smiley Pack:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -385,47 +442,13 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="styleLabel">
|
||||
<widget class="QLabel" name="emoticonSizeLabel">
|
||||
<property name="text">
|
||||
<string>Style</string>
|
||||
<string>Emoticon size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="styleBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="themeColorLabel">
|
||||
<property name="text">
|
||||
<string>Theme color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="themeColorCBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="emoticonSizeLabel">
|
||||
<property name="text">
|
||||
<string>Emoticon size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QSpinBox" name="emoticonSize">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@ -450,10 +473,44 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="styleLabel">
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="styleBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="themeColorLabel">
|
||||
<property name="text">
|
||||
<string>Theme color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="themeColorCBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="timestampLabel">
|
||||
<property name="text">
|
||||
<string>Timestamp format</string>
|
||||
<string>Timestamp format:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -485,32 +542,76 @@
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbEnableIPv6">
|
||||
<property name="text">
|
||||
<string extracomment="Text on a checkbox to enable IPv6">Enable IPv6 (recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbEnableUDP">
|
||||
<property name="toolTip">
|
||||
<string extracomment="force tcp checkbox tooltip">Disabling this allows, e.g., toxing over Tor. It adds load to the Tox network however, so uncheck only when necessary.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string extracomment="Text on checkbox to disable UDP">Enable UDP (recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="proxyLayout_2">
|
||||
<layout class="QHBoxLayout" name="coreProtocolLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QCheckBox" name="cbEnableUDP">
|
||||
<property name="toolTip">
|
||||
<string extracomment="force tcp checkbox tooltip">Disabling this allows, e.g., toxing over Tor. It adds load to the Tox network however, so uncheck only when necessary.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Proxy type</string>
|
||||
<string extracomment="Text on checkbox to disable UDP">Enable UDP (recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbEnableIPv6">
|
||||
<property name="text">
|
||||
<string extracomment="Text on a checkbox to enable IPv6">Enable IPv6 (recommended)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="protocolSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="proxyLayout">
|
||||
<item row="2" column="3">
|
||||
<widget class="QSpinBox" name="proxyPort">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="proxyTypeLabel">
|
||||
<property name="text">
|
||||
<string>Proxy type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="proxyAddrLabel">
|
||||
<property name="text">
|
||||
<string extracomment="Text on proxy addr label">Address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="proxyAddr"/>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="proxyPortLabel">
|
||||
<property name="text">
|
||||
<string extracomment="Text on proxy port label">Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="3">
|
||||
<widget class="QComboBox" name="proxyType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
@ -537,40 +638,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="proxyLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="proxyAddrLabel">
|
||||
<property name="text">
|
||||
<string extracomment="Text on proxy addr label">Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="proxyAddr"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="proxyPortLabel">
|
||||
<property name="text">
|
||||
<string extracomment="Text on proxy port label">Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="proxyPort">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="reconnectButton">
|
||||
<property name="text">
|
||||
@ -637,5 +704,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>showWindow</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>showInFront</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>329</x>
|
||||
<y>349</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>451</x>
|
||||
<y>349</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
@ -633,15 +633,15 @@ void Widget::hideMainForms()
|
||||
|
||||
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
|
||||
setUsername(oldUsername); // restore old username until Core tells us to set it
|
||||
core->setUsername(newUsername);
|
||||
}
|
||||
|
||||
void Widget::setUsername(const QString& username)
|
||||
{
|
||||
ui->nameLabel->setText(username);
|
||||
ui->nameLabel->setToolTip(username); // for overlength names
|
||||
ui->nameLabel->setToolTip(username); // for overlength names
|
||||
nameMention = QRegExp("\\b" + QRegExp::escape(username) + "\\b", Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
void Widget::onStatusMessageChanged(const QString& newStatusMessage, const QString& oldStatusMessage)
|
||||
@ -806,25 +806,11 @@ void Widget::onFriendMessageReceived(int friendId, const QString& message, bool
|
||||
QDateTime timestamp = QDateTime::currentDateTime();
|
||||
f->getChatForm()->addMessage(f->getToxID(), message, isAction, timestamp, true);
|
||||
|
||||
if (isAction)
|
||||
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, "/me " + message, f->getToxID().publicKey, timestamp, true);
|
||||
else
|
||||
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, message, f->getToxID().publicKey, timestamp, true);
|
||||
|
||||
if (activeChatroomWidget != nullptr)
|
||||
{
|
||||
if ((static_cast<GenericChatroomWidget*>(f->getFriendWidget()) != activeChatroomWidget) || isMinimized() || !isActiveWindow())
|
||||
{
|
||||
f->setEventFlag(true);
|
||||
newMessageAlert(f->getFriendWidget());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
f->setEventFlag(true);
|
||||
newMessageAlert(f->getFriendWidget());
|
||||
}
|
||||
HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, isAction ? "/me " + message : message,
|
||||
f->getToxID().publicKey, timestamp, true);
|
||||
|
||||
f->setEventFlag(static_cast<GenericChatroomWidget*>(f->getFriendWidget()) != activeChatroomWidget);
|
||||
newMessageAlert(f->getFriendWidget());
|
||||
f->getFriendWidget()->updateStatusLight();
|
||||
}
|
||||
|
||||
@ -839,17 +825,22 @@ void Widget::onReceiptRecieved(int friendId, int receipt)
|
||||
|
||||
void Widget::newMessageAlert(GenericChatroomWidget* chat)
|
||||
{
|
||||
bool inactiveWindow = isMinimized() || !isActiveWindow();
|
||||
if (!inactiveWindow && activeChatroomWidget != nullptr && chat == activeChatroomWidget)
|
||||
return;
|
||||
|
||||
QApplication::alert(this);
|
||||
|
||||
static QFile sndFile(":audio/notification.pcm");
|
||||
if ((isMinimized() || !isActiveWindow()) && Settings::getInstance().getShowInFront())
|
||||
if (Settings::getInstance().getShowWindow())
|
||||
{
|
||||
this->show();
|
||||
showNormal();
|
||||
activateWindow();
|
||||
emit chat->chatroomWidgetClicked(chat);
|
||||
show();
|
||||
if (inactiveWindow && Settings::getInstance().getShowInFront())
|
||||
setWindowState(Qt::WindowActive);
|
||||
}
|
||||
|
||||
static QFile sndFile(":audio/notification.pcm");
|
||||
static QByteArray sndData;
|
||||
|
||||
if (sndData.isEmpty())
|
||||
{
|
||||
sndFile.open(QIODevice::ReadOnly);
|
||||
@ -953,24 +944,21 @@ void Widget::onGroupMessageReceived(int groupnumber, int peernumber, const QStri
|
||||
return;
|
||||
|
||||
ToxID author = Core::getInstance()->getGroupPeerToxID(groupnumber, peernumber);
|
||||
QString name = core->getUsername();
|
||||
|
||||
bool targeted = (!author.isMine()) && message.contains(name, Qt::CaseInsensitive);
|
||||
bool targeted = (!author.isMine()) && message.contains(nameMention);
|
||||
if (targeted && !isAction)
|
||||
g->getChatForm()->addAlertMessage(author, message, QDateTime::currentDateTime());
|
||||
else
|
||||
g->getChatForm()->addMessage(author, message, isAction, QDateTime::currentDateTime(), true);
|
||||
|
||||
if ((static_cast<GenericChatroomWidget*>(g->getGroupWidget()) != activeChatroomWidget) || isMinimized() || !isActiveWindow())
|
||||
{
|
||||
g->setEventFlag(true);
|
||||
if (targeted)
|
||||
{
|
||||
newMessageAlert(g->getGroupWidget());
|
||||
g->setMentionedFlag(true); // useful for highlighting line or desktop notifications
|
||||
}
|
||||
g->getGroupWidget()->updateStatusLight();
|
||||
}
|
||||
g->setEventFlag(static_cast<GenericChatroomWidget*>(g->getGroupWidget()) != activeChatroomWidget);
|
||||
|
||||
if (targeted || Settings::getInstance().getGroupAlwaysNotify())
|
||||
newMessageAlert(g->getGroupWidget());
|
||||
|
||||
if (targeted)
|
||||
g->setMentionedFlag(true); // useful for highlighting line or desktop notifications
|
||||
|
||||
g->getGroupWidget()->updateStatusLight();
|
||||
}
|
||||
|
||||
void Widget::onGroupNamelistChanged(int groupnumber, int peernumber, uint8_t Change)
|
||||
|
@ -171,6 +171,7 @@ private:
|
||||
Status beforeDisconnect = Status::Offline;
|
||||
QTimer* idleTimer;
|
||||
QTranslator* translator;
|
||||
QRegExp nameMention;
|
||||
};
|
||||
|
||||
void toxActivateEventHandler(const QByteArray& data);
|
||||
|
24
translations/de.ts
vendored
24
translations/de.ts
vendored
@ -614,8 +614,8 @@ Alias:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget/form/settings/generalsettings.ui" line="196"/>
|
||||
<source>Compact layout</source>
|
||||
<translation>Kompakte Darstellung</translation>
|
||||
<source>Compact contact list (restart required)</source>
|
||||
<translation>Kompakte Darstellung der Kontaktliste (Neustart benötigt)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget/form/settings/generalsettings.ui" line="198"/>
|
||||
@ -729,9 +729,14 @@ Alias:</translation>
|
||||
<translation>IPv6 aktivieren (empfohlen)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget/form/settings/generalsettings.ui" line="497"/>
|
||||
<source>Use proxy (SOCKS5)</source>
|
||||
<translation>Proxy benutzen (SOCKS5)</translation>
|
||||
<location filename="../src/widget/form/settings/generalsettings.ui" line="509"/>
|
||||
<source>Proxy type</source>
|
||||
<translation>Proxy Typ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget/form/settings/generalsettings.ui" line="523"/>
|
||||
<source>None</source>
|
||||
<translation>Keinen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/widget/form/settings/generalsettings.ui" line="509"/>
|
||||
@ -1366,6 +1371,15 @@ Es wird beim Neustart von qTox installiert.</translation>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Der DNS Eintrag enthält keine gültige TOX ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/toxdns.cpp" line="223"/>
|
||||
<location filename="../src/toxdns.cpp" line="224"/>
|
||||
<source>It appears that qTox has to use the old tox1 protocol.
|
||||
Unfortunately tox1 is not secure. Should it be used anyway?</source>
|
||||
<translation>Es scheint, dass qTox das veraltete tox1-Protokoll nutzen muss.
|
||||
Dieses Protokoll ist nicht sicher.
|
||||
Soll es dennoch genutzt werden?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ToxURIDialog</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user