summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-26 10:10:45 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-26 10:10:45 (GMT)
commit6ec8b32ba119eb04d43979363f6b5c6134e1ea32 (patch)
treeaeacc89dde69cf4606757689a3b063fb507d4e41 /Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
parent87faa911f3249bab8c1ac1fea9d0430c1c81a061 (diff)
downloadswift-6ec8b32ba119eb04d43979363f6b5c6134e1ea32.zip
swift-6ec8b32ba119eb04d43979363f6b5c6134e1ea32.tar.bz2
Tweaked user search UI a bit.
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchWindow.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 82479be..034b59c 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -35,6 +35,7 @@ QtUserSearchWindow::QtUserSearchWindow(UIEventStream* eventStream, UserSearchWin
#if QT_VERSION >= 0x040700
firstPage_->jid_->setPlaceholderText("alice@wonderland.lit");
#endif
+ firstPage_->service_->setEnabled(false);
fieldsPage_ = new QtUserSearchFieldsPage();
fieldsPage_->fetchingThrobber_->setMovie(new QMovie(":/icons/throbber.gif", QByteArray(), this));
fieldsPage_->fetchingThrobber_->movie()->stop();
@@ -106,24 +107,19 @@ int QtUserSearchWindow::nextId() const {
void QtUserSearchWindow::handleFirstPageRadioChange() {
if (firstPage_->byJID_->isChecked()) {
- firstPage_->jidLabel_->setText("What is their JID?");
- firstPage_->jidLabel_->show();
- firstPage_->service_->hide();
firstPage_->jid_->setText("");
- firstPage_->jid_->show();
+ firstPage_->jid_->setEnabled(true);
+ firstPage_->service_->setEnabled(false);
restart();
} else if (firstPage_->byRemoteSearch_->isChecked()) {
- firstPage_->jidLabel_->setText("Which server do you want to search? (This has the form 'wonderland.lit')");
- firstPage_->jidLabel_->hide();
- firstPage_->service_->show();
firstPage_->service_->setEditText("");
+ firstPage_->jid_->setEnabled(false);
+ firstPage_->service_->setEnabled(true);
//firstPage_->jid_->setText("");
- firstPage_->jid_->hide();
restart();
} else {
- firstPage_->jid_->hide();
- firstPage_->jidLabel_->hide();
- firstPage_->service_->hide();
+ firstPage_->jid_->setEnabled(false);
+ firstPage_->service_->setEnabled(false);
restart();
}
}