this->plugin = plugin;
this->type = type;
-
- cacheToolTip = tr("Optimize for quicker searches (may take some time)");
accentsToolTip = tr("Strip accents (searching takes more time, but spelling doesn't have to be exact)");
initializeUI();
- connect(cacheCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(setGenerateCache(bool)));
connect(accentsCheckBox, SIGNAL(toggled(bool)),
this, SLOT(setAccents(bool)));
#ifdef Q_WS_MAEMO_5
connect(accentsInfoToolButton, SIGNAL(clicked()),
- this, SLOT(showAccentsInfo()));
- connect(cacheInfoToolButton, SIGNAL(clicked()),
- this, SLOT(showCacheInfo()));
#endif
if(type == New) {
infoLabel->setWordWrap(true);
if(type == New) {
- setWindowTitle(tr("Add new XDXF dictionary"));
+ setWindowTitle(tr("Add new StarDict dictionary"));
browseLayout = new QHBoxLayout;
browseButton = new QPushButton(tr("Browse"));
mainVerticalLayout->addLayout(browseLayout);
}
else {
- setWindowTitle(tr("XDXF Settings"));
+ setWindowTitle(tr("StarDict Settings"));
infoLabel->setText(tr("Plugin: ") + plugin->type().toUpper() +"\n" +
tr("From: ") + plugin->langFrom() + "\n" +
accentsLayout->addWidget(accentsInfoToolButton);
#endif
- cacheLayout = new QHBoxLayout;
- cacheCheckBox = new QCheckBox(tr("Optimize"));
- cacheCheckBox->setToolTip(cacheToolTip);
- cacheLayout->addWidget(cacheCheckBox);
- #ifdef Q_WS_MAEMO_5
- cacheInfoToolButton = new QToolButton;
- cacheInfoToolButton->setIcon(QIcon::fromTheme("general_information"));
- cacheLayout->addWidget(cacheInfoToolButton);
- #endif
- mainVerticalLayout->addLayout(cacheLayout);
mainVerticalLayout->addLayout(accentsLayout);
//load old setting if exists
if(!plugin) {
- cacheCheckBox->setChecked(true);
accentsCheckBox->setChecked(true);
accentsCheckBox->setEnabled(false);
- _generateCache = true;
_accents = true;
_dictionaryFilePath = "";
}
else if(plugin && plugin->settings()->value("cached") == "true") {
- cacheCheckBox->setChecked(true);
accentsCheckBox->setChecked(true);
accentsCheckBox->setEnabled(false);
- _generateCache = true;
_accents = true;
}
else {
- cacheCheckBox->setChecked(false);
- _generateCache = false;
-
if(plugin->settings()->value("strip_accents") == "true") {
accentsCheckBox->setChecked(true);
_accents = true;
QString fileName = QFileDialog::getOpenFileName(this,
tr("Select dictionary file"),
_dictionaryFilePath,
- tr("XDXF Files (*.xdxf)"),
+ tr("StarDict Files (*.dict *dict.dz *.idx *idx.gz *.ifo)"),
NULL,
NULL);
else {
_settings->setValue("path", _dictionaryFilePath);
}
-
- if(_generateCache)
- _settings->setValue("generateCache", "true");
- else
- _settings->setValue("generateCache", "false");
-
if(_accents)
_settings->setValue("strip_accents", "true");
else