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

Side by Side Diff: chrome/browser/chromeos/options/options_window_view.cc

Issue 1773006: Fix the missing gtk options bug. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: better place to do gtk_widget_show_all Created 10 years, 8 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 | « no previous file | no next file » | 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/options_window.h" 5 #include "chrome/browser/options_window.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/browser/browser_list.h" 10 #include "chrome/browser/browser_list.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 OptionsWindowView::~OptionsWindowView() { 138 OptionsWindowView::~OptionsWindowView() {
139 } 139 }
140 140
141 void OptionsWindowView::ShowOptionsPage(OptionsPage page, 141 void OptionsWindowView::ShowOptionsPage(OptionsPage page,
142 OptionsGroup highlight_group) { 142 OptionsGroup highlight_group) {
143 // This will show invisible windows and bring visible windows to the front. 143 // This will show invisible windows and bring visible windows to the front.
144 window()->Show(); 144 window()->Show();
145 145
146 // Show all controls in tab after tab's size is allocated. We have
147 // to do this after size allocation otherwise WrapLabelAtAllocationHack
148 // in ContentPageGtk would break.
149 GtkWidget* notebook = static_cast<views::NativeTabbedPaneGtk*>(
150 tabs_->native_wrapper())->native_view();
151 gtk_widget_show_all(notebook);
152
146 if (page == OPTIONS_PAGE_DEFAULT) { 153 if (page == OPTIONS_PAGE_DEFAULT) {
147 // Remember the last visited page from local state. 154 // Remember the last visited page from local state.
148 page = static_cast<OptionsPage>(last_selected_page_.GetValue()); 155 page = static_cast<OptionsPage>(last_selected_page_.GetValue());
149 if (page == OPTIONS_PAGE_DEFAULT) 156 if (page == OPTIONS_PAGE_DEFAULT)
150 page = OPTIONS_PAGE_GENERAL; 157 page = OPTIONS_PAGE_GENERAL;
151 } 158 }
152 // If the page number is out of bounds, reset to the first tab. 159 // If the page number is out of bounds, reset to the first tab.
153 if (page < 0 || page >= tabs_->GetTabCount()) 160 if (page < 0 || page >= tabs_->GetTabCount())
154 page = OPTIONS_PAGE_GENERAL; 161 page = OPTIONS_PAGE_GENERAL;
155 162
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 OptionsWindowView::instance_->window()->Close(); 315 OptionsWindowView::instance_->window()->Close();
309 316
310 OptionsWindowView::instance_ = new OptionsWindowView(profile); 317 OptionsWindowView::instance_ = new OptionsWindowView(profile);
311 views::Window::CreateChromeWindow(chromeos::GetOptionsViewParent(), 318 views::Window::CreateChromeWindow(chromeos::GetOptionsViewParent(),
312 gfx::Rect(), 319 gfx::Rect(),
313 OptionsWindowView::instance_); 320 OptionsWindowView::instance_);
314 321
315 OptionsWindowView::instance_->ShowOptionsPage(page, highlight_group); 322 OptionsWindowView::instance_->ShowOptionsPage(page, highlight_group);
316 } 323 }
317 324
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698