| OLD | NEW |
| 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/fonts_page_gtk.h" | 5 #include "chrome/browser/gtk/options/fonts_page_gtk.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 11 #include "chrome/browser/default_encoding_combo_model.h" | 11 #include "chrome/browser/default_encoding_combo_model.h" |
| 12 #include "chrome/browser/gtk/gtk_util.h" | 12 #include "chrome/browser/gtk/gtk_util.h" |
| 13 #include "chrome/browser/gtk/options/options_layout_gtk.h" | 13 #include "chrome/browser/gtk/options/options_layout_gtk.h" |
| 14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "gfx/font.h" | 16 #include "gfx/font.h" |
| 17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Make a Gtk font name string from a font family name and pixel size. | 21 // Make a Gtk font name string from a font family name and pixel size. |
| 22 std::string MakeFontName(std::string family_name, int pixel_size) { | 22 std::string MakeFontName(std::string family_name, int pixel_size) { |
| 23 // The given font might not be available (the default fonts we use are not | 23 // The given font might not be available (the default fonts we use are not |
| 24 // installed by default on some distros). So figure out which font we are | 24 // installed by default on some distros). So figure out which font we are |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 SetFontsFromButton(&fixed_width_name_, | 178 SetFontsFromButton(&fixed_width_name_, |
| 179 &fixed_width_size_, | 179 &fixed_width_size_, |
| 180 font_button); | 180 font_button); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void FontsPageGtk::OnDefaultEncodingChanged(GtkWidget* combo_box) { | 183 void FontsPageGtk::OnDefaultEncodingChanged(GtkWidget* combo_box) { |
| 184 int index = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box)); | 184 int index = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box)); |
| 185 default_encoding_.SetValue(default_encoding_combobox_model_-> | 185 default_encoding_.SetValue(default_encoding_combobox_model_-> |
| 186 GetEncodingCharsetByIndex(index)); | 186 GetEncodingCharsetByIndex(index)); |
| 187 } | 187 } |
| OLD | NEW |