summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Roster')
-rw-r--r--Swiften/Roster/ContactRosterItem.cpp11
-rw-r--r--Swiften/Roster/GroupRosterItem.h2
-rw-r--r--Swiften/Roster/TreeWidgetItem.h6
3 files changed, 5 insertions, 14 deletions
diff --git a/Swiften/Roster/ContactRosterItem.cpp b/Swiften/Roster/ContactRosterItem.cpp
index 2f2f787..968f7f1 100644
--- a/Swiften/Roster/ContactRosterItem.cpp
+++ b/Swiften/Roster/ContactRosterItem.cpp
@@ -22,16 +22,7 @@ StatusShow::Type ContactRosterItem::getStatusShow() {
void ContactRosterItem::setStatusShow(StatusShow::Type show) {
statusShow_ = show;
- int colour = 0;
- switch (show) {
- case StatusShow::Online: colour = 0x000000;break;
- case StatusShow::Away: colour = 0x336699;break;
- case StatusShow::XA: colour = 0x336699;break;
- case StatusShow::FFC: colour = 0x000000;break;
- case StatusShow::DND: colour = 0x990000;break;
- case StatusShow::None: colour = 0x7F7F7F;break;
- }
- widget_->setTextColor(colour);
+ widget_->setStatusShow(show);
}
void ContactRosterItem::setStatusText(const String& status) {
diff --git a/Swiften/Roster/GroupRosterItem.h b/Swiften/Roster/GroupRosterItem.h
index 4065fdb..2ab59ea 100644
--- a/Swiften/Roster/GroupRosterItem.h
+++ b/Swiften/Roster/GroupRosterItem.h
@@ -18,8 +18,6 @@ class GroupRosterItem : public RosterItem {
widget_ = factory->createTreeWidgetItem(tree);
widget_->setExpanded(true);
widget_->setText(name);
- widget_->setTextColor(0xFFFFFF);
- widget_->setBackgroundColor(0x969696);
}
~GroupRosterItem() {
diff --git a/Swiften/Roster/TreeWidgetItem.h b/Swiften/Roster/TreeWidgetItem.h
index 4e20050..4124546 100644
--- a/Swiften/Roster/TreeWidgetItem.h
+++ b/Swiften/Roster/TreeWidgetItem.h
@@ -3,6 +3,7 @@
#include "Swiften/Base/String.h"
#include "Swiften/Roster/UserRosterAction.h"
+#include "Swiften/Elements/StatusShow.h"
#include <boost/signal.hpp>
#include <boost/shared_ptr.hpp>
@@ -16,8 +17,9 @@ class TreeWidgetItem {
virtual void setStatusText(const String& text) = 0;
virtual void setAvatarPath(const String& path) = 0;
virtual void setExpanded(bool b) = 0;
- virtual void setTextColor(unsigned long color) = 0;
- virtual void setBackgroundColor(unsigned long color) = 0;
+ //virtual void setTextColor(unsigned long color) = 0;
+ virtual void setStatusShow(StatusShow::Type show) = 0;
+ //virtual void setBackgroundColor(unsigned long color) = 0;
boost::signal<void (boost::shared_ptr<UserRosterAction>)> onUserAction;
virtual void show() = 0;
virtual void hide() = 0;