Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: chrome/browser/gtk/options/languages_page_gtk.cc

Issue 3159031: Remove wstrings from bookmarks, part 12. (Closed)
Patch Set: rebased ToT Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/options/fonts_page_gtk.cc ('k') | chrome/browser/language_combobox_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 namespace { 26 namespace {
27 27
28 const int kWrapWidth = 475; 28 const int kWrapWidth = 475;
29 29
30 GtkWidget* NewComboboxFromModel(ComboboxModel* model) { 30 GtkWidget* NewComboboxFromModel(ComboboxModel* model) {
31 GtkWidget* combobox = gtk_combo_box_new_text(); 31 GtkWidget* combobox = gtk_combo_box_new_text();
32 int count = model->GetItemCount(); 32 int count = model->GetItemCount();
33 for (int i = 0; i < count; ++i) 33 for (int i = 0; i < count; ++i)
34 gtk_combo_box_append_text(GTK_COMBO_BOX(combobox), 34 gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
35 WideToUTF8(model->GetItemAt(i)).c_str()); 35 UTF16ToUTF8(model->GetItemAt(i)).c_str());
36 return combobox; 36 return combobox;
37 } 37 }
38 38
39 //////////////////////////////////////////////////////////////////////////////// 39 ////////////////////////////////////////////////////////////////////////////////
40 // AddLanguageDialog 40 // AddLanguageDialog
41 41
42 class AddLanguageDialog { 42 class AddLanguageDialog {
43 public: 43 public:
44 AddLanguageDialog(Profile* profile, LanguagesPageGtk* delegate); 44 AddLanguageDialog(Profile* profile, LanguagesPageGtk* delegate);
45 virtual ~AddLanguageDialog() {} 45 virtual ~AddLanguageDialog() {}
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 OnAddLanguage(language); 443 OnAddLanguage(language);
444 spellcheck_language_added_ = language; 444 spellcheck_language_added_ = language;
445 } else { 445 } else {
446 spellcheck_language_added_ = ""; 446 spellcheck_language_added_ = "";
447 } 447 }
448 448
449 UserMetricsRecordAction(UserMetricsAction("Options_DictionaryLanguage"), 449 UserMetricsRecordAction(UserMetricsAction("Options_DictionaryLanguage"),
450 profile()->GetPrefs()); 450 profile()->GetPrefs());
451 dictionary_language_.SetValue(language); 451 dictionary_language_.SetValue(language);
452 } 452 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/fonts_page_gtk.cc ('k') | chrome/browser/language_combobox_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698