mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
feat(app): little fixes on Presence
This commit is contained in:
parent
7339b7e4a8
commit
314899ac0a
6 changed files with 9 additions and 36 deletions
|
|
@ -595,30 +595,19 @@ Url du serveur non configurée.</translation>
|
|||
<name>Presence</name>
|
||||
<message>
|
||||
<source>presenceOnline</source>
|
||||
<translation type="unfinished">En ligne</translation>
|
||||
<translation>En ligne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>presenceBusy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Occupé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>presenceDoNotDisturb</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Ne pas déranger</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>presenceOffline</source>
|
||||
<translation type="unfinished">Hors-ligne</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>PresenceString</name>
|
||||
<message>
|
||||
<source>presenceOnline</source>
|
||||
<translation type="vanished">En ligne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>presenceOffline</source>
|
||||
<translation type="vanished">Hors-ligne</translation>
|
||||
<translation>Hors-ligne</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ QString Presence::getPresenceLevelIconName (const PresenceLevel &level) {
|
|||
case Red:
|
||||
return "led_red";
|
||||
case White:
|
||||
default:
|
||||
return "led_white";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,16 +57,6 @@ void AccountSettingsModel::setUsername (const QString &username) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
Presence::PresenceLevel AccountSettingsModel::getPresenceLevel () const {
|
||||
return Presence::Green;
|
||||
}
|
||||
|
||||
Presence::PresenceStatus AccountSettingsModel::getPresenceStatus () const {
|
||||
return Presence::Online;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
QString AccountSettingsModel::getSipAddress () const {
|
||||
return ::Utils::linphoneStringToQString(getDefaultSipAddress()->asStringUriOnly());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@
|
|||
#ifndef ACCOUNT_SETTINGS_MODEL_H_
|
||||
#define ACCOUNT_SETTINGS_MODEL_H_
|
||||
|
||||
#include "../presence/Presence.hpp"
|
||||
|
||||
#include <linphone++/linphone.hh>
|
||||
#include <QObject>
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -36,9 +35,6 @@ class AccountSettingsModel : public QObject {
|
|||
Q_PROPERTY(QString sipAddress READ getSipAddress NOTIFY accountUpdated);
|
||||
Q_PROPERTY(QVariantList accounts READ getAccounts NOTIFY accountUpdated);
|
||||
|
||||
Q_PROPERTY(Presence::PresenceLevel presenceLevel READ getPresenceLevel CONSTANT);
|
||||
Q_PROPERTY(Presence::PresenceStatus presenceStatus READ getPresenceStatus CONSTANT);
|
||||
|
||||
public:
|
||||
AccountSettingsModel (QObject *parent = Q_NULLPTR) : QObject(parent) {}
|
||||
|
||||
|
|
@ -51,9 +47,6 @@ private:
|
|||
QString getUsername () const;
|
||||
void setUsername (const QString &username);
|
||||
|
||||
Presence::PresenceLevel getPresenceLevel () const;
|
||||
Presence::PresenceStatus getPresenceStatus () const;
|
||||
|
||||
QString getSipAddress () const;
|
||||
QVariantList getAccounts () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function getSelectedEntryIcon () {
|
|||
) || ''
|
||||
}
|
||||
|
||||
function getEntryIcon () {
|
||||
function getEntryIcon (item) {
|
||||
var iconRole = comboBox.iconRole
|
||||
return (iconRole.length && item.flattenedModel[iconRole]) || ''
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ ComboBox {
|
|||
width: item.width
|
||||
|
||||
Icon {
|
||||
icon: Logic.getEntryIcon()
|
||||
icon: Logic.getEntryIcon(item)
|
||||
iconSize: ComboBoxStyle.delegate.contentItem.iconSize
|
||||
|
||||
visible: icon.length > 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue