Fix issues related to tab order in main window

Make sure the search input has focus when switching to the search tab
This commit is contained in:
Christophe Dumez
2010-07-19 18:49:53 +00:00
parent 51068294f1
commit bceb00d35f
7 changed files with 30 additions and 16 deletions

View File

@@ -277,6 +277,10 @@ void SearchEngine::searchTextEdited(QString) {
search_button->setText(tr("Search"));
}
void SearchEngine::giveFocusToSearchInput() {
search_pattern->setFocus();
}
// Function called when we click on search button
void SearchEngine::on_search_button_clicked(){
#ifdef Q_WS_WIN
@@ -549,7 +553,7 @@ void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){
}
QIniSettings settings("qBittorrent", "qBittorrent");
bool useNotificationBalloons = settings.value("Preferences/General/NotificationBaloons", true).toBool();
if(useNotificationBalloons && parent->getCurrentTabIndex() != TAB_SEARCH) {
if(useNotificationBalloons && parent->getCurrentTabWidget() != this) {
parent->showNotificationBaloon(tr("Search Engine"), tr("Search has finished"));
}
if(exitcode){