summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-01-24 12:25:34 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-01-24 12:25:34 (GMT)
commitbc62fa0bba66639b087babc16f3451f7213f5c95 (patch)
tree8de5b2e35af0434c12669bbae487b08db1cab6ad /Swift/QtUI/UserSearch
parent3d15ba9117ba3ad0aa0066cb1644f1e4688ff70d (diff)
downloadswift-bc62fa0bba66639b087babc16f3451f7213f5c95.zip
swift-bc62fa0bba66639b087babc16f3451f7213f5c95.tar.bz2
Set the user search title based on the dialog type.
Resolves: #736
Diffstat (limited to 'Swift/QtUI/UserSearch')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp8
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index e426dd7..94c9b0e 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -20,9 +20,9 @@
namespace Swift {
-QtUserSearchFirstPage::QtUserSearchFirstPage(UserSearchWindow::Type type) {
+QtUserSearchFirstPage::QtUserSearchFirstPage(UserSearchWindow::Type type, const QString& title) {
setupUi(this);
- setTitle(type == UserSearchWindow::AddContact ? "Add User" : "Chat to User");
+ setTitle(title);
setSubTitle(QString("%1. If you know their JID you can enter it directly, or you can search for them.").arg(type == UserSearchWindow::AddContact ? "Add another user to your roster" : "Chat to another user"));
connect(jid_, SIGNAL(textChanged(const QString&)), this, SLOT(emitCompletenessCheck()));
connect(service_, SIGNAL(textChanged(const QString&)), this, SLOT(emitCompletenessCheck()));
@@ -79,7 +79,9 @@ QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWin
setupUi(this);
model_ = new UserSearchModel();
delegate_ = new UserSearchDelegate();
- firstPage_ = new QtUserSearchFirstPage(type);
+ QString title(type == UserSearchWindow::AddContact ? "Add User" : "Chat to User");
+ setWindowTitle(title);
+ firstPage_ = new QtUserSearchFirstPage(type, title);
connect(firstPage_->byJID_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
connect(firstPage_->byLocalSearch_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
connect(firstPage_->byRemoteSearch_, SIGNAL(toggled(bool)), this, SLOT(handleFirstPageRadioChange()));
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.h b/Swift/QtUI/UserSearch/QtUserSearchWindow.h
index b238e94..e7b8226 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.h
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.h
@@ -25,7 +25,7 @@ namespace Swift {
class QtUserSearchFirstPage : public QWizardPage, public Ui::QtUserSearchFirstPage {
Q_OBJECT
public:
- QtUserSearchFirstPage(UserSearchWindow::Type type);
+ QtUserSearchFirstPage(UserSearchWindow::Type type, const QString& title);
virtual bool isComplete() const;
public slots:
void emitCompletenessCheck();