summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/RosterController.cpp11
-rw-r--r--Swift/Controllers/UIEvents/RemoveItemRosterAction.h15
2 files changed, 26 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());
}
}
diff --git a/Swift/Controllers/UIEvents/RemoveItemRosterAction.h b/Swift/Controllers/UIEvents/RemoveItemRosterAction.h
new file mode 100644
index 0000000..6741bc6
--- /dev/null
+++ b/Swift/Controllers/UIEvents/RemoveItemRosterAction.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "Swiften/Roster/UserRosterAction.h"
+
+namespace Swift {
+class RosterItem;
+class TreeWidgetItem;
+
+class RemoveItemRosterAction : public UserRosterAction {
+ public:
+ virtual ~RemoveItemRosterAction() {};
+
+};
+
+}