Commit 7ccfee4c authored by Ronan's avatar Ronan

feat(Settings): add an developer option to disable conference

parent 9bcdc70c
......@@ -1214,6 +1214,10 @@ Klicken Sie hier: <a href="%1">%1</a>
<source>chatNotificationSoundLabel</source>
<translation>Benachrichtigungston</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1216,6 +1216,10 @@ your friend&apos;s SIP address or username.</translation>
<source>chatNotificationSoundLabel</source>
<translation>Notification sound</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation>Enable conference</translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1214,6 +1214,10 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>chatNotificationSoundLabel</source>
<translation>Son des notifications</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation>Activer la conférence</translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1211,6 +1211,10 @@
<source>chatNotificationSoundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1216,6 +1216,10 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
<source>chatNotificationSoundLabel</source>
<translation>Pranešimų garsas</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1216,6 +1216,10 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
<source>chatNotificationSoundLabel</source>
<translation>Som de notificação</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1214,6 +1214,10 @@
<source>chatNotificationSoundLabel</source>
<translation>Звук уведомлений</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1213,6 +1213,10 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>chatNotificationSoundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -1216,6 +1216,10 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
<source>chatNotificationSoundLabel</source>
<translation>Bildirim sesi</translation>
</message>
<message>
<source>conferenceEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -199,7 +199,6 @@ void App::initContentApp () {
mEngine = new QQmlApplicationEngine();
// Provide `+custom` folders for custom components and `5.9` for old components.
// TODO: Remove 5.9 support in 6 months. (~ July 2018).
{
QStringList selectors("custom");
const QVersionNumber &version = QLibraryInfo::version();
......
......@@ -303,6 +303,17 @@ void SettingsModel::setChatEnabled (bool status) {
// -----------------------------------------------------------------------------
bool SettingsModel::getConferenceEnabled () const {
return !!mConfig->getInt(UiSection, "conference_enabled", 1);
}
void SettingsModel::setConferenceEnabled (bool status) {
mConfig->setInt(UiSection, "conference_enabled", status);
emit conferenceEnabledChanged(status);
}
// -----------------------------------------------------------------------------
bool SettingsModel::getChatNotificationSoundEnabled () const {
return !!mConfig->getInt(UiSection, "chat_sound_notification_enabled", 1);
}
......
......@@ -73,6 +73,8 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool chatEnabled READ getChatEnabled WRITE setChatEnabled NOTIFY chatEnabledChanged);
Q_PROPERTY(bool conferenceEnabled READ getConferenceEnabled WRITE setConferenceEnabled NOTIFY conferenceEnabledChanged);
Q_PROPERTY(bool chatNotificationSoundEnabled READ getChatNotificationSoundEnabled WRITE setChatNotificationSoundEnabled NOTIFY chatNotificationSoundEnabledChanged);
Q_PROPERTY(QString chatNotificationSoundPath READ getChatNotificationSoundPath WRITE setChatNotificationSoundPath NOTIFY chatNotificationSoundPathChanged);
......@@ -220,6 +222,9 @@ public:
bool getChatEnabled () const;
void setChatEnabled (bool status);
bool getConferenceEnabled () const;
void setConferenceEnabled (bool status);
bool getChatNotificationSoundEnabled () const;
void setChatNotificationSoundEnabled (bool status);
......@@ -380,6 +385,8 @@ signals:
void chatEnabledChanged (bool status);
void conferenceEnabledChanged (bool status);
void chatNotificationSoundEnabledChanged (bool status);
void chatNotificationSoundPathChanged (const QString &path);
......
......@@ -117,6 +117,7 @@ Window {
ActionButton {
icon: 'new_conference'
visible: SettingsModel.conferenceEnabled
onClicked: Logic.openConferenceManager()
}
......
......@@ -133,6 +133,16 @@ TabContainer {
onClicked: SettingsModel.chatEnabled = !checked
}
}
FormGroup {
label: qsTr('conferenceEnabledLabel')
Switch {
checked: SettingsModel.conferenceEnabled
onClicked: SettingsModel.conferenceEnabled = !checked
}
}
}
FormLine {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment