Fix duration in call.

Hide screenshots button and make it as an option in order to clean UI.
This commit is contained in:
Julien Wadel 2022-10-11 17:55:58 +02:00
parent 5b5a1113c5
commit f4dd022ff9
21 changed files with 120 additions and 20 deletions

View file

@ -551,7 +551,7 @@ Server url ikke konfigureret.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation>Samtalesadresse</translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Klik her: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -551,7 +551,7 @@ Server URL ist nicht konfiguriert.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Klicken Sie hier: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -2528,6 +2528,11 @@ Click here: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation>Always</translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation>Enable screenshots</translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -551,7 +551,7 @@ URL del servidor no configurada.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation>Dirección de la conferencia</translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Haga clic aquí: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -551,7 +551,7 @@ URL du serveur non configurée.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation>Adresse de la réunion</translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation>Toujours</translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -550,7 +550,7 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2510,6 +2510,11 @@ Kattintson ide: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -551,7 +551,7 @@ URL del server non configurato.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation>Indirizzo conferenza</translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Clicca: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation>Sempre</translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -550,7 +550,7 @@
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2510,6 +2510,11 @@
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -552,7 +552,7 @@ Nesukonfigūruotas serverio url.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2536,6 +2536,11 @@ Spustelėkite čia: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -551,7 +551,7 @@ URL do servidor não configurado.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Clique aqui: &lt;a href=&quot;%1&quot;&gt;%1 &lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -552,7 +552,7 @@
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation>Адрес конференции</translation>
</message>
<message>
@ -2536,6 +2536,11 @@
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation>Всегда</translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -551,7 +551,7 @@ Serverwebbadressen är inte konfigurerad.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2523,6 +2523,11 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -550,7 +550,7 @@ Sunucu url&apos;si yapılandırılmadı.</translation>
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2510,6 +2510,11 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation>Her zaman</translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -552,7 +552,7 @@
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2536,6 +2536,11 @@
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -550,7 +550,7 @@
</message>
<message>
<source>icsconferenceAddressTitle</source>
<extracomment>&apos;Meeting address&apos; : Title for the conference address.</extracomment>
<extracomment>&apos;Meeting address&apos; : Title for the meeting address.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
@ -2510,6 +2510,11 @@
<extracomment>&apos;Always&apos; : auto download mode description for activated feature without any constraints.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>callScreenshotEnabledLabel</source>
<extracomment>&apos;Enable screenshots&apos; : Label on switch to choose if we can take screenshots while being in call.</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsLdap</name>

View file

@ -104,7 +104,7 @@ QDateTime ConferenceModel::getStartDate() const{
}
qint64 ConferenceModel::getElapsedSeconds() const {
return getStartDate().secsTo(QDateTime::currentDateTime());
return mConference->getDuration();
}
ParticipantModel* ConferenceModel::getLocalParticipant() const{

View file

@ -866,7 +866,16 @@ void SettingsModel::setWaitRegistrationForCall(const bool& status){
mConfig->setInt(UiSection, "call_wait_registration", status);
emit waitRegistrationForCallChanged(status);
}
bool SettingsModel::getIncallScreenshotEnabled() const{
return !!mConfig->getInt(UiSection, "show_take_screenshot_button_in_call", 0);
}
void SettingsModel::setIncallScreenshotEnabled(const bool& status){
mConfig->setInt(UiSection, "show_take_screenshot_button_in_call", status);
emit incallScreenshotEnabledChanged(status);
}
// -----------------------------------------------------------------------------
bool SettingsModel::getConferenceEnabled () const {

View file

@ -128,6 +128,7 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool waitRegistrationForCall READ getWaitRegistrationForCall WRITE setWaitRegistrationForCall NOTIFY waitRegistrationForCallChanged)// Allow call only if the current proxy has been registered
Q_PROPERTY(bool incallScreenshotEnabled READ getIncallScreenshotEnabled WRITE setIncallScreenshotEnabled NOTIFY incallScreenshotEnabledChanged)
Q_PROPERTY(bool conferenceEnabled READ getConferenceEnabled WRITE setConferenceEnabled NOTIFY conferenceEnabledChanged)
Q_PROPERTY(bool videoConferenceEnabled READ getVideoConferenceEnabled NOTIFY videoConferenceEnabledChanged)
@ -429,7 +430,10 @@ public:
void setHideEmptyChatRooms(const bool& data);
bool getWaitRegistrationForCall() const;
void setWaitRegistrationForCall(const bool& data);
void setWaitRegistrationForCall(const bool& status);
bool getIncallScreenshotEnabled() const;
void setIncallScreenshotEnabled(const bool& status);
bool getGroupChatEnabled()const;
@ -716,6 +720,7 @@ signals:
void groupChatEnabledChanged();
void hideEmptyChatRoomsChanged (bool status);
void waitRegistrationForCallChanged (bool status);
void incallScreenshotEnabledChanged(bool status);
void conferenceEnabledChanged (bool status);
void videoConferenceEnabledChanged ();

View file

@ -269,7 +269,7 @@ Rectangle {
isCustom: true
backgroundRadius: width/2
colorSet: IncallStyle.buttons.screenshot
visible: mainItem.callModel.snapshotEnabled && mainItem.isReady
visible: SettingsModel.incallScreenshotEnabled && mainItem.isReady && mainItem.callModel && mainItem.callModel.snapshotEnabled
onClicked: mainItem.callModel.takeSnapshot()
//: 'Take Snapshot' : Tooltip for takking snapshot.
tooltipText: qsTr('incallSnapshotTooltip')

View file

@ -236,7 +236,7 @@ Window {
isCustom: true
backgroundRadius: width/2
colorSet: IncallStyle.buttons.screenshot
visible: conference.callModel && conference.callModel.snapshotEnabled
visible: SettingsModel.incallScreenshotEnabled && conference.callModel && conference.callModel.snapshotEnabled
onClicked: conference.callModel && conference.callModel.takeSnapshot()
//: 'Take Snapshot' : Tooltip for takking snapshot.
tooltipText: qsTr('incallSnapshotTooltip')

View file

@ -203,7 +203,18 @@ TabContainer {
onClicked: SettingsModel.automaticallyRecordCalls = !checked
}
}
}
FormLine {
FormGroup {
//: 'Enable screenshots' : Label on switch to choose if we can take screenshots while being in call.
label: qsTr('callScreenshotEnabledLabel')
Switch {
checked: SettingsModel.incallScreenshotEnabled
onClicked: SettingsModel.incallScreenshotEnabled = !checked
}
}
}
}