Added call log and German translation.
[jenirok] / src / gui / searchdialog.cpp
index 5ee806c..a6224cb 100644 (file)
@@ -23,7 +23,6 @@
 #include <QtGui/QDialogButtonBox>
 #include <QMaemo5ValueButton>
 #include "searchdialog.h"
-#include "source.h"
 #include "settings.h"
 
 SearchDialog::SearchDialog(QWidget* parent): QDialog(parent),
@@ -76,7 +75,16 @@ void SearchDialog::searchPressed()
     }
 
     details.location = locationInput_->text();
-    details.type = selector_->value().toInt();
+
+    int type = 0;
+
+    if(selector_->isVisible())
+    {
+        type = selector_->value().toInt();
+    }
+
+    details.type = static_cast<Source::SearchType>(type);
+
     emit search(details);
     hide();
 }