- CommonDictInterface* selectedPlugin =
- DictTypeSelectDialog::addNewDict(guiInterface->getPlugins(),this);
- if(selectedPlugin != NULL) {
- Settings* settings =
- selectedPlugin->dictDialog()->addNewDictionary(this);
-
- if(settings != NULL) {
- CommonDictInterface* newDict = selectedPlugin->getNew(settings);
- Q_EMIT addDictionary(newDict);
- refreshDictsList();
- }
+ if(!_changed || QMessageBox::question(this,
+ "Save", "Do you want to save changes?",
+ QMessageBox::Save, QMessageBox::Cancel) == QMessageBox::Save) {
+ _save = true;
+ saveChanges();
+ _save = false;