| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include <windows.h> | 4 #include <windows.h> | 
| 5 #include <shlobj.h> | 5 #include <shlobj.h> | 
| 6 #include <vsstyle.h> | 6 #include <vsstyle.h> | 
| 7 #include <vssym32.h> | 7 #include <vssym32.h> | 
| 8 | 8 | 
| 9 #include "chrome/browser/views/options/languages_page_view.h" | 9 #include "chrome/browser/views/options/languages_page_view.h" | 
| 10 | 10 | 
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 264 | 264 | 
| 265 void AddLanguageWindowView::Layout() { | 265 void AddLanguageWindowView::Layout() { | 
| 266   gfx::Size sz = accept_language_combobox_->GetPreferredSize(); | 266   gfx::Size sz = accept_language_combobox_->GetPreferredSize(); | 
| 267   accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, | 267   accept_language_combobox_->SetBounds(kDialogPadding, kDialogPadding, | 
| 268                                        width() - 2*kDialogPadding, | 268                                        width() - 2*kDialogPadding, | 
| 269                                        sz.height()); | 269                                        sz.height()); | 
| 270 } | 270 } | 
| 271 | 271 | 
| 272 gfx::Size AddLanguageWindowView::GetPreferredSize() { | 272 gfx::Size AddLanguageWindowView::GetPreferredSize() { | 
| 273   ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 273   ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 
| 274   ChromeFont font = rb.GetFont(ResourceBundle::BaseFont); | 274   gfx::Font font = rb.GetFont(ResourceBundle::BaseFont); | 
| 275   return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars, | 275   return gfx::Size(font.ave_char_width() * kDefaultWindowWidthChars, | 
| 276                    font.height() * kDefaultWindowHeightLines); | 276                    font.height() * kDefaultWindowHeightLines); | 
| 277 } | 277 } | 
| 278 | 278 | 
| 279 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, | 279 void AddLanguageWindowView::ViewHierarchyChanged(bool is_add, | 
| 280                                                  views::View* parent, | 280                                                  views::View* parent, | 
| 281                                                  views::View* child) { | 281                                                  views::View* child) { | 
| 282   // Can't init before we're inserted into a Widget, because we require | 282   // Can't init before we're inserted into a Widget, because we require | 
| 283   // a HWND to parent native child controls to. | 283   // a HWND to parent native child controls to. | 
| 284   if (is_add && child == this) | 284   if (is_add && child == this) | 
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 839   if (spellcheck_language_index_selected_ != -1) { | 839   if (spellcheck_language_index_selected_ != -1) { | 
| 840     UserMetricsRecordAction(L"Options_DictionaryLanguage", | 840     UserMetricsRecordAction(L"Options_DictionaryLanguage", | 
| 841                             profile()->GetPrefs()); | 841                             profile()->GetPrefs()); | 
| 842     dictionary_language_.SetValue(ASCIIToWide(dictionary_language_model_-> | 842     dictionary_language_.SetValue(ASCIIToWide(dictionary_language_model_-> | 
| 843         GetLocaleFromIndex(spellcheck_language_index_selected_))); | 843         GetLocaleFromIndex(spellcheck_language_index_selected_))); | 
| 844   } | 844   } | 
| 845 | 845 | 
| 846   if (enable_spellcheck_checkbox_clicked_) | 846   if (enable_spellcheck_checkbox_clicked_) | 
| 847     enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); | 847     enable_spellcheck_.SetValue(enable_spellchecking_checkbox_->checked()); | 
| 848 } | 848 } | 
| OLD | NEW | 
|---|