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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc

Issue 9113033: GTK: More raw struct access removal, this time focusing on GtkDialog. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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 | chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/gtk/bookmarks/bookmark_bar_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 AnimationProgressed(&slide_animation_); 427 AnimationProgressed(&slide_animation_);
428 } 428 }
429 429
430 if (model_ && model_->IsLoaded()) 430 if (model_ && model_->IsLoaded())
431 UpdateOtherBookmarksVisibility(); 431 UpdateOtherBookmarksVisibility();
432 432
433 // Hide out behind the findbar. This is rather fragile code, it could 433 // Hide out behind the findbar. This is rather fragile code, it could
434 // probably be improved. 434 // probably be improved.
435 if (bookmark_bar_state_ == BookmarkBar::DETACHED) { 435 if (bookmark_bar_state_ == BookmarkBar::DETACHED) {
436 if (theme_service_->UsingNativeTheme()) { 436 if (theme_service_->UsingNativeTheme()) {
437 if (gtk_widget_get_realized(event_box_->parent)) 437 GtkWidget* parent = gtk_widget_get_parent(event_box_.get());
438 gdk_window_lower(event_box_->parent->window); 438 if (gtk_widget_get_realized(parent))
439 gdk_window_lower(gtk_widget_get_window(parent));
439 if (gtk_widget_get_realized(event_box_.get())) 440 if (gtk_widget_get_realized(event_box_.get()))
440 gdk_window_lower(event_box_->window); 441 gdk_window_lower(gtk_widget_get_window(event_box_.get()));
441 } else { // Chromium theme mode. 442 } else { // Chromium theme mode.
442 if (gtk_widget_get_realized(paint_box_)) { 443 if (gtk_widget_get_realized(paint_box_)) {
443 gdk_window_lower(paint_box_->window); 444 gdk_window_lower(gtk_widget_get_window(paint_box_));
444 // The event box won't stay below its children's GdkWindows unless we 445 // The event box won't stay below its children's GdkWindows unless we
445 // toggle the above-child property here. If the event box doesn't stay 446 // toggle the above-child property here. If the event box doesn't stay
446 // below its children then events will be routed to it rather than the 447 // below its children then events will be routed to it rather than the
447 // children. 448 // children.
448 gtk_event_box_set_above_child(GTK_EVENT_BOX(event_box_.get()), TRUE); 449 gtk_event_box_set_above_child(GTK_EVENT_BOX(event_box_.get()), TRUE);
449 gtk_event_box_set_above_child(GTK_EVENT_BOX(event_box_.get()), FALSE); 450 gtk_event_box_set_above_child(GTK_EVENT_BOX(event_box_.get()), FALSE);
450 } 451 }
451 } 452 }
452 } 453 }
453 454
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() { 1442 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() {
1442 GtkDestDefaults dest_defaults = 1443 GtkDestDefaults dest_defaults =
1443 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL : 1444 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL :
1444 GTK_DEST_DEFAULT_DROP; 1445 GTK_DEST_DEFAULT_DROP;
1445 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction); 1446 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction);
1446 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults, 1447 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults,
1447 NULL, 0, kDragAction); 1448 NULL, 0, kDragAction);
1448 ui::SetDestTargetList(overflow_button_, kDestTargetList); 1449 ui::SetDestTargetList(overflow_button_, kDestTargetList);
1449 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList); 1450 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList);
1450 } 1451 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698