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

Side by Side Diff: views/window/window_gtk.cc

Issue 150171: Convert menu strings to UTF16, fix some views-GTK build errors. (Closed)
Patch Set: Created 11 years, 5 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 | « views/widget/widget_gtk.cc ('k') | 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) 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 "views/window/window_gtk.h" 5 #include "views/window/window_gtk.h"
6 6
7 #include "app/gfx/path.h" 7 #include "app/gfx/path.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "base/gfx/rect.h" 9 #include "base/gfx/rect.h"
10 #include "views/widget/root_view.h" 10 #include "views/widget/root_view.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 void WindowGtk::Init(const gfx::Rect& bounds) { 342 void WindowGtk::Init(const gfx::Rect& bounds) {
343 // We call this after initializing our members since our implementations of 343 // We call this after initializing our members since our implementations of
344 // assorted WidgetWin functions may be called during initialization. 344 // assorted WidgetWin functions may be called during initialization.
345 is_modal_ = window_delegate_->IsModal(); 345 is_modal_ = window_delegate_->IsModal();
346 if (is_modal_) { 346 if (is_modal_) {
347 // TODO(erg): Fix once modality works. 347 // TODO(erg): Fix once modality works.
348 // BecomeModal(); 348 // BecomeModal();
349 } 349 }
350 350
351 WidgetGtk::Init(NULL, bounds, true); 351 WidgetGtk::Init(NULL, bounds);
352 352
353 g_signal_connect(G_OBJECT(GetNativeWindow()), "configure-event", 353 g_signal_connect(G_OBJECT(GetNativeWindow()), "configure-event",
354 G_CALLBACK(CallConfigureEvent), this); 354 G_CALLBACK(CallConfigureEvent), this);
355 g_signal_connect(G_OBJECT(GetNativeWindow()), "window-state-event", 355 g_signal_connect(G_OBJECT(GetNativeWindow()), "window-state-event",
356 G_CALLBACK(CallWindowStateEvent), this); 356 G_CALLBACK(CallWindowStateEvent), this);
357 357
358 // Create the ClientView, add it to the NonClientView and add the 358 // Create the ClientView, add it to the NonClientView and add the
359 // NonClientView to the RootView. This will cause everything to be parented. 359 // NonClientView to the RootView. This will cause everything to be parented.
360 non_client_view_->set_client_view(window_delegate_->CreateClientView(this)); 360 non_client_view_->set_client_view(window_delegate_->CreateClientView(this));
361 WidgetGtk::SetContentsView(non_client_view_); 361 WidgetGtk::SetContentsView(non_client_view_);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 } 415 }
416 416
417 void WindowGtk::SizeWindowToDefault() { 417 void WindowGtk::SizeWindowToDefault() {
418 gfx::Size size = non_client_view_->GetPreferredSize(); 418 gfx::Size size = non_client_view_->GetPreferredSize();
419 gfx::Rect bounds(size.width(), size.height()); 419 gfx::Rect bounds(size.width(), size.height());
420 SetBounds(bounds, NULL); 420 SetBounds(bounds, NULL);
421 } 421 }
422 422
423 } // namespace views 423 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698