summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/QtUI/QtJoinMUCDialog.cpp38
-rw-r--r--Swift/QtUI/QtJoinMUCDialog.h32
-rw-r--r--Swift/QtUI/QtJoinMUCDialog.ui72
-rw-r--r--Swift/QtUI/QtMainWindow.cpp10
-rw-r--r--Swift/QtUI/QtMainWindow.h4
-rw-r--r--Swift/QtUI/SConscript2
6 files changed, 0 insertions, 158 deletions
diff --git a/Swift/QtUI/QtJoinMUCDialog.cpp b/Swift/QtUI/QtJoinMUCDialog.cpp
deleted file mode 100644
index d459947..0000000
--- a/Swift/QtUI/QtJoinMUCDialog.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#include "QtJoinMUCDialog.h"
-#include "QtSwiftUtil.h"
-
-namespace Swift {
-
-QtJoinMUCDialog::QtJoinMUCDialog(const QString&, const QString&, QWidget* parent) : QDialog(parent) {
- setupUi(this);
- errorLabel_->hide();
- setAttribute(Qt::WA_DeleteOnClose, true);
- connect(buttons_, SIGNAL(accepted()), SLOT(accept()));
- connect(buttons_, SIGNAL(rejected()), SLOT(reject()));
-}
-
-void QtJoinMUCDialog::accept() {
- if (mucJID_->displayText().isEmpty()) {
- showError("You must specify a room to join.");
- return;
- }
- if (nick_->displayText().isEmpty()) {
- showError("You must specify a nickname to join a room.");
- return;
- }
- errorLabel_->hide();
- emit onJoinCommand(JID(Q2PSTRING(mucJID_->displayText())), nick_->displayText());
- QDialog::accept();
-}
-
-void QtJoinMUCDialog::showError(const QString& error) {
- errorLabel_->setText(QString("<font color='red'>%1</font>").arg(error));
- errorLabel_->show();
-}
-}
diff --git a/Swift/QtUI/QtJoinMUCDialog.h b/Swift/QtUI/QtJoinMUCDialog.h
deleted file mode 100644
index 99df46d..0000000
--- a/Swift/QtUI/QtJoinMUCDialog.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
- */
-
-#ifndef SWIFT_QtJoinMUCDialog_H
-#define SWIFT_QtJoinMUCDialog_H
-
-#include "ui_QtJoinMUCDialog.h"
-#include "Swiften/JID/JID.h"
-
-#include <QDialog>
-
-namespace Swift {
-
-class QtJoinMUCDialog : public QDialog, private Ui::QtJoinMUCDialog {
- Q_OBJECT
-
- public:
- QtJoinMUCDialog(const QString& muc, const QString& nick, QWidget* parent);
- signals:
- void onJoinCommand(const JID& muc, const QString& nick);
- public slots:
- void accept();
- private:
- void showError(const QString& error);
-};
-
-}
-
-#endif
diff --git a/Swift/QtUI/QtJoinMUCDialog.ui b/Swift/QtUI/QtJoinMUCDialog.ui
deleted file mode 100644
index 881d4c5..0000000
--- a/Swift/QtUI/QtJoinMUCDialog.ui
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>QtJoinMUCDialog</class>
- <widget class="QDialog" name="QtJoinMUCDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>232</width>
- <height>110</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Join Room</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Room</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="mucJID_"/>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Nickname</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="nick_"/>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLabel" name="errorLabel_">
- <property name="text">
- <string/>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttons_">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- <property name="centerButtons">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index 7d987c6..b407f86 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -20,7 +20,6 @@
#include <QTabWidget>
#include "QtAddContactDialog.h"
-#include "QtJoinMUCDialog.h"
#include "QtSwiftUtil.h"
#include "QtTabWidget.h"
#include "Roster/QtTreeWidget.h"
@@ -136,18 +135,9 @@ void QtMainWindow::handleAddContactDialogComplete(const JID& contact, const QStr
}
void QtMainWindow::handleJoinMUCAction() {
- QtJoinMUCDialog* joinMUC = new QtJoinMUCDialog("jabber@conference.jabber.org", "SwiftUser", this);
- connect(joinMUC, SIGNAL(onJoinCommand(const JID&, const QString&)), SLOT(handleJoinMUCDialogComplete(const JID&, const QString&)));
- joinMUC->show();
uiEventStream_->send(boost::shared_ptr<UIEvent>(new RequestMUCSearchUIEvent()));
}
-void QtMainWindow::handleJoinMUCDialogComplete(const JID& muc, const QString& nick) {
- boost::optional<String> maybeNick(Q2PSTRING(nick));
- boost::shared_ptr<UIEvent> event(new JoinMUCUIEvent(muc, maybeNick));
- uiEventStream_->send(event);
-}
-
void QtMainWindow::handleStatusChanged(StatusShow::Type showType, const QString &statusMessage) {
onChangeStatusRequest(showType, Q2PSTRING(statusMessage));
}
diff --git a/Swift/QtUI/QtMainWindow.h b/Swift/QtUI/QtMainWindow.h
index 3c20d66..b61a84d 100644
--- a/Swift/QtUI/QtMainWindow.h
+++ b/Swift/QtUI/QtMainWindow.h
@@ -50,15 +50,11 @@ namespace Swift {
void handleShowOfflineToggled(bool);
void handleJoinMUCAction();
void handleSignOutAction();
- void handleJoinMUCDialogComplete(const JID& muc, const QString& nick);
void handleAddContactDialogComplete(const JID& contact, const QString& name);
void handleAddActionTriggered(bool checked);
void handleEventCountUpdated(int count);
private:
std::vector<QMenu*> menus_;
- QLineEdit* muc_;
- QLineEdit* mucNick_;
- QPushButton* mucButton_;
QtTreeWidget* treeWidget_;
QtRosterHeader* meView_;
QAction* addAction_;
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 4ccb301..1c7f20b 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -54,7 +54,6 @@ sources = [
"QtAddContactDialog.cpp",
"QtChatWindow.cpp",
"QtChatWindowFactory.cpp",
- "QtJoinMUCDialog.cpp",
"QtLoginWindow.cpp",
"QtLoginWindowFactory.cpp",
"QtMainWindow.cpp",
@@ -119,7 +118,6 @@ if env["PLATFORM"] == "darwin" or env["PLATFORM"] == "win32" :
else :
swiftProgram = myenv.Program("swift", sources)
-myenv.Uic4("QtJoinMUCDialog.ui")
myenv.Uic4("MUCSearch/QtMUCSearchWindow.ui")
myenv.Uic4("QtAddContactDialog.ui")
myenv.Uic4("QtBookmarkDetailWindow.ui")