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

Unified Diff: chrome/browser/gtk/bookmark_editor_gtk.cc

Issue 210036: Make it possible to edit bookmark folder names inline. This (Closed)
Patch Set: comments Created 11 years, 3 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 | « no previous file | chrome/browser/gtk/bookmark_manager_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_editor_gtk.cc
diff --git a/chrome/browser/gtk/bookmark_editor_gtk.cc b/chrome/browser/gtk/bookmark_editor_gtk.cc
index 93d2c147d0bd6ed9c3f52ff9e99ff4a579191efe..1ff01973baacaf1313c48514275e143b60eef83a 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk.cc
+++ b/chrome/browser/gtk/bookmark_editor_gtk.cc
@@ -313,11 +313,11 @@ void BookmarkEditorGtk::AddNewGroup(GtkTreeIter* parent, GtkTreeIter* child) {
gtk_tree_store_append(tree_store_, child, parent);
gtk_tree_store_set(
tree_store_, child,
- bookmark_utils::FOLDER_ICON,
- GtkThemeProvider::GetFolderIcon(true),
+ bookmark_utils::FOLDER_ICON, GtkThemeProvider::GetFolderIcon(true),
bookmark_utils::FOLDER_NAME,
- l10n_util::GetStringUTF8(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME).c_str(),
+ l10n_util::GetStringUTF8(IDS_BOOMARK_EDITOR_NEW_FOLDER_NAME).c_str(),
bookmark_utils::ITEM_ID, static_cast<int64>(0),
+ bookmark_utils::IS_EDITABLE, TRUE,
-1);
}
@@ -394,6 +394,11 @@ void BookmarkEditorGtk::OnNewFolderClicked(GtkWidget* button,
GtkTreePath* path = gtk_tree_model_get_path(
GTK_TREE_MODEL(dialog->tree_store_), &new_item_iter);
gtk_tree_view_expand_to_path(GTK_TREE_VIEW(dialog->tree_view_), path);
- gtk_tree_selection_select_path(dialog->tree_selection_, path);
+
+ // Make the folder name editable.
+ gtk_tree_view_set_cursor(GTK_TREE_VIEW(dialog->tree_view_), path,
+ gtk_tree_view_get_column(GTK_TREE_VIEW(dialog->tree_view_), 0),
+ TRUE);
+
gtk_tree_path_free(path);
}
« 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