google translation can be added to bookmark
[mdictionary] / src / mdictionary / gui / MainWindow.cpp
index 4cade09..51384d6 100644 (file)
@@ -231,6 +231,8 @@ void MainWindow::wordListReady() {
             setExactSearch(false);
         }
     }
+
+    wordListWidget->setFocus();
 }
 
 bool MainWindow::checkExactSearch(
@@ -255,6 +257,7 @@ void MainWindow::translationsReady() {
     #endif
 
     Q_EMIT showTranslation(backbone->xmls());
+    wordListWidget->setFocus();
     #ifdef Q_WS_MAEMO_5
         notifyManager->screenChanged();
     #endif
@@ -292,6 +295,12 @@ QHash<CommonDictInterface*, bool> MainWindow::getDictionaries() {
 void MainWindow::search(QString word) {
     setExactSearch(false);
     searchBarWidget->search(word);
+    #ifdef Q_WS_MAEMO_5
+    if(translationWidget->isVisible()) {
+            translationWidget->hide();
+            update();
+        }
+    #endif
 }
 
 void MainWindow::searchExact(QString word) {
@@ -455,6 +464,13 @@ void MainWindow::connectBackbone() {
 
     connect(backbone, SIGNAL(closeOk()),
             this, SLOT(close()));
+
+
+    //connect(wordListWidget, SIGNAL(addBookmark(QList<Translation*>)),
+    //       this, SIGNAL(setBusy()));
+
+    //connect(backbone, SIGNAL(bookmarkReady()),
+    //        this, SIGNAL(setIdle()));
 }
 
 void MainWindow::connectSearchBar() {
@@ -518,12 +534,14 @@ void MainWindow::connectTranslationWidget() {
      #ifdef Q_WS_MAEMO_5
         connect(translationWidget, SIGNAL(search(QString)),
                 this, SLOT(search(QString)));
+
+        connect(translationWidget, SIGNAL(notify(Notify::NotifyType, QString)),
+                this, SLOT(showNotification(Notify::NotifyType,QString)));
     #else
         connect(translationWidget, SIGNAL(search(QString)),
                 this, SLOT(searchExact(QString)));
     #endif
 
-
 }
 
 void MainWindow::connectDictManager() {