summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtJoinMUCWindow.cpp4
-rw-r--r--Swift/QtUI/QtJoinMUCWindow.ui12
2 files changed, 14 insertions, 2 deletions
diff --git a/Swift/QtUI/QtJoinMUCWindow.cpp b/Swift/QtUI/QtJoinMUCWindow.cpp
index fec3c4d..14777bd 100644
--- a/Swift/QtUI/QtJoinMUCWindow.cpp
+++ b/Swift/QtUI/QtJoinMUCWindow.cpp
@@ -32,20 +32,21 @@ void QtJoinMUCWindow::handleJoin() {
// TODO: Error
return;
}
if (ui.nickName->text().isEmpty()) {
// TODO: Error
return;
}
lastSetNick = Q2PSTRING(ui.nickName->text());
+ std::string password = Q2PSTRING(ui.password->text());
JID room(Q2PSTRING(ui.room->text()));
- uiEventStream->send(boost::make_shared<JoinMUCUIEvent>(room, lastSetNick, ui.joinAutomatically->isChecked(), !ui.instantRoom->isChecked()));
+ uiEventStream->send(boost::make_shared<JoinMUCUIEvent>(room, password, lastSetNick, ui.joinAutomatically->isChecked(), !ui.instantRoom->isChecked()));
hide();
}
void QtJoinMUCWindow::handleSearch() {
onSearchMUC();
}
void QtJoinMUCWindow::setNick(const std::string& nick) {
ui.nickName->setText(P2QSTRING(nick));
@@ -53,12 +54,13 @@ void QtJoinMUCWindow::setNick(const std::string& nick) {
}
void QtJoinMUCWindow::setMUC(const std::string& nick) {
ui.room->setText(P2QSTRING(nick));
}
void QtJoinMUCWindow::show() {
QWidget::show();
QWidget::activateWindow();
+ ui.password->setText("");
}
}
diff --git a/Swift/QtUI/QtJoinMUCWindow.ui b/Swift/QtUI/QtJoinMUCWindow.ui
index 74fe513..4c4935a 100644
--- a/Swift/QtUI/QtJoinMUCWindow.ui
+++ b/Swift/QtUI/QtJoinMUCWindow.ui
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QtJoinMUCWindow</class>
<widget class="QWidget" name="QtJoinMUCWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>410</width>
- <height>212</height>
+ <height>224</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
@@ -47,18 +47,28 @@
<widget class="QLineEdit" name="nickName"/>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="room">
<property name="text">
<string/>
</property>
</widget>
</item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Password:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="password"/>
+ </item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="instantRoom">
<property name="text">
<string>Automatically configure newly created rooms</string>
</property>
</widget>
</item>