Few small fixes for confirmation system
[mdictionary] / trunk / src / base / gui / SettingsWidget.cpp
index 468f8b8..e20ffdd 100644 (file)
@@ -65,9 +65,9 @@ SettingsWidget::SettingsWidget(GUIInterface *parent) :
     verticalLayout->addWidget(searchInBookmarksCheckBox);
 
 
-    connect(historySizeSpinBox, SIGNAL(editingFinished()), this,
+    connect(historySizeSpinBox, SIGNAL(valueChanged(int)), this,
             SLOT(changed()));
-    connect(searchResultSizeSpinBox, SIGNAL(editingFinished()), this,
+    connect(searchResultSizeSpinBox, SIGNAL(valueChanged(int)), this,
             SLOT(changed()));
     connect(searchInDictionariesCheckBox, SIGNAL(toggled(bool)), this,
             SLOT(changed()));
@@ -81,7 +81,7 @@ SettingsWidget::SettingsWidget(GUIInterface *parent) :
         setMinimumWidth(250);
         setMaximumWidth(250);
         footerLayout = new QHBoxLayout(this);
-        closeButton = new QPushButton(tr("Ok"));
+        closeButton = new QPushButton(tr("Save"));
         footerLayout->addStretch(0);
         footerLayout->addWidget(closeButton);
         verticalLayout->addLayout(footerLayout);
@@ -94,7 +94,6 @@ void SettingsWidget::showEvent(QShowEvent *e) {
    #ifndef Q_WS_MAEMO_5
        _save = false;
    #endif
-   _changed = false;
    settings = guiInterface->settings();
 
    historySizeSpinBox->setValue(
@@ -113,6 +112,7 @@ void SettingsWidget::showEvent(QShowEvent *e) {
     else
         searchInDictionariesCheckBox->setChecked(false);
 
+    _changed = false;
     QDialog::showEvent(e);
 }
 
@@ -158,6 +158,7 @@ void SettingsWidget::hideEvent(QHideEvent *e) {
         delete settings;
         settings = 0;
     }
+    _changed = false;
 }