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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.cc

Issue 10451102: fix a memory leak and add a suppression (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/ui/gtk/bookmarks/bookmark_tree_model.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/gtk/bookmarks/bookmark_editor_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 // Remove the folders that were removed. This has to be done after all the 567 // Remove the folders that were removed. This has to be done after all the
568 // other changes have been committed. 568 // other changes have been committed.
569 bookmark_utils::DeleteBookmarkFolders(bb_model_, deletes_); 569 bookmark_utils::DeleteBookmarkFolders(bb_model_, deletes_);
570 } 570 }
571 571
572 void BookmarkEditorGtk::AddNewFolder(GtkTreeIter* parent, GtkTreeIter* child) { 572 void BookmarkEditorGtk::AddNewFolder(GtkTreeIter* parent, GtkTreeIter* child) {
573 gtk_tree_store_append(tree_store_, child, parent); 573 gtk_tree_store_append(tree_store_, child, parent);
574 gtk_tree_store_set( 574 gtk_tree_store_set(
575 tree_store_, child, 575 tree_store_, child,
576 bookmark_utils::FOLDER_ICON, 576 bookmark_utils::FOLDER_ICON,
577 GtkThemeService::GetFolderIcon(true)->ToGdkPixbuf(), 577 GtkThemeService::GetFolderIcon(true).ToGdkPixbuf(),
578 bookmark_utils::FOLDER_NAME, 578 bookmark_utils::FOLDER_NAME,
579 l10n_util::GetStringUTF8(IDS_BOOKMARK_EDITOR_NEW_FOLDER_NAME).c_str(), 579 l10n_util::GetStringUTF8(IDS_BOOKMARK_EDITOR_NEW_FOLDER_NAME).c_str(),
580 bookmark_utils::ITEM_ID, static_cast<int64>(0), 580 bookmark_utils::ITEM_ID, static_cast<int64>(0),
581 bookmark_utils::IS_EDITABLE, TRUE, 581 bookmark_utils::IS_EDITABLE, TRUE,
582 -1); 582 -1);
583 } 583 }
584 584
585 void BookmarkEditorGtk::OnSelectionChanged(GtkWidget* selection) { 585 void BookmarkEditorGtk::OnSelectionChanged(GtkWidget* selection) {
586 if (!gtk_tree_selection_get_selected(tree_selection_, NULL, NULL)) 586 if (!gtk_tree_selection_get_selected(tree_selection_, NULL, NULL))
587 gtk_widget_set_sensitive(new_folder_button_, FALSE); 587 gtk_widget_set_sensitive(new_folder_button_, FALSE);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 GTK_TREE_MODEL(tree_store_), &new_item_iter); 657 GTK_TREE_MODEL(tree_store_), &new_item_iter);
658 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree_view_), path); 658 gtk_tree_view_expand_to_path(GTK_TREE_VIEW(tree_view_), path);
659 659
660 // Make the folder name editable. 660 // Make the folder name editable.
661 gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view_), path, 661 gtk_tree_view_set_cursor(GTK_TREE_VIEW(tree_view_), path,
662 gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view_), 0), 662 gtk_tree_view_get_column(GTK_TREE_VIEW(tree_view_), 0),
663 TRUE); 663 TRUE);
664 664
665 gtk_tree_path_free(path); 665 gtk_tree_path_free(path);
666 } 666 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/bookmarks/bookmark_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698