diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-08 18:21:13 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-08 18:21:13 +0000 |
commit | 55fcfecae5b94e21f98227c421d7d1525d2ba41d (patch) | |
tree | fcb2e0af616f5a60e094d58cc03f5a493397ee8b /chrome/browser/gtk/bookmark_manager_gtk.h | |
parent | e662ade1be2692f710ad9dba1bafc179d29c3400 (diff) | |
download | chromium_src-55fcfecae5b94e21f98227c421d7d1525d2ba41d.zip chromium_src-55fcfecae5b94e21f98227c421d7d1525d2ba41d.tar.gz chromium_src-55fcfecae5b94e21f98227c421d7d1525d2ba41d.tar.bz2 |
GTK: More drag support for bookmark manager.
- drag into folders
- improve pre-drop highlighting
- use default drag icon instead of row bitmap for tree view row drag.
Review URL: http://codereview.chromium.org/118357
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_manager_gtk.h')
-rw-r--r-- | chrome/browser/gtk/bookmark_manager_gtk.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/chrome/browser/gtk/bookmark_manager_gtk.h b/chrome/browser/gtk/bookmark_manager_gtk.h index bb3028d..dd47091 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.h +++ b/chrome/browser/gtk/bookmark_manager_gtk.h @@ -87,9 +87,11 @@ class BookmarkManagerGtk : public BookmarkModelObserver { return gtk_tree_view_get_selection(GTK_TREE_VIEW(right_tree_view_)); } - // Use this to temporarily disable updating the right store. When this is - // called again, the right store will be updated once. - void ToggleUpdatesToRightStore(); + // Use these to temporarily disable updating the right store. You can stack + // calls to Suppress(), but they should always be matched by an equal number + // of calls to Allow(). + void SuppressUpdatesToRightStore(); + void AllowUpdatesToRightStore(); static void OnLeftSelectionChanged(GtkTreeSelection* selection, BookmarkManagerGtk* bookmark_manager); @@ -103,9 +105,21 @@ class BookmarkManagerGtk : public BookmarkModelObserver { BookmarkManagerGtk* bookmark_manager); static void OnTreeViewDragReceived( - GtkWidget* tree_view, GdkDragContext* context, gint x, gint y, - GtkSelectionData* selection_data, guint target_type, guint time, - BookmarkManagerGtk* bookmark_manager); + GtkWidget* tree_view, GdkDragContext* context, gint x, gint y, + GtkSelectionData* selection_data, guint target_type, guint time, + BookmarkManagerGtk* bookmark_manager); + + static void OnTreeViewDragBegin(GtkWidget* tree_view, + GdkDragContext* drag_context, + BookmarkManagerGtk* bookmark_manager); + + static void OnTreeViewDragEnd(GtkWidget* tree_view, + GdkDragContext* drag_context, + BookmarkManagerGtk* bookmark_manager); + + static gboolean OnTreeViewDragMotion(GtkWidget* tree_view, + GdkDragContext* context, gint x, gint y, guint time, + BookmarkManagerGtk* bookmark_manager); GtkWidget* window_; Profile* profile_; @@ -122,7 +136,7 @@ class BookmarkManagerGtk : public BookmarkModelObserver { }; GtkTreeStore* left_store_; GtkListStore* right_store_; - bool update_right_store_; + int update_suppressions_; scoped_ptr<BookmarkContextMenu> organize_menu_; }; |