diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 02:48:11 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 02:48:11 +0000 |
commit | 73aa3d5158bd806b249e6724e2b2c87d88fd62fb (patch) | |
tree | 640151f8be51c826b7248ea72974b5aa4e867550 /chrome | |
parent | ce1f48ec9ba4c877a8144b9734c478d9e0d0d951 (diff) | |
download | chromium_src-73aa3d5158bd806b249e6724e2b2c87d88fd62fb.zip chromium_src-73aa3d5158bd806b249e6724e2b2c87d88fd62fb.tar.gz chromium_src-73aa3d5158bd806b249e6724e2b2c87d88fd62fb.tar.bz2 |
Fix Gtk TableModel adapters always appending or prepending.
TEST=Open bookmark manager, drag bookmarks around.
Review URL: http://codereview.chromium.org/147059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19096 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/bookmark_manager_gtk.cc | 8 | ||||
-rw-r--r-- | chrome/browser/gtk/options/url_picker_dialog_gtk.cc | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc index d35b586..66ddf38 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.cc +++ b/chrome/browser/gtk/bookmark_manager_gtk.cc @@ -618,12 +618,12 @@ void BookmarkManagerGtk::SetRightSideColumnValues(int row, GtkTreeIter* iter) { void BookmarkManagerGtk::AddNodeToRightStore(int row) { GtkTreeIter iter; if (row == 0) { - gtk_tree_model_get_iter_first(GTK_TREE_MODEL(right_store_), &iter); gtk_list_store_prepend(right_store_, &iter); } else { - gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(right_store_), &iter, NULL, - row - 1); - gtk_list_store_append(right_store_, &iter); + GtkTreeIter sibling; + gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(right_store_), &sibling, + NULL, row - 1); + gtk_list_store_insert_after(right_store_, &iter, &sibling); } SetRightSideColumnValues(row, &iter); diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc index 71091c0..7042853 100644 --- a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc +++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc @@ -236,12 +236,12 @@ void UrlPickerDialogGtk::SetColumnValues(int row, GtkTreeIter* iter) { void UrlPickerDialogGtk::AddNodeToList(int row) { GtkTreeIter iter; if (row == 0) { - gtk_tree_model_get_iter_first(GTK_TREE_MODEL(history_list_store_), &iter); gtk_list_store_prepend(history_list_store_, &iter); } else { - gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(history_list_store_), &iter, + GtkTreeIter sibling; + gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(history_list_store_), &sibling, NULL, row - 1); - gtk_list_store_append(history_list_store_, &iter); + gtk_list_store_insert_after(history_list_store_, &iter, &sibling); } SetColumnValues(row, &iter); |