summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/bookmark_tree_model.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 22:28:44 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-16 22:28:44 +0000
commitec12ffe60e6d1e26833fb5c518fd6c85ab0c12bb (patch)
treec5f53581aa406dc819f4a758abc1e794099fa29b /chrome/browser/gtk/bookmark_tree_model.cc
parent54fe13676dcdfa8a711b0ffd9a9d96a194da834d (diff)
downloadchromium_src-ec12ffe60e6d1e26833fb5c518fd6c85ab0c12bb.zip
chromium_src-ec12ffe60e6d1e26833fb5c518fd6c85ab0c12bb.tar.gz
chromium_src-ec12ffe60e6d1e26833fb5c518fd6c85ab0c12bb.tar.bz2
Makes canceling 'bookmark all tabs' delete the folder. Or rather,
makes it so that bookmark all tabs only creates the folder if the user presses ok. I wasn't happy adding another random arg to BookmarkEditor::Show, so I added in a structure an enum. This makes it clearer what Show should do. I also fixed the following: . On gtk we wouldn't always pick the right parent for nodes. . The context menu item is now enabled on views/gtk. And this now breaks the mac side. I'll straighten that out right after landing this. BUG=24367 TEST=Make sure 'bookmark all tabs' works, as well as the bookmark editor work. (get to the bookmark editor by creating a new bookmark, then clicking edit, or right clicking a bookmark on the bookmark bar and choosing edit). Review URL: http://codereview.chromium.org/271115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_tree_model.cc')
-rw-r--r--chrome/browser/gtk/bookmark_tree_model.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/gtk/bookmark_tree_model.cc b/chrome/browser/gtk/bookmark_tree_model.cc
index e8e52ca..3c23740 100644
--- a/chrome/browser/gtk/bookmark_tree_model.cc
+++ b/chrome/browser/gtk/bookmark_tree_model.cc
@@ -98,12 +98,11 @@ GtkTreeStore* MakeFolderTreeStore() {
}
void AddToTreeStore(BookmarkModel* model, int64 selected_id,
- const BookmarkNode* node_to_ignore, GtkTreeStore* store,
- GtkTreeIter* selected_iter) {
+ GtkTreeStore* store, GtkTreeIter* selected_iter) {
const BookmarkNode* root_node = model->root_node();
for (int i = 0; i < root_node->GetChildCount(); ++i) {
- AddToTreeStoreAt(root_node->GetChild(i), selected_id, node_to_ignore, store,
- selected_iter, NULL);
+ AddToTreeStoreAt(root_node->GetChild(i), selected_id, store, selected_iter,
+ NULL);
}
}
@@ -138,9 +137,9 @@ GtkCellRenderer* GetCellRendererText(GtkTreeView* tree_view) {
}
void AddToTreeStoreAt(const BookmarkNode* node, int64 selected_id,
- const BookmarkNode* node_to_ignore, GtkTreeStore* store,
- GtkTreeIter* selected_iter, GtkTreeIter* parent) {
- if (!node->is_folder() || node == node_to_ignore)
+ GtkTreeStore* store, GtkTreeIter* selected_iter,
+ GtkTreeIter* parent) {
+ if (!node->is_folder())
return;
GtkTreeIter iter;
@@ -153,8 +152,8 @@ void AddToTreeStoreAt(const BookmarkNode* node, int64 selected_id,
}
for (int i = 0; i < node->GetChildCount(); ++i) {
- AddToTreeStoreAt(node->GetChild(i), selected_id, node_to_ignore, store,
- selected_iter, &iter);
+ AddToTreeStoreAt(node->GetChild(i), selected_id, store, selected_iter,
+ &iter);
}
}