Changed history behaviour, history next and prev buttons now start searching after...
[mdictionary] / trunk / src / base / gui / MainWindow.cpp
index c26fb8f..252d816 100644 (file)
@@ -171,6 +171,8 @@ void MainWindow::searchExact(QString word) {
     searchBarWidget->search(word);
 }
 
+
+
 void MainWindow::breakSearching() {
     //make sure to unset exact search mode
     setExactSearch(false);
@@ -186,14 +188,14 @@ void MainWindow::addToHistory(QList<Translation *> trans) {
 void MainWindow::historyNext() {
     if(backbone->history()->nextAvailable()) {
         QString next = backbone->history()->next();
-        searchExact(next);
+        searchBarWidget->searchDelay(next);
     }
 }
 
 void MainWindow::historyPrev() {
     if(backbone->history()->prevAvailable()) {
         QString prev = backbone->history()->previous();
-        searchExact(prev);
+        searchBarWidget->searchDelay(prev);
     }
 }
 
@@ -256,6 +258,9 @@ void MainWindow::connectBackbone() {
     connect(backbone, SIGNAL(htmlReady()),
             this, SLOT(translationsReady()));
 
+    connect(backbone, SIGNAL(searchCanceled()),
+            this, SIGNAL(setIdle()));
+