Bug 777649 - Use history ID for removing items on the all pages screen. r=margaret
authorWes Johnston <wjohnston@mozilla.com>
Thu, 26 Jul 2012 12:53:19 -0700
changeset 100642 a9fcfa1a0d69c6375bb83884cbfc8417745dd85b
parent 100641 9118c1ca0aac18941014cd36532abdc5266ccc10
child 100643 4f5722507e684b705f3f96c1dc0d64f6b1c3093f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmargaret
bugs777649
milestone17.0a1
Bug 777649 - Use history ID for removing items on the all pages screen. r=margaret
mobile/android/base/awesomebar/AllPagesTab.java
mobile/android/base/awesomebar/BookmarksTab.java
--- a/mobile/android/base/awesomebar/AllPagesTab.java
+++ b/mobile/android/base/awesomebar/AllPagesTab.java
@@ -537,18 +537,18 @@ public class AllPagesTab extends Awesome
         Cursor cursor = ((AwesomeBarCursorItem) selectedItem).getCursor();
 
         // Don't show the context menu for folders
         String keyword = null;
         int keywordCol = cursor.getColumnIndex(URLColumns.KEYWORD);
         if (keywordCol != -1)
             keyword = cursor.getString(keywordCol);
 
-        // Use the bookmark id for the Bookmarks tab and the history id for the Top Sites tab 
-        int id = cursor.getInt(cursor.getColumnIndexOrThrow(Combined._ID));
+        // Use the history id in order to allow removing history entries
+        int id = cursor.getInt(cursor.getColumnIndexOrThrow(Combined.HISTORY_ID));
 
         subject = new ContextMenuSubject(id,
                                         cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL)),
                                         cursor.getBlob(cursor.getColumnIndexOrThrow(URLColumns.FAVICON)),
                                         cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE)),
                                         keyword);
 
         if (subject == null)
--- a/mobile/android/base/awesomebar/BookmarksTab.java
+++ b/mobile/android/base/awesomebar/BookmarksTab.java
@@ -409,17 +409,16 @@ public class BookmarksTab extends Awesom
 
         // Don't show the context menu for folders
         if (!(cursor.getInt(cursor.getColumnIndexOrThrow(Bookmarks.TYPE)) == Bookmarks.TYPE_FOLDER)) {
             String keyword = null;
             int keywordCol = cursor.getColumnIndex(URLColumns.KEYWORD);
             if (keywordCol != -1)
                 keyword = cursor.getString(keywordCol);
 
-            // Use the bookmark id for the Bookmarks tab and the history id for the Top Sites tab 
             int id = cursor.getInt(cursor.getColumnIndexOrThrow(Bookmarks._ID));
 
             subject = new ContextMenuSubject(id,
                                             cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL)),
                                             cursor.getBlob(cursor.getColumnIndexOrThrow(URLColumns.FAVICON)),
                                             cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE)),
                                             keyword);
         }