Changed media player to initialize in boot.
[jspeed] / src / poisettings.cpp
index 5adfa6e..dfb03eb 100644 (file)
@@ -35,7 +35,6 @@
 #include "fileselector.h"
 #include "poialerts.h"
 #include "settings.h"
-#include "mediaplayer.h"
 #include "poireader.h"
 #include "buttonbox.h"
 #include "soundselector.h"
@@ -63,7 +62,7 @@ PoiSettings::PoiSettings(QWidget* parent): QDialog(parent)
     QHBoxLayout* distance = new QHBoxLayout;
     distance->addWidget(distanceLabel_);
     distance->addWidget(distance_);
-    onlyOnRoute_ = new QCheckBox(tr("Alert only if poi is in route"));
+    onlyOnRoute_ = new QCheckBox(tr("Alert only if poi is on route"));
     onlyOnRoute_->setChecked(Settings::instance().value("alert_only_on_route", true).toBool());
 
     ButtonBox* buttons = new ButtonBox;
@@ -141,11 +140,13 @@ void PoiSettings::saveSettings()
     Settings::instance().setValue("alert_sound", soundSelector_->value());
     Settings::instance().setValue("alert_poi_file", poiFileSelector_->value());
 
-    hide();
-
     if(!PoiAlerts::instance().loadConfig())
     {
-        QMaemo5InformationBox::information(0, tr("Unable to load poi file: %1.").arg(PoiAlerts::instance().error()),
+        QMaemo5InformationBox::information(this, tr("Unable to load poi file: %1.").arg(PoiAlerts::instance().error()),
                                            QMaemo5InformationBox::NoTimeout);
     }
+    else
+    {
+        hide();
+    }
 }