From f1d3bac7356f6ef31d9b72399852671f614a953e Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Fri, 14 Jan 2011 20:18:06 +0000
Subject: Use correct text in User Search.

Resolves: #736

diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 7e3c98d..e426dd7 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -20,8 +20,10 @@
 
 namespace Swift {
 
-QtUserSearchFirstPage::QtUserSearchFirstPage() {
+QtUserSearchFirstPage::QtUserSearchFirstPage(UserSearchWindow::Type type) {
 	setupUi(this);
+	setTitle(type == UserSearchWindow::AddContact ? "Add User" : "Chat to User");
+	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()));
 }
@@ -77,7 +79,7 @@ QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWin
 	setupUi(this);
 	model_ = new UserSearchModel();
 	delegate_ = new UserSearchDelegate();
-	firstPage_ = new QtUserSearchFirstPage();
+	firstPage_ = new QtUserSearchFirstPage(type);
 	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 cc6eefb..b238e94 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();
+			QtUserSearchFirstPage(UserSearchWindow::Type type);
 			virtual bool isComplete() const;
 		public slots:
 			void emitCompletenessCheck();
-- 
cgit v0.10.2-6-g49f6