Bug 806927: [PBM] Add private browsing specific menu items to the main menu. [r=mfinkle]

This commit is contained in:
Sriram Ramasubramanian 2012-11-28 11:23:54 -08:00
parent ade755940d
commit 04e4b84b1b
32 changed files with 62 additions and 29 deletions

View File

@ -1010,7 +1010,10 @@ abstract public class BrowserApp extends GeckoApp
}
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("DesktopMode:Change", args.toString()));
return true;
case R.id.private_browsing:
case R.id.new_tab:
addTab();
return true;
case R.id.new_private_tab:
Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE);
return true;
default:

View File

@ -497,9 +497,9 @@ RES_DRAWABLE_BASE = \
res/drawable/ic_menu_desktop_mode_off.xml \
res/drawable/ic_menu_desktop_mode_on.xml \
res/drawable/ic_menu_forward.png \
res/drawable/ic_menu_new_private_tab.png \
res/drawable/ic_menu_new_tab.png \
res/drawable/ic_menu_reload.png \
res/drawable/ic_menu_save_as_pdf.png \
res/drawable/ic_menu_share.png \
res/drawable/ic_menu_quit.xml \
res/drawable/ic_status_logo.png \
res/drawable/remote_tabs_off.png \
@ -576,9 +576,9 @@ RES_DRAWABLE_HDPI = \
res/drawable-hdpi/ic_menu_bookmark_add.png \
res/drawable-hdpi/ic_menu_bookmark_remove.png \
res/drawable-hdpi/ic_menu_forward.png \
res/drawable-hdpi/ic_menu_new_private_tab.png \
res/drawable-hdpi/ic_menu_new_tab.png \
res/drawable-hdpi/ic_menu_reload.png \
res/drawable-hdpi/ic_menu_save_as_pdf.png \
res/drawable-hdpi/ic_menu_share.png \
res/drawable-hdpi/ic_status_logo.png \
res/drawable-hdpi/remote_tabs_off.png \
res/drawable-hdpi/remote_tabs_on.png \
@ -643,9 +643,9 @@ RES_DRAWABLE_XHDPI = \
res/drawable-xhdpi/ic_menu_bookmark_add.png \
res/drawable-xhdpi/ic_menu_bookmark_remove.png \
res/drawable-xhdpi/ic_menu_forward.png \
res/drawable-xhdpi/ic_menu_new_private_tab.png \
res/drawable-xhdpi/ic_menu_new_tab.png \
res/drawable-xhdpi/ic_menu_reload.png \
res/drawable-xhdpi/ic_menu_save_as_pdf.png \
res/drawable-xhdpi/ic_menu_share.png \
res/drawable-xhdpi/ic_status_logo.png \
res/drawable-xhdpi/tab_new.png \
res/drawable-xhdpi/tab_close.png \
@ -685,15 +685,19 @@ RES_DRAWABLE_MDPI_V11 = \
res/drawable-mdpi-v11/ic_menu_back.png \
res/drawable-mdpi-v11/ic_menu_bookmark_add.png \
res/drawable-mdpi-v11/ic_menu_bookmark_remove.png \
res/drawable-mdpi-v11/ic_menu_close_all_tabs.png \
res/drawable-mdpi-v11/ic_menu_desktop_mode_off.png \
res/drawable-mdpi-v11/ic_menu_desktop_mode_on.png \
res/drawable-mdpi-v11/ic_menu_downloads.png \
res/drawable-mdpi-v11/ic_menu_find_in_page.png \
res/drawable-mdpi-v11/ic_menu_forward.png \
res/drawable-mdpi-v11/ic_menu_new_private_tab.png \
res/drawable-mdpi-v11/ic_menu_new_tab.png \
res/drawable-mdpi-v11/ic_menu_reload.png \
res/drawable-mdpi-v11/ic_menu_save_as_pdf.png \
res/drawable-mdpi-v11/ic_menu_settings.png \
res/drawable-mdpi-v11/ic_menu_share.png \
res/drawable-mdpi-v11/ic_menu_synced_tabs.png \
res/drawable-mdpi-v11/ic_menu_tools.png \
res/drawable-mdpi-v11/ic_menu_quit.png \
res/drawable-mdpi-v11/ic_status_logo.png \
@ -715,15 +719,19 @@ RES_DRAWABLE_HDPI_V11 = \
res/drawable-hdpi-v11/ic_menu_back.png \
res/drawable-hdpi-v11/ic_menu_bookmark_add.png \
res/drawable-hdpi-v11/ic_menu_bookmark_remove.png \
res/drawable-hdpi-v11/ic_menu_close_all_tabs.png \
res/drawable-hdpi-v11/ic_menu_desktop_mode_off.png \
res/drawable-hdpi-v11/ic_menu_desktop_mode_on.png \
res/drawable-hdpi-v11/ic_menu_downloads.png \
res/drawable-hdpi-v11/ic_menu_find_in_page.png \
res/drawable-hdpi-v11/ic_menu_forward.png \
res/drawable-hdpi-v11/ic_menu_new_private_tab.png \
res/drawable-hdpi-v11/ic_menu_new_tab.png \
res/drawable-hdpi-v11/ic_menu_reload.png \
res/drawable-hdpi-v11/ic_menu_save_as_pdf.png \
res/drawable-hdpi-v11/ic_menu_settings.png \
res/drawable-hdpi-v11/ic_menu_share.png \
res/drawable-hdpi-v11/ic_menu_synced_tabs.png \
res/drawable-hdpi-v11/ic_menu_tools.png \
res/drawable-hdpi-v11/ic_menu_quit.png \
res/drawable-hdpi-v11/ic_status_logo.png \
@ -745,15 +753,19 @@ RES_DRAWABLE_XHDPI_V11 = \
res/drawable-xhdpi-v11/ic_menu_back.png \
res/drawable-xhdpi-v11/ic_menu_bookmark_add.png \
res/drawable-xhdpi-v11/ic_menu_bookmark_remove.png \
res/drawable-xhdpi-v11/ic_menu_close_all_tabs.png \
res/drawable-xhdpi-v11/ic_menu_desktop_mode_off.png \
res/drawable-xhdpi-v11/ic_menu_desktop_mode_on.png \
res/drawable-xhdpi-v11/ic_menu_downloads.png \
res/drawable-xhdpi-v11/ic_menu_find_in_page.png \
res/drawable-xhdpi-v11/ic_menu_forward.png \
res/drawable-xhdpi-v11/ic_menu_new_private_tab.png \
res/drawable-xhdpi-v11/ic_menu_new_tab.png \
res/drawable-xhdpi-v11/ic_menu_reload.png \
res/drawable-xhdpi-v11/ic_menu_save_as_pdf.png \
res/drawable-xhdpi-v11/ic_menu_settings.png \
res/drawable-xhdpi-v11/ic_menu_share.png \
res/drawable-xhdpi-v11/ic_menu_synced_tabs.png \
res/drawable-xhdpi-v11/ic_menu_tools.png \
res/drawable-xhdpi-v11/ic_menu_quit.png \
res/drawable-xhdpi-v11/ic_status_logo.png \

View File

@ -54,7 +54,6 @@
<!ENTITY site_security "Site Security">
<!ENTITY close_tab "Close Tab">
<!ENTITY new_tab "New Tab">
<!ENTITY one_tab "1 tab">
<!-- Localization note (num_tabs2) : Number of tabs is always more than one.
We can't use android plural forms, sadly. See bug #753859. -->
@ -136,7 +135,10 @@ size. -->
<!ENTITY find_in_page "Find in Page">
<!ENTITY desktop_mode "Request Desktop Site">
<!ENTITY tools "Tools">
<!ENTITY new_pb_tab "New Private Browsing Tab">
<!ENTITY new_tab "New Tab">
<!ENTITY new_private_tab "New Private Tab">
<!ENTITY synced_tabs "Synced Tabs">
<!ENTITY close_all_tabs "Close All Tabs">
<!-- Localization note (find_text, find_prev, find_next, find_close) : These strings are used
as alternate text for accessibility. They are not visible in the UI. -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -19,6 +19,14 @@
android:icon="@drawable/ic_menu_bookmark_add"
android:title="@string/bookmark"/>
<item android:id="@+id/new_tab"
android:icon="@drawable/ic_menu_new_tab"
android:title="@string/new_tab"/>
<item android:id="@+id/new_private_tab"
android:icon="@drawable/ic_menu_new_private_tab"
android:title="@string/new_private_tab"/>
<item android:id="@+id/share"
android:icon="@drawable/ic_menu_share"
android:title="@string/share" />
@ -32,10 +40,6 @@
android:title="@string/desktop_mode"
android:checkable="true" />
<item android:id="@+id/private_browsing"
android:visible="false"
android:title="@string/new_pb_tab"/>
<item android:title="@string/tools"
android:icon="@drawable/ic_menu_tools">

View File

@ -20,6 +20,14 @@
android:title="@string/bookmark"
android:showAsAction="always"/>
<item android:id="@+id/new_tab"
android:icon="@drawable/ic_menu_new_tab"
android:title="@string/new_tab"/>
<item android:id="@+id/new_private_tab"
android:icon="@drawable/ic_menu_new_private_tab"
android:title="@string/new_private_tab"/>
<item android:id="@+id/share"
android:icon="@drawable/ic_menu_share"
android:title="@string/share" />
@ -33,10 +41,6 @@
android:title="@string/desktop_mode"
android:checkable="true" />
<item android:id="@+id/private_browsing"
android:visible="false"
android:title="@string/new_pb_tab"/>
<item android:title="@string/tools"
android:icon="@drawable/ic_menu_tools">

View File

@ -20,6 +20,14 @@
android:title="@string/bookmark"
android:showAsAction="always"/>
<item android:id="@+id/new_tab"
android:icon="@drawable/ic_menu_new_tab"
android:title="@string/new_tab"/>
<item android:id="@+id/new_private_tab"
android:icon="@drawable/ic_menu_new_private_tab"
android:title="@string/new_private_tab"/>
<item android:id="@+id/share"
android:icon="@drawable/ic_menu_share"
android:title="@string/share" />
@ -33,10 +41,6 @@
android:title="@string/desktop_mode"
android:checkable="true" />
<item android:id="@+id/private_browsing"
android:visible="false"
android:title="@string/new_pb_tab"/>
<item android:title="@string/tools"
android:icon="@drawable/ic_menu_tools">

View File

@ -17,12 +17,18 @@
android:icon="@drawable/ic_menu_bookmark_add"
android:title="@string/bookmark"/>
<item android:id="@+id/new_tab"
android:icon="@drawable/ic_menu_new_tab"
android:title="@string/new_tab"/>
<item android:id="@+id/new_private_tab"
android:icon="@drawable/ic_menu_new_private_tab"
android:title="@string/new_private_tab"/>
<item android:id="@+id/share"
android:icon="@drawable/ic_menu_share"
android:title="@string/share" />
<item android:id="@+id/save_as_pdf"
android:icon="@drawable/ic_menu_save_as_pdf"
android:title="@string/save_as_pdf" />
<item android:id="@+id/find_in_page"
@ -32,10 +38,6 @@
android:title="@string/desktop_mode"
android:checkable="true" />
<item android:id="@+id/private_browsing"
android:visible="false"
android:title="@string/new_pb_tab"/>
<item android:id="@+id/addons"
android:title="@string/addons"/>

View File

@ -131,7 +131,6 @@
<string name="stop">&stop;</string>
<string name="site_security">&site_security;</string>
<string name="close_tab">&close_tab;</string>
<string name="new_tab">&new_tab;</string>
<string name="new_tab_opened">&new_tab_opened;</string>
<string name="one_tab">&one_tab;</string>
<string name="num_tabs">&num_tabs2;</string>
@ -139,7 +138,10 @@
<string name="downloads">&downloads;</string>
<string name="apps">&apps;</string>
<string name="char_encoding">&char_encoding;</string>
<string name="new_pb_tab">&new_pb_tab;</string>
<string name="new_tab">&new_tab;</string>
<string name="new_private_tab">&new_private_tab;</string>
<string name="synced_tabs">&synced_tabs;</string>
<string name="close_all_tabs">&close_all_tabs;</string>
<!-- This string only appears in developer builds, which
is why it is not localizable. -->
<string name="toggle_profiling">Toggle Profiling</string>