summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authorsidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 17:44:25 +0000
committersidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 17:44:25 +0000
commitdd3423c1a6bf4e13da32694bb2e9ab2be43fd87d (patch)
tree7e1f6f27d4890d29a70cf6d3c3b51d5c2e5980ea /chrome/browser/views/options
parent9524b2551e0b1aee26f998b2e707139cf84c6b68 (diff)
downloadchromium_src-dd3423c1a6bf4e13da32694bb2e9ab2be43fd87d.zip
chromium_src-dd3423c1a6bf4e13da32694bb2e9ab2be43fd87d.tar.gz
chromium_src-dd3423c1a6bf4e13da32694bb2e9ab2be43fd87d.tar.bz2
Change in enable-spellcheck checkbox in Languages Options Tab should not be considered unless OK is clicked.
Issue=11013 Review URL: http://codereview.chromium.org/99095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/languages_page_view.cc9
-rw-r--r--chrome/browser/views/options/languages_page_view.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index 40a427f..e8d968d 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -480,6 +480,7 @@ LanguagesPageView::LanguagesPageView(Profile* profile)
OptionsPageView(profile),
language_table_edited_(false),
language_warning_shown_(false),
+ enable_spellcheck_checkbox_clicked_(false),
spellcheck_language_index_selected_(-1),
ui_language_index_selected_(-1),
starting_ui_language_index_(-1) {
@@ -511,10 +512,7 @@ void LanguagesPageView::ButtonPressed(views::Button* sender) {
new AddLanguageWindowView(this, profile()))->Show();
language_table_edited_ = true;
} else if (sender == enable_spellchecking_checkbox_) {
- if (enable_spellchecking_checkbox_->checked())
- enable_spellcheck_.SetValue(true);
- else
- enable_spellcheck_.SetValue(false);
+ enable_spellcheck_checkbox_clicked_ = true;
}
}
@@ -844,4 +842,7 @@ void LanguagesPageView::SaveChanges() {
dictionary_language_.SetValue(ASCIIToWide(dictionary_language_model_->
GetLocaleFromIndex(spellcheck_language_index_selected_)));
}
+
+ if (enable_spellcheck_checkbox_clicked_)
+ enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked());
}
diff --git a/chrome/browser/views/options/languages_page_view.h b/chrome/browser/views/options/languages_page_view.h
index 9d1b7ff..1da0a88 100644
--- a/chrome/browser/views/options/languages_page_view.h
+++ b/chrome/browser/views/options/languages_page_view.h
@@ -105,6 +105,7 @@ class LanguagesPageView : public OptionsPageView,
bool language_table_edited_;
bool language_warning_shown_;
+ bool enable_spellcheck_checkbox_clicked_;
DISALLOW_EVIL_CONSTRUCTORS(LanguagesPageView);
};