зеркало из https://github.com/mozilla/gecko-dev.git
Bug 844816: Remove context menu entries for new tab/private tab in Awesomebar. [r=mfinkle]
--HG-- extra : rebase_source : c55e1377ddbdc05e79da880f6a3efc35214cb81a
This commit is contained in:
Родитель
51c38ab12f
Коммит
9df2921828
|
@ -542,25 +542,6 @@ public class AwesomeBar extends GeckoActivity {
|
|||
final int display = mContextMenuSubject.display;
|
||||
|
||||
switch (item.getItemId()) {
|
||||
case R.id.open_new_tab:
|
||||
case R.id.open_private_tab: {
|
||||
if (url == null) {
|
||||
Log.e(LOGTAG, "Can't open in new tab because URL is null");
|
||||
break;
|
||||
}
|
||||
|
||||
String newTabUrl = url;
|
||||
if (display == Combined.DISPLAY_READER)
|
||||
newTabUrl = ReaderModeUtils.getAboutReaderForUrl(url, true);
|
||||
|
||||
int flags = Tabs.LOADURL_NEW_TAB;
|
||||
if (item.getItemId() == R.id.open_private_tab)
|
||||
flags |= Tabs.LOADURL_PRIVATE;
|
||||
|
||||
Tabs.getInstance().loadUrl(newTabUrl, flags);
|
||||
Toast.makeText(this, R.string.new_tab_opened, Toast.LENGTH_SHORT).show();
|
||||
break;
|
||||
}
|
||||
case R.id.open_in_reader: {
|
||||
if (url == null) {
|
||||
Log.e(LOGTAG, "Can't open in reader mode because URL is null");
|
||||
|
|
|
@ -5,12 +5,6 @@
|
|||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:id="@+id/open_new_tab"
|
||||
android:title="@string/contextmenu_open_new_tab"/>
|
||||
|
||||
<item android:id="@+id/open_private_tab"
|
||||
android:title="@string/contextmenu_open_private_tab"/>
|
||||
|
||||
<item android:id="@+id/open_in_reader"
|
||||
android:title="@string/contextmenu_open_in_reader"/>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче