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

Unified Diff: chrome/browser/gtk/bookmark_tree_model.h

Issue 118150: Linux bookmark manager first cut. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 1 more file Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/bookmark_manager_gtk.cc ('k') | chrome/browser/gtk/bookmark_tree_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_tree_model.h
===================================================================
--- chrome/browser/gtk/bookmark_tree_model.h (revision 17462)
+++ chrome/browser/gtk/bookmark_tree_model.h (working copy)
@@ -13,17 +13,31 @@
typedef struct _GtkTreeIter GtkTreeIter;
typedef struct _GtkTreeModel GtkTreeModel;
typedef struct _GtkTreeStore GtkTreeStore;
+typedef struct _GdkPixbuf GdkPixbuf;
namespace bookmark_utils {
-// Copies the tree of folders from the BookmarkModel into a GtkTreeStore. We
+enum FolderTreeStoreColumns {
+ FOLDER_ICON,
+ FOLDER_NAME,
+ ITEM_ID,
+ FOLDER_STORE_NUM_COLUMNS
+};
+
+// Make a tree store that has two columns: name and id.
+GtkTreeStore* MakeFolderTreeStore();
+
+// Copies the tree of folders rooted at |node| into a GtkTreeStore. We
// want the user to be able to modify the tree of folders, but to be able to
// click Cancel and discard their modifications. |selected_id| is the
// node->id() of the BookmarkNode that should selected on
// node->screen. |selected_iter| is an out value that points to the
// node->representation of the node associated with |selected_id| in |store|.
-void BuildTreeStoreFrom(BookmarkModel* model, int selected_id,
- GtkTreeStore** store, GtkTreeIter* selected_iter);
+// |recursive| indicates whether to recurse into sub-directories (if false,
+// the tree store will effectively be a list). |only_folders| indicates whether
+// to include bookmarks in the tree, or to only show folders.
+void AddToTreeStore(BookmarkModel* model, int selected_id,
+ GtkTreeStore* store, GtkTreeIter* selected_iter);
// Commits changes to a GtkTreeStore built from BuildTreeStoreFrom() back
// into the BookmarkModel it was generated from. Returns the BookmarkNode that
@@ -38,6 +52,12 @@
// Returns the title field of the row pointed to by |iter|.
std::wstring GetTitleFromTreeIter(GtkTreeModel* model, GtkTreeIter* iter);
+// Get a pointer to the folder icon. The returned pointer should not be freed.
+GdkPixbuf* GetFolderIcon();
+
+// As above.
+GdkPixbuf* GetDefaultFavicon();
+
} // namespace bookmark_utils
#endif // CHROME_BROWSER_GTK_BOOKMARK_TREE_MODEL_H_
« no previous file with comments | « chrome/browser/gtk/bookmark_manager_gtk.cc ('k') | chrome/browser/gtk/bookmark_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698