| Index: chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc
|
| ===================================================================
|
| --- chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc (revision 141803)
|
| +++ chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc (working copy)
|
| @@ -115,9 +115,7 @@
|
| // Check box for 'Check Spelling while typing'.
|
| if (command_id == IDC_CHECK_SPELLING_WHILE_TYPING) {
|
| Profile* profile = proxy_->GetProfile();
|
| - if (!profile || !profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck))
|
| - return false;
|
| - return spellcheck_enabled_;
|
| + return profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck);
|
| }
|
|
|
| return false;
|
| @@ -138,8 +136,6 @@
|
|
|
| switch (command_id) {
|
| case IDC_CHECK_SPELLING_WHILE_TYPING:
|
| - return pref->GetBoolean(prefs::kEnableSpellCheck);
|
| -
|
| case IDC_SPELLPANEL_TOGGLE:
|
| case IDC_SPELLCHECK_MENU:
|
| return true;
|
| @@ -152,9 +148,9 @@
|
| DCHECK(IsCommandIdSupported(command_id));
|
|
|
| // Check to see if one of the spell check language ids have been clicked.
|
| + Profile* profile = proxy_->GetProfile();
|
| if (command_id >= IDC_SPELLCHECK_LANGUAGES_FIRST &&
|
| command_id < IDC_SPELLCHECK_LANGUAGES_LAST) {
|
| - Profile* profile = proxy_->GetProfile();
|
| const size_t language = command_id - IDC_SPELLCHECK_LANGUAGES_FIRST;
|
| if (profile && language < languages_.size()) {
|
| StringPrefMember dictionary_language;
|
| @@ -169,6 +165,9 @@
|
| content::RenderViewHost* rvh = proxy_->GetRenderViewHost();
|
| switch (command_id) {
|
| case IDC_CHECK_SPELLING_WHILE_TYPING:
|
| + profile->GetPrefs()->SetBoolean(
|
| + prefs::kEnableSpellCheck,
|
| + !profile->GetPrefs()->GetBoolean(prefs::kEnableSpellCheck));
|
| rvh->Send(new SpellCheckMsg_ToggleSpellCheck(rvh->GetRoutingID()));
|
| break;
|
| }
|
|
|