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

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

Issue 126163: Bookmark dragging cleanup.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_manager_gtk.h » ('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) 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 "chrome/browser/gtk/bookmark_bar_gtk.h" 5 #include "chrome/browser/gtk/bookmark_bar_gtk.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/gfx/gtk_util.h" 10 #include "base/gfx/gtk_util.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 gtk_drag_set_icon_widget(drag_context, window, x, y); 625 gtk_drag_set_icon_widget(drag_context, window, x, y);
626 626
627 // Hide our node. 627 // Hide our node.
628 gtk_widget_hide(button); 628 gtk_widget_hide(button);
629 } 629 }
630 630
631 // static 631 // static
632 void BookmarkBarGtk::OnButtonDragEnd(GtkWidget* button, 632 void BookmarkBarGtk::OnButtonDragEnd(GtkWidget* button,
633 GdkDragContext* drag_context, 633 GdkDragContext* drag_context,
634 BookmarkBarGtk* bar) { 634 BookmarkBarGtk* bar) {
635 gtk_widget_show(button);
636
635 if (bar->toolbar_drop_item_) { 637 if (bar->toolbar_drop_item_) {
636 g_object_unref(bar->toolbar_drop_item_); 638 g_object_unref(bar->toolbar_drop_item_);
637 bar->toolbar_drop_item_ = NULL; 639 bar->toolbar_drop_item_ = NULL;
638 } 640 }
639 641
640 DCHECK(bar->dragged_node_); 642 DCHECK(bar->dragged_node_);
641 bar->dragged_node_ = NULL; 643 bar->dragged_node_ = NULL;
644
645 g_object_unref(button->parent);
642 } 646 }
643 647
644 // static 648 // static
645 void BookmarkBarGtk::OnButtonDragGet(GtkWidget* widget, GdkDragContext* context, 649 void BookmarkBarGtk::OnButtonDragGet(GtkWidget* widget, GdkDragContext* context,
646 GtkSelectionData* selection_data, 650 GtkSelectionData* selection_data,
647 guint target_type, guint time, 651 guint target_type, guint time,
648 BookmarkBarGtk* bar) { 652 BookmarkBarGtk* bar) {
649 BookmarkNode* node = 653 BookmarkNode* node =
650 reinterpret_cast<BookmarkNode*>( 654 reinterpret_cast<BookmarkNode*>(
651 g_object_get_data(G_OBJECT(widget), kBookmarkNode)); 655 g_object_get_data(G_OBJECT(widget), kBookmarkNode));
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 bar->InitBackground(); 806 bar->InitBackground();
803 gfx::Point tabstrip_origin = 807 gfx::Point tabstrip_origin =
804 bar->window_->tabstrip()->GetTabStripOriginForWidget(widget); 808 bar->window_->tabstrip()->GetTabStripOriginForWidget(widget);
805 bar->background_ninebox_->RenderTopCenterStrip( 809 bar->background_ninebox_->RenderTopCenterStrip(
806 cr, tabstrip_origin.x(), tabstrip_origin.y(), 810 cr, tabstrip_origin.x(), tabstrip_origin.y(),
807 event->area.x + event->area.width - tabstrip_origin.x()); 811 event->area.x + event->area.width - tabstrip_origin.x());
808 cairo_destroy(cr); 812 cairo_destroy(cr);
809 813
810 return FALSE; // Propagate expose to children. 814 return FALSE; // Propagate expose to children.
811 } 815 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_manager_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698