summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-04-04 11:55:11 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-04-04 11:55:11 (GMT)
commitf1675c651a08c294447389176262ab890cc6e7b5 (patch)
tree5371b7db58ac31b22b747822b224db3565442084 /Swift/Controllers/RosterController.cpp
parent03a5a0a4a6c7504acead164dc8334c36da86a888 (diff)
downloadswift-f1675c651a08c294447389176262ab890cc6e7b5.zip
swift-f1675c651a08c294447389176262ab890cc6e7b5.tar.bz2
Add 'remove' context menu item for rosters (not implemented).
Diffstat (limited to 'Swift/Controllers/RosterController.cpp')
-rw-r--r--Swift/Controllers/RosterController.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Swift/Controllers/RosterController.cpp b/Swift/Controllers/RosterController.cpp
index 888d324..f05bc9f 100644
--- a/Swift/Controllers/RosterController.cpp
+++ b/Swift/Controllers/RosterController.cpp
@@ -19,6 +19,7 @@
#include "Swiften/Roster/TreeWidgetFactory.h"
#include "Swiften/Roster/XMPPRoster.h"
#include "Swift/Controllers/UIEvents/AddContactUIEvent.h"
+#include "Swift/Controllers/UIEvents/RemoveItemRosterAction.h"
namespace Swift {
@@ -96,6 +97,15 @@ void RosterController::handleUserAction(boost::shared_ptr<UserRosterAction> acti
ContactRosterItem *contactItem = dynamic_cast<ContactRosterItem*>(chatAction->getRosterItem());
assert(contactItem);
onStartChatRequest(contactItem->getJID().toBare());
+ return;
+ }
+
+ boost::shared_ptr<RemoveItemRosterAction> removeAction = boost::dynamic_pointer_cast<RemoveItemRosterAction>(action);
+ if (removeAction.get() != NULL) {
+ ContactRosterItem *contactItem = dynamic_cast<ContactRosterItem*>(chatAction->getRosterItem());
+ assert(contactItem);
+ //FIXME: remove it
+ return;
}
}
@@ -142,6 +152,7 @@ void RosterController::handleOnJIDUpdated(const JID& jid, const String& oldName,
void RosterController::handleUIEvent(boost::shared_ptr<UIEvent> event) {
boost::shared_ptr<AddContactUIEvent> addContactEvent = boost::dynamic_pointer_cast<AddContactUIEvent>(event);
if (addContactEvent) {
+
presenceOracle_->requestSubscription(addContactEvent->getJID());
}
}