diff options
-rw-r--r-- | res/layout-land/nav_screen.xml | 1 | ||||
-rw-r--r-- | res/layout/nav_screen.xml | 1 | ||||
-rw-r--r-- | res/menu/browser.xml | 5 | ||||
-rw-r--r-- | src/com/android/browser/Controller.java | 4 | ||||
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 12 |
5 files changed, 17 insertions, 6 deletions
diff --git a/res/layout-land/nav_screen.xml b/res/layout-land/nav_screen.xml index 4091573..ac70ab2 100644 --- a/res/layout-land/nav_screen.xml +++ b/res/layout-land/nav_screen.xml @@ -49,7 +49,6 @@ style="@style/BrowserButton" android:gravity="center_vertical" android:contentDescription="@string/accessibility_button_newincognitotab" - android:visibility="gone" android:src="@drawable/ic_incognito" /> <ImageButton android:id="@+id/newtab" diff --git a/res/layout/nav_screen.xml b/res/layout/nav_screen.xml index d028ea1..f296478 100644 --- a/res/layout/nav_screen.xml +++ b/res/layout/nav_screen.xml @@ -41,7 +41,6 @@ style="@style/BrowserButton" android:gravity="center_vertical" android:contentDescription="@string/accessibility_button_newincognitotab" - android:visibility="gone" android:src="@drawable/ic_incognito" /> <ImageButton android:id="@+id/newtab" diff --git a/res/menu/browser.xml b/res/menu/browser.xml index afd9565..a0a18bc 100644 --- a/res/menu/browser.xml +++ b/res/menu/browser.xml @@ -32,6 +32,11 @@ android:showAsAction="never" android:alphabeticShortcut="n" /> <item + android:id="@+id/new_incognito_tab_menu_id" + android:title="@string/new_incognito_tab" + android:icon="@drawable/ic_new_window_incognito" + android:showAsAction="never" /> + <item android:id="@+id/bookmarks_menu_id" android:title="@string/bookmarks" android:icon="@drawable/ic_bookmarks" diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index f006986..3382e36 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -1617,6 +1617,10 @@ public class Controller openTabToHomePage(); break; + case R.id.new_incognito_tab_menu_id: + openIncognitoTab(); + break; + case R.id.close_other_tabs_id: closeOtherTabs(); break; diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 6707134..d71d9ec 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -184,10 +184,14 @@ public class PhoneUi extends BaseUi { if (info != null) { info.setVisible(false); } - MenuItem newtab = menu.findItem(R.id.new_tab_menu_id); - if (newtab != null && !mUseQuickControls) { - newtab.setVisible(false); - } + MenuItem newTab = menu.findItem(R.id.new_tab_menu_id); + if (newTab != null && !mUseQuickControls) { + newTab.setVisible(false); + } + MenuItem newIncognitoTab = menu.findItem(R.id.new_incognito_tab_menu_id); + if (newIncognitoTab != null && !mUseQuickControls) { + newIncognitoTab.setVisible(false); + } MenuItem closeOthers = menu.findItem(R.id.close_other_tabs_id); if (closeOthers != null) { boolean isLastTab = true; |