+
+void SearchDialog::loadSearchTypes()
+{
+ selector_->clear();
+
+ Source* source = Source::getSource(Source::stringToId(Settings::instance()->get("source")));
+
+ QList<Source::SearchType> types;
+ source->getSearchTypes(types);
+
+ if(types.size() > 1)
+ {
+ for(int i = 0; i < types.size(); i++)
+ {
+ switch(types.at(i))
+ {
+ case Source::PERSONS:
+ selector_->addItem(tr("Persons"), static_cast<int>(Source::PERSONS));
+ break;
+ case Source::YELLOW_PAGES:
+ selector_->addItem(tr("Companies"), static_cast<int>(Source::YELLOW_PAGES));
+ break;
+ case Source::BOTH:
+ break;
+ }
+ }
+
+ if(!selector_->isVisible())
+ {
+ selector_->show();
+ }
+ }
+ else
+ {
+ selector_->hide();
+ }
+}