summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-09-15 10:06:15 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-09-15 10:06:15 (GMT)
commit13c1ef651158d8bdbd459ebea461c23c89699abd (patch)
treeb453d0f28ebd14560829cbe8283ed12cb488af34 /Swift/Controllers/ChatControllerBase.cpp
parentc557a9771c99012624e104e5bc71aeb93f38a8bf (diff)
downloadswift-contrib-13c1ef651158d8bdbd459ebea461c23c89699abd.zip
swift-contrib-13c1ef651158d8bdbd459ebea461c23c89699abd.tar.bz2
Completely untested. Rewiring the MainController for Client to be reconnectable (won't compile).
Diffstat (limited to 'Swift/Controllers/ChatControllerBase.cpp')
-rw-r--r--Swift/Controllers/ChatControllerBase.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Swift/Controllers/ChatControllerBase.cpp b/Swift/Controllers/ChatControllerBase.cpp
index 519b019..7d11401 100644
--- a/Swift/Controllers/ChatControllerBase.cpp
+++ b/Swift/Controllers/ChatControllerBase.cpp
@@ -23,12 +23,11 @@ ChatControllerBase::~ChatControllerBase() {
}
void ChatControllerBase::setEnabled(bool enabled) {
- //FIXME: implement
- h
+ chatWindow_->setInputEnabled(enabled);
}
void ChatControllerBase::setAvailableServerFeatures(boost::shared_ptr<DiscoInfo> info) {
- if (info->hasFeature(DiscoInfo::SecurityLabels)) {
+ if (iqRouter_->isAvailable() && info->hasFeature(DiscoInfo::SecurityLabels)) {
chatWindow_->setSecurityLabelsEnabled(true);
chatWindow_->setSecurityLabelsError();
boost::shared_ptr<GetSecurityLabelsCatalogRequest> request(new GetSecurityLabelsCatalogRequest(JID(toJID_.toBare()), iqRouter_));
@@ -50,7 +49,7 @@ void ChatControllerBase::handleAllMessagesRead() {
}
void ChatControllerBase::handleSendMessageRequest(const String &body) {
- if (body.isEmpty()) {
+ if (!stanzaChannel_->isAvailable() || body.isEmpty()) {
return;
}
boost::shared_ptr<Message> message(new Message());