mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1007431 - Add menu item that links to SUMO help r=rnewman
This commit is contained in:
parent
7336fdf3c2
commit
4d4d42458d
@ -1306,8 +1306,10 @@ abstract public class BrowserApp extends GeckoApp
|
||||
ThreadUtils.postToUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (menu != null)
|
||||
if (menu != null) {
|
||||
menu.findItem(R.id.settings).setEnabled(true);
|
||||
menu.findItem(R.id.help).setEnabled(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -2282,8 +2284,10 @@ abstract public class BrowserApp extends GeckoApp
|
||||
if (aMenu == null)
|
||||
return false;
|
||||
|
||||
if (!GeckoThread.checkLaunchState(GeckoThread.LaunchState.GeckoRunning))
|
||||
if (!GeckoThread.checkLaunchState(GeckoThread.LaunchState.GeckoRunning)) {
|
||||
aMenu.findItem(R.id.settings).setEnabled(false);
|
||||
aMenu.findItem(R.id.help).setEnabled(false);
|
||||
}
|
||||
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
MenuItem bookmark = aMenu.findItem(R.id.bookmark);
|
||||
@ -2496,6 +2500,16 @@ abstract public class BrowserApp extends GeckoApp
|
||||
return true;
|
||||
}
|
||||
|
||||
if (itemId == R.id.help) {
|
||||
final String VERSION = AppConstants.MOZ_APP_VERSION;
|
||||
final String OS = AppConstants.OS_TARGET;
|
||||
final String LOCALE = BrowserLocaleManager.getLanguageTag(Locale.getDefault());
|
||||
|
||||
final String URL = getResources().getString(R.string.help_link, VERSION, OS, LOCALE);
|
||||
Tabs.getInstance().loadUrlInTab(URL);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (itemId == R.id.addons) {
|
||||
Tabs.getInstance().loadUrlInTab(AboutPages.ADDONS);
|
||||
return true;
|
||||
|
@ -229,6 +229,9 @@ size. -->
|
||||
<!ENTITY pref_update_autodownload_never "Never">
|
||||
<!ENTITY pref_update_autodownload_always "Always">
|
||||
|
||||
<!-- Localization note (help_menu) : This string is used in the main menu-->
|
||||
<!ENTITY help_menu "Help">
|
||||
|
||||
<!ENTITY quit "Quit">
|
||||
|
||||
<!ENTITY addons "Add-ons">
|
||||
|
@ -108,6 +108,9 @@
|
||||
android:icon="@drawable/ic_menu_settings"
|
||||
android:title="@string/settings" />
|
||||
|
||||
<item android:id="@+id/help"
|
||||
android:title="@string/help_menu" />
|
||||
|
||||
<item android:id="@+id/exit_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -108,6 +108,9 @@
|
||||
android:icon="@drawable/ic_menu_settings"
|
||||
android:title="@string/settings" />
|
||||
|
||||
<item android:id="@+id/help"
|
||||
android:title="@string/help_menu" />
|
||||
|
||||
<item android:id="@+id/exit_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -109,6 +109,9 @@
|
||||
android:icon="@drawable/ic_menu_settings"
|
||||
android:title="@string/settings" />
|
||||
|
||||
<item android:id="@+id/help"
|
||||
android:title="@string/help_menu" />
|
||||
|
||||
<item android:id="@+id/exit_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -59,6 +59,9 @@
|
||||
<item android:id="@+id/settings"
|
||||
android:title="@string/settings" />
|
||||
|
||||
<item android:id="@+id/help"
|
||||
android:title="@string/help_menu" />
|
||||
|
||||
<item android:id="@+id/new_guest_session"
|
||||
android:icon="@drawable/ic_menu_guest"
|
||||
android:visible="false"
|
||||
|
@ -60,6 +60,10 @@
|
||||
|
||||
<string name="url_bar_default_text">&url_bar_default_text;</string>
|
||||
|
||||
<!-- https://support.mozilla.org/1/mobile/%VERSION%/%OS%/%LOCALE%/ -->
|
||||
<string name="help_link">https://support.mozilla.org/1/mobile/&formatS1;/&formatS2;/&formatS3;/</string>
|
||||
<string name="help_menu">&help_menu;</string>
|
||||
|
||||
<string name="quit">&quit;</string>
|
||||
<string name="bookmark">&bookmark;</string>
|
||||
<string name="bookmark_added">&bookmark_added;</string>
|
||||
|
Loading…
Reference in New Issue
Block a user