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

feat(UI): Add UI For controlling group join and leave system messages setting

Backported from 069ab92fd013b915855723f20ac72ad30838d325
This commit is contained in:
Anthony Bilinski 2022-02-14 02:34:30 -08:00
parent 916e797c10
commit 423049db50
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
3 changed files with 15 additions and 0 deletions

View File

@ -144,6 +144,7 @@ GeneralForm::GeneralForm(SettingsWidget* myParent)
bodyUI->closeToTray->setEnabled(showSystemTray);
bodyUI->statusChanges->setChecked(s.getStatusChangeNotificationEnabled());
bodyUI->groupJoinLeaveMessages->setChecked(s.getShowGroupJoinLeaveMessages());
bodyUI->autoAwaySpinBox->setValue(s.getAutoAwayTime());
bodyUI->autoSaveFilesDir->setText(s.getGlobalAutoAcceptDir());
@ -215,6 +216,11 @@ void GeneralForm::on_statusChanges_stateChanged()
Settings::getInstance().setStatusChangeNotificationEnabled(bodyUI->statusChanges->isChecked());
}
void GeneralForm::on_groupJoinLeaveMessages_stateChanged()
{
Settings::getInstance().setShowGroupJoinLeaveMessages(bodyUI->groupJoinLeaveMessages->isChecked());
}
void GeneralForm::on_autoAwaySpinBox_editingFinished()
{
int minutes = bodyUI->autoAwaySpinBox->value();

View File

@ -52,6 +52,7 @@ private slots:
void on_autoAwaySpinBox_editingFinished();
void on_minimizeToTray_stateChanged();
void on_statusChanges_stateChanged();
void on_groupJoinLeaveMessages_stateChanged();
void on_autoacceptFiles_stateChanged();
void on_maxAutoAcceptSizeMB_editingFinished();
void on_autoSaveFilesDir_clicked();

View File

@ -222,6 +222,13 @@ instead of closing itself.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="groupJoinLeaveMessages">
<property name="text">
<string>Add a chat message when a user joins or leaves a group</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -364,6 +371,7 @@ instead of closing itself.</string>
<tabstop>minimizeToTray</tabstop>
<tabstop>closeToTray</tabstop>
<tabstop>statusChanges</tabstop>
<tabstop>groupJoinLeaveMessages</tabstop>
<tabstop>autoAwaySpinBox</tabstop>
<tabstop>autoSaveFilesDir</tabstop>
<tabstop>autoacceptFiles</tabstop>