Added posibility of disabling striping accents
[mdictionary] / trunk / src / plugins / xdxf / src / XdxfSettingsDialog.cpp
index 9102027..933aa39 100644 (file)
@@ -58,6 +58,14 @@ XdxfSettingsDialog::XdxfSettingsDialog(XdxfPlugin *plugin, QWidget *parent) :
 
     cacheLayout = new QHBoxLayout(this);
     verticalLayout->addLayout(cacheLayout);
+    accentsCheckBox = new QCheckBox("Strip accents (searching takes more time, "
+                 "but Your spelling don't have to be exact)");
+    verticalLayout->addWidget(accentsCheckBox);
+
+    if(plugin->settings()->value("strip_accents") == "true")
+        accentsCheckBox->setChecked(true);
+    else
+        accentsCheckBox->setChecked(false);
 
     cacheCheckBox = new QCheckBox(tr("Cached"),this);
     if(plugin->settings()->value("cached") == "true") {
@@ -131,6 +139,12 @@ Settings* XdxfSettingsDialog::getSettings(XdxfPlugin *plugin,
         else {
             settings->setValue("generateCache", "false");
         }
+
+        if(settingsDialog.accentsCheckBox->isChecked())
+            settings->setValue("strip_accents", "true");
+        else
+            settings->setValue("strip_accents", "false");
+
         plugin->setSettings(settings);
         return 0;
     }