Commit 55ee263e authored by Emmanuel Lepage's avatar Emmanuel Lepage

Fix "same as local" account setting, fix IP2IP LED color

parent 59951e2d
...@@ -32,7 +32,7 @@ void AccountView::initItemWidget() ...@@ -32,7 +32,7 @@ void AccountView::initItemWidget()
if(isNew() || !enabled) if(isNew() || !enabled)
itemWidget->setState(AccountItemWidget::Unregistered); itemWidget->setState(AccountItemWidget::Unregistered);
else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED) else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED || getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_READY)
itemWidget->setState(AccountItemWidget::Registered); itemWidget->setState(AccountItemWidget::Registered);
else else
itemWidget->setState(AccountItemWidget::NotWorking); itemWidget->setState(AccountItemWidget::NotWorking);
...@@ -53,7 +53,7 @@ QColor AccountView::getStateColor() ...@@ -53,7 +53,7 @@ QColor AccountView::getStateColor()
{ {
if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED) if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED)
return Qt::black; return Qt::black;
if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED) if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED || getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_READY)
return Qt::darkGreen; return Qt::darkGreen;
return Qt::red; return Qt::red;
} }
...@@ -63,7 +63,7 @@ QString AccountView::getStateColorName() ...@@ -63,7 +63,7 @@ QString AccountView::getStateColorName()
{ {
if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED) if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_UNREGISTERED)
return "black"; return "black";
if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED) if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED || getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_READY)
return "darkGreen"; return "darkGreen";
return "red"; return "red";
} }
...@@ -105,7 +105,7 @@ void AccountView::updateState() ...@@ -105,7 +105,7 @@ void AccountView::updateState()
qDebug() << "itemWidget->setState(AccountItemWidget::Unregistered);"; qDebug() << "itemWidget->setState(AccountItemWidget::Unregistered);";
itemWidget->setState(AccountItemWidget::Unregistered); itemWidget->setState(AccountItemWidget::Unregistered);
} }
else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED) { else if(getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_REGISTERED || getAccountDetail(ACCOUNT_STATUS) == ACCOUNT_STATE_READY) {
qDebug() << "itemWidget->setState(AccountItemWidget::Registered);"; qDebug() << "itemWidget->setState(AccountItemWidget::Registered);";
itemWidget->setState(AccountItemWidget::Registered); itemWidget->setState(AccountItemWidget::Registered);
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/ **************************************************************************/
#include "ConfigurationDialog.h" #include "ConfigurationDialog.h"
#include "conf/ConfigurationSkeleton.h" #include "conf/ConfigurationSkeleton.h"
......
This diff is collapsed.
...@@ -150,6 +150,7 @@ private slots: ...@@ -150,6 +150,7 @@ private slots:
void selectCredential(QListWidgetItem* item, QListWidgetItem* previous); void selectCredential(QListWidgetItem* item, QListWidgetItem* previous);
void loadCredentails(QString accountId); void loadCredentails(QString accountId);
void saveCredential(QString accountId); void saveCredential(QString accountId);
void enablePublished();
signals: signals:
......
...@@ -177,6 +177,7 @@ ...@@ -177,6 +177,7 @@
/** Account States */ /** Account States */
#define ACCOUNT_STATE_REGISTERED "REGISTERED" #define ACCOUNT_STATE_REGISTERED "REGISTERED"
#define ACCOUNT_STATE_READY "READY"
#define ACCOUNT_STATE_UNREGISTERED "UNREGISTERED" #define ACCOUNT_STATE_UNREGISTERED "UNREGISTERED"
#define ACCOUNT_STATE_TRYING "TRYING" #define ACCOUNT_STATE_TRYING "TRYING"
#define ACCOUNT_STATE_ERROR "ERROR" #define ACCOUNT_STATE_ERROR "ERROR"
......
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