From 6ec8b32ba119eb04d43979363f6b5c6134e1ea32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sun, 26 Dec 2010 11:10:45 +0100 Subject: Tweaked user search UI a bit. diff --git a/Swift/QtUI/UserSearch/QtUserSearchFirstPage.ui b/Swift/QtUI/UserSearch/QtUserSearchFirstPage.ui index cbf3831..3139f66 100644 --- a/Swift/QtUI/UserSearch/QtUserSearchFirstPage.ui +++ b/Swift/QtUI/UserSearch/QtUserSearchFirstPage.ui @@ -6,8 +6,8 @@ 0 0 - 400 - 300 + 422 + 315 @@ -21,13 +21,6 @@ - - - <font color='red'>errorLabel_</font> - - - - howLabel_ @@ -35,11 +28,18 @@ - - - I know their JID - - + + + + + I know their JID: + + + + + + + @@ -49,26 +49,49 @@ - - - I'd like to search another server - - + + + + + I'd like to search another server: + + + + + + + + 0 + 0 + + + + true + + + + - - - jidLabel_ + + + Qt::Vertical - - - - + + + 20 + 77 + + + - - - true + + + <font color='red'>errorLabel_</font> + + + Qt::AlignCenter 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(); } } -- cgit v0.10.2-6-g49f6