diff options
author | Michael Kolb <kolby@google.com> | 2011-01-14 11:07:38 -0800 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-01-14 11:08:16 -0800 |
commit | 2dd65c8bf13b11c99c78ec22a0fef2c58494bb9e (patch) | |
tree | 506d0f4d349b4a4917dc5f44fb767b7d74ff9a8a /src/com/android/browser | |
parent | f18338a08c89467ef27e1fe3a9ac7130839b475d (diff) | |
download | packages_apps_Browser-2dd65c8bf13b11c99c78ec22a0fef2c58494bb9e.zip packages_apps_Browser-2dd65c8bf13b11c99c78ec22a0fef2c58494bb9e.tar.gz packages_apps_Browser-2dd65c8bf13b11c99c78ec22a0fef2c58494bb9e.tar.bz2 |
fix link context menus
http://b/issue?id=3351385
http://b/issue?id=3352255
remove bookmark/share link option
change open in new tab text based on open in background setting
Change-Id: I3930d085339a7f829d8ef4f1afc879b4df743f24
Diffstat (limited to 'src/com/android/browser')
-rw-r--r-- | src/com/android/browser/Controller.java | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index b79acab..fe19927 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -461,18 +461,6 @@ public class Controller parent.addChildTab(newTab); } break; - case R.id.bookmark_context_menu_id: - Intent intent = new Intent(mActivity, - AddBookmarkPage.class); - intent.putExtra(BrowserContract.Bookmarks.URL, url); - intent.putExtra(BrowserContract.Bookmarks.TITLE, - title); - mActivity.startActivity(intent); - break; - case R.id.share_link_context_menu_id: - sharePage(mActivity, title, url, null, - null); - break; case R.id.copy_link_context_menu_id: copy(url); break; @@ -1309,6 +1297,10 @@ public class Controller boolean showNewTab = mTabControl.canCreateNewTab(); MenuItem newTabItem = menu.findItem(R.id.open_newtab_context_menu_id); + newTabItem.setTitle( + BrowserSettings.getInstance().openInBackground() + ? R.string.contextmenu_openlink_newwindow_background + : R.string.contextmenu_openlink_newwindow); newTabItem.setVisible(showNewTab); if (showNewTab) { if (WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE == type) { @@ -1343,15 +1335,6 @@ public class Controller }); } } - menu.findItem(R.id.bookmark_context_menu_id).setVisible( - Bookmarks.urlHasAcceptableScheme(extra)); - PackageManager pm = mActivity.getPackageManager(); - Intent send = new Intent(Intent.ACTION_SEND); - send.setType("text/plain"); - ResolveInfo ri = pm.resolveActivity(send, - PackageManager.MATCH_DEFAULT_ONLY); - menu.findItem(R.id.share_link_context_menu_id) - .setVisible(ri != null); if (type == WebView.HitTestResult.SRC_ANCHOR_TYPE) { break; } @@ -1650,9 +1633,7 @@ public class Controller break; // -- Browser context menu case R.id.open_context_menu_id: - case R.id.bookmark_context_menu_id: case R.id.save_link_context_menu_id: - case R.id.share_link_context_menu_id: case R.id.copy_link_context_menu_id: final WebView webView = getCurrentTopWebView(); if (null == webView) { |