summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserBookmarksPage.java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2009-05-28 17:27:38 -0400
committerLeon Scroggins <scroggo@google.com>2009-05-28 17:27:38 -0400
commitfeb941d4be5daaf439f6b463f423618caee15892 (patch)
tree11bc56f8f70cf3ba6f8be57b4a6422097bb10b24 /src/com/android/browser/BrowserBookmarksPage.java
parent7bfa63b55644fbf2da1fe6a24b3be0267529202c (diff)
downloadpackages_apps_Browser-feb941d4be5daaf439f6b463f423618caee15892.zip
packages_apps_Browser-feb941d4be5daaf439f6b463f423618caee15892.tar.gz
packages_apps_Browser-feb941d4be5daaf439f6b463f423618caee15892.tar.bz2
Enable setting home page from bookmarks/history.
Fix for issue 1482954: Longpress on bookmark or history should set homepage [1/1]. Add a string for set homepage. Add the option in both the context menu for the browser history and for browser bookmarks. In BrowserHistoryPage and BrowserBookmarksPage handle the new option by setting the new homepage.
Diffstat (limited to 'src/com/android/browser/BrowserBookmarksPage.java')
-rw-r--r--src/com/android/browser/BrowserBookmarksPage.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index dd34c14..45fca87 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -44,6 +44,7 @@ import android.view.ViewGroup;
import android.view.ContextMenu.ContextMenuInfo;
import android.widget.AdapterView;
import android.widget.ListView;
+import android.widget.Toast;
/**
* View showing the user's bookmarks in the browser.
@@ -107,7 +108,13 @@ public class BrowserBookmarksPage extends Activity implements
break;
case R.id.copy_url_context_menu_id:
copy(getUrl(i.position));
-
+ break;
+ case R.id.homepage_context_menu_id:
+ BrowserSettings.getInstance().setHomePage(this,
+ getUrl(i.position));
+ Toast.makeText(this, R.string.homepage_set,
+ Toast.LENGTH_LONG).show();
+ break;
default:
return super.onContextItemSelected(item);
}