diff options
| author | Kevin Smith <git@kismith.co.uk> | 2011-01-24 12:25:34 (GMT) | 
|---|---|---|
| committer | Kevin Smith <git@kismith.co.uk> | 2011-01-24 12:25:34 (GMT) | 
| commit | bc62fa0bba66639b087babc16f3451f7213f5c95 (patch) | |
| tree | 8de5b2e35af0434c12669bbae487b08db1cab6ad | |
| parent | 3d15ba9117ba3ad0aa0066cb1644f1e4688ff70d (diff) | |
| download | swift-bc62fa0bba66639b087babc16f3451f7213f5c95.zip swift-bc62fa0bba66639b087babc16f3451f7213f5c95.tar.bz2 | |
Set the user search title based on the dialog type.
Resolves: #736
| -rw-r--r-- | Swift/QtUI/SConscript | 2 | ||||
| -rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.cpp | 8 | ||||
| -rw-r--r-- | Swift/QtUI/UserSearch/QtUserSearchWindow.h | 2 | 
3 files changed, 7 insertions, 5 deletions
| diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 306cdf8..b0072a6 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -48,7 +48,7 @@ myenv.Tool("nsis", toolpath = ["#/BuildTools/SCons/Tools"])  qt4modules = ['QtCore', 'QtGui', 'QtWebKit']  if env["PLATFORM"] == "posix" :  	qt4modules += ["QtDBus"] -myenv.EnableQt4Modules(qt4modules, debug = env["debug"]) +myenv.EnableQt4Modules(qt4modules, debug = False)  myenv.Append(CPPPATH = ["."]) 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(); | 
 Swift
 Swift