#include "fileselector.h"
#include "poialerts.h"
#include "settings.h"
-#include "mediaplayer.h"
#include "poireader.h"
#include "buttonbox.h"
#include "soundselector.h"
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;
poiFileSelector_->clear();
QString selectedPoi = Settings::instance().value("alert_poi_file", "").toString();
- poiFileSelector_->loadFiles(PoiAlerts::getPoiDir(), PoiReader::getFormatPattern());
+ poiFileSelector_->loadFiles(PoiAlerts::getPoiDir(), PoiReader::getFormatPattern(), true);
poiFileSelector_->selectByValue(selectedPoi);
}
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();
+ }
}