summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-10-04 10:02:23 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-10-04 10:03:16 (GMT)
commit1f4be30a480818458fd841809585681597be831e (patch)
tree2480d96dce7e3e6df88cebbc3c9d82f922b4476b /Swift/QtUI/QtJoinMUCWindow.cpp
parentdc3ddc0d08cc48681e5d16866ef4fcc10819b2a1 (diff)
downloadswift-contrib-1f4be30a480818458fd841809585681597be831e.zip
swift-contrib-1f4be30a480818458fd841809585681597be831e.tar.bz2
Allow both instant and reserved rooms.
Resolves: #1006
Diffstat (limited to 'Swift/QtUI/QtJoinMUCWindow.cpp')
-rw-r--r--Swift/QtUI/QtJoinMUCWindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/QtJoinMUCWindow.cpp b/Swift/QtUI/QtJoinMUCWindow.cpp
index a44cdaf..fec3c4d 100644
--- a/Swift/QtUI/QtJoinMUCWindow.cpp
+++ b/Swift/QtUI/QtJoinMUCWindow.cpp
@@ -18,33 +18,34 @@ QtJoinMUCWindow::QtJoinMUCWindow(UIEventStream* uiEventStream) : uiEventStream(u
ui.room->setPlaceholderText(tr("someroom@rooms.example.com"));
#endif
connect(ui.room, SIGNAL(returnPressed()), this, SLOT(handleJoin()));
connect(ui.searchButton, SIGNAL(clicked()), this, SLOT(handleSearch()));
connect(ui.joinButton, SIGNAL(clicked()), this, SLOT(handleJoin()));
// FIXME: Temporarily set focus on the nickName field first, so that the
// placeholder for the room is visible. This is just because Qt hides
// the placeholder when a widget is focused for some reason.
ui.nickName->setFocus();
+ ui.instantRoom->setChecked(true);
}
void QtJoinMUCWindow::handleJoin() {
if (ui.room->text().isEmpty()) {
// TODO: Error
return;
}
if (ui.nickName->text().isEmpty()) {
// TODO: Error
return;
}
lastSetNick = Q2PSTRING(ui.nickName->text());
JID room(Q2PSTRING(ui.room->text()));
- uiEventStream->send(boost::make_shared<JoinMUCUIEvent>(room, lastSetNick, ui.joinAutomatically->isChecked()));
+ uiEventStream->send(boost::make_shared<JoinMUCUIEvent>(room, lastSetNick, ui.joinAutomatically->isChecked(), !ui.instantRoom->isChecked()));
hide();
}
void QtJoinMUCWindow::handleSearch() {
onSearchMUC();
}
void QtJoinMUCWindow::setNick(const std::string& nick) {
ui.nickName->setText(P2QSTRING(nick));