OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/gtk/options/languages_page_gtk.h" | 5 #include "chrome/browser/gtk/options/languages_page_gtk.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 FALSE, FALSE, 0); | 228 FALSE, FALSE, 0); |
229 | 229 |
230 enable_spellchecking_checkbox_ = gtk_check_button_new_with_label( | 230 enable_spellchecking_checkbox_ = gtk_check_button_new_with_label( |
231 l10n_util::GetStringUTF8(IDS_OPTIONS_ENABLE_SPELLCHECK).c_str()); | 231 l10n_util::GetStringUTF8(IDS_OPTIONS_ENABLE_SPELLCHECK).c_str()); |
232 g_signal_connect(G_OBJECT(enable_spellchecking_checkbox_), "toggled", | 232 g_signal_connect(G_OBJECT(enable_spellchecking_checkbox_), "toggled", |
233 G_CALLBACK(OnEnableSpellCheckingToggled), this); | 233 G_CALLBACK(OnEnableSpellCheckingToggled), this); |
234 gtk_box_pack_start(GTK_BOX(spellchecker_vbox), enable_spellchecking_checkbox_, | 234 gtk_box_pack_start(GTK_BOX(spellchecker_vbox), enable_spellchecking_checkbox_, |
235 FALSE, FALSE, 0); | 235 FALSE, FALSE, 0); |
236 | 236 |
237 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 237 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
238 if (command_line.HasSwitch(switches::kAutoSpellCorrect)) { | 238 if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) { |
239 enable_autospellcorrect_checkbox_ = gtk_check_button_new_with_label( | 239 enable_autospellcorrect_checkbox_ = gtk_check_button_new_with_label( |
240 l10n_util::GetStringUTF8( | 240 l10n_util::GetStringUTF8( |
241 IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION).c_str()); | 241 IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION).c_str()); |
242 g_signal_connect(G_OBJECT(enable_autospellcorrect_checkbox_), "toggled", | 242 g_signal_connect(G_OBJECT(enable_autospellcorrect_checkbox_), "toggled", |
243 G_CALLBACK(OnEnableAutoSpellCheckingToggled), this); | 243 G_CALLBACK(OnEnableAutoSpellCheckingToggled), this); |
244 gtk_box_pack_start(GTK_BOX(spellchecker_vbox), | 244 gtk_box_pack_start(GTK_BOX(spellchecker_vbox), |
245 enable_autospellcorrect_checkbox_, FALSE, FALSE, 0); | 245 enable_autospellcorrect_checkbox_, FALSE, FALSE, 0); |
246 } | 246 } |
247 | 247 |
248 std::vector<std::string> spell_check_languages; | 248 std::vector<std::string> spell_check_languages; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 OnAddLanguage(language); | 466 OnAddLanguage(language); |
467 spellcheck_language_added_ = language; | 467 spellcheck_language_added_ = language; |
468 } else { | 468 } else { |
469 spellcheck_language_added_ = ""; | 469 spellcheck_language_added_ = ""; |
470 } | 470 } |
471 | 471 |
472 UserMetricsRecordAction(L"Options_DictionaryLanguage", | 472 UserMetricsRecordAction(L"Options_DictionaryLanguage", |
473 profile()->GetPrefs()); | 473 profile()->GetPrefs()); |
474 dictionary_language_.SetValue(ASCIIToWide(language)); | 474 dictionary_language_.SetValue(ASCIIToWide(language)); |
475 } | 475 } |
OLD | NEW |