From 186e593776c396bde3d720addd6f6842fe880a7c Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Tue, 28 Jul 2009 14:14:48 -0400 Subject: In History context menu, do not show "Add bookmark" for bookmarks. Fix for http://b/issue?id=1688867. Instead of providing an option to add a bookmark to bookmarks, provide an option to remove the item from bookmarks. Also display the item as the context menu header. --- src/com/android/browser/HistoryItem.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/com/android/browser/HistoryItem.java') diff --git a/src/com/android/browser/HistoryItem.java b/src/com/android/browser/HistoryItem.java index 8a994f37e..e8f15b1c9 100644 --- a/src/com/android/browser/HistoryItem.java +++ b/src/com/android/browser/HistoryItem.java @@ -55,18 +55,25 @@ import android.widget.TextView; }; } - void copyTo(HistoryItem item) { + /* package */ void copyTo(HistoryItem item) { item.mTextView.setText(mTextView.getText()); item.mUrlText.setText(mUrlText.getText()); item.setIsBookmark(mStar.isChecked()); item.mImageView.setImageDrawable(mImageView.getDrawable()); } + /** + * Whether or not this item represents a bookmarked site + */ + /* package */ boolean isBookmark() { + return mStar.isChecked(); + } + /** * Set whether or not this represents a bookmark, and make sure the star * behaves appropriately. */ - void setIsBookmark(boolean isBookmark) { + /* package */ void setIsBookmark(boolean isBookmark) { mStar.setOnCheckedChangeListener(null); mStar.setChecked(isBookmark); mStar.setOnCheckedChangeListener(mListener); -- cgit v1.2.3