Commit 314899ac authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): little fixes on Presence

parent 7339b7e4
...@@ -595,30 +595,19 @@ Url du serveur non configurée.</translation> ...@@ -595,30 +595,19 @@ Url du serveur non configurée.</translation>
<name>Presence</name> <name>Presence</name>
<message> <message>
<source>presenceOnline</source> <source>presenceOnline</source>
<translation type="unfinished">En ligne</translation> <translation>En ligne</translation>
</message> </message>
<message> <message>
<source>presenceBusy</source> <source>presenceBusy</source>
<translation type="unfinished"></translation> <translation>Occupé</translation>
</message> </message>
<message> <message>
<source>presenceDoNotDisturb</source> <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>
<message> <message>
<source>presenceOffline</source> <source>presenceOffline</source>
<translation type="vanished">Hors-ligne</translation> <translation>Hors-ligne</translation>
</message> </message>
</context> </context>
<context> <context>
......
...@@ -63,7 +63,8 @@ QString Presence::getPresenceLevelIconName (const PresenceLevel &level) { ...@@ -63,7 +63,8 @@ QString Presence::getPresenceLevelIconName (const PresenceLevel &level) {
case Red: case Red:
return "led_red"; return "led_red";
case White: case White:
default:
return "led_white"; return "led_white";
default:
return "";
} }
} }
...@@ -57,16 +57,6 @@ void AccountSettingsModel::setUsername (const QString &username) { ...@@ -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 { QString AccountSettingsModel::getSipAddress () const {
return ::Utils::linphoneStringToQString(getDefaultSipAddress()->asStringUriOnly()); return ::Utils::linphoneStringToQString(getDefaultSipAddress()->asStringUriOnly());
} }
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#ifndef ACCOUNT_SETTINGS_MODEL_H_ #ifndef ACCOUNT_SETTINGS_MODEL_H_
#define ACCOUNT_SETTINGS_MODEL_H_ #define ACCOUNT_SETTINGS_MODEL_H_
#include "../presence/Presence.hpp" #include <linphone++/linphone.hh>
#include <QObject> #include <QObject>
// ============================================================================= // =============================================================================
...@@ -36,9 +35,6 @@ class AccountSettingsModel : public QObject { ...@@ -36,9 +35,6 @@ class AccountSettingsModel : public QObject {
Q_PROPERTY(QString sipAddress READ getSipAddress NOTIFY accountUpdated); Q_PROPERTY(QString sipAddress READ getSipAddress NOTIFY accountUpdated);
Q_PROPERTY(QVariantList accounts READ getAccounts 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: public:
AccountSettingsModel (QObject *parent = Q_NULLPTR) : QObject(parent) {} AccountSettingsModel (QObject *parent = Q_NULLPTR) : QObject(parent) {}
...@@ -51,9 +47,6 @@ private: ...@@ -51,9 +47,6 @@ private:
QString getUsername () const; QString getUsername () const;
void setUsername (const QString &username); void setUsername (const QString &username);
Presence::PresenceLevel getPresenceLevel () const;
Presence::PresenceStatus getPresenceStatus () const;
QString getSipAddress () const; QString getSipAddress () const;
QVariantList getAccounts () const; QVariantList getAccounts () const;
......
...@@ -21,7 +21,7 @@ function getSelectedEntryIcon () { ...@@ -21,7 +21,7 @@ function getSelectedEntryIcon () {
) || '' ) || ''
} }
function getEntryIcon () { function getEntryIcon (item) {
var iconRole = comboBox.iconRole var iconRole = comboBox.iconRole
return (iconRole.length && item.flattenedModel[iconRole]) || '' return (iconRole.length && item.flattenedModel[iconRole]) || ''
} }
...@@ -111,7 +111,7 @@ ComboBox { ...@@ -111,7 +111,7 @@ ComboBox {
width: item.width width: item.width
Icon { Icon {
icon: Logic.getEntryIcon() icon: Logic.getEntryIcon(item)
iconSize: ComboBoxStyle.delegate.contentItem.iconSize iconSize: ComboBoxStyle.delegate.contentItem.iconSize
visible: icon.length > 0 visible: icon.length > 0
......
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