зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216257 - Move "Language" settting to "General" section r=rnewman
--HG-- extra : commitid : 1WLDwYGz0Xh extra : rebase_source : d85f39aeb0ebf9137ad2d3a0b5f4fe95f46dc722
This commit is contained in:
Родитель
31f8f03122
Коммит
547bebd081
|
@ -208,7 +208,6 @@
|
|||
<!ENTITY pref_header_accessibility "Accessibility">
|
||||
<!ENTITY pref_header_advanced "Advanced">
|
||||
<!ENTITY pref_header_help "Help">
|
||||
<!ENTITY pref_header_language "Language">
|
||||
<!ENTITY pref_header_vendor "&vendorShortName;">
|
||||
|
||||
<!ENTITY pref_cookies_menu "Cookies">
|
||||
|
|
|
@ -85,17 +85,13 @@ public class GeckoPreferenceFragment extends PreferenceFragment {
|
|||
* Return the title to use for this preference fragment. This allows
|
||||
* for us to redisplay this fragment in a different locale.
|
||||
*
|
||||
* We only return titles for the preference screens that are in the
|
||||
* flow for selecting a locale, and thus might need to be redisplayed.
|
||||
* We only return titles for the preference screens that are
|
||||
* launched directly, and thus might need to be redisplayed.
|
||||
*
|
||||
* This method sets the title that you see on non-multi-pane devices.
|
||||
*/
|
||||
private String getTitle() {
|
||||
final int res = getResource();
|
||||
if (res == R.xml.preferences_locale) {
|
||||
return getString(R.string.pref_category_language);
|
||||
}
|
||||
|
||||
if (res == R.xml.preferences) {
|
||||
return getString(R.string.settings_title);
|
||||
}
|
||||
|
|
|
@ -287,8 +287,8 @@ OnSharedPreferenceChangeListener
|
|||
updateActionBarTitle(R.string.settings_title);
|
||||
}
|
||||
|
||||
updateTitle(R.string.pref_header_language);
|
||||
updateBreadcrumbTitle(R.string.pref_header_language);
|
||||
// Update the title to for the preference pane that we're currently showing.
|
||||
updateTitle(R.string.pref_header_general);
|
||||
|
||||
// Don't finish the activity -- we just reloaded all of the
|
||||
// individual parts! -- but when it returns, make sure that the
|
||||
|
@ -494,12 +494,7 @@ OnSharedPreferenceChangeListener
|
|||
while (iterator.hasNext()) {
|
||||
Header header = iterator.next();
|
||||
|
||||
if (header.id == R.id.pref_header_language && !localeSwitchingIsEnabled) {
|
||||
// If locale switching is disabled, remove the section
|
||||
// entirely. This logic will need to be extended when
|
||||
// content language selection (Bug 881510) is implemented.
|
||||
iterator.remove();
|
||||
} else if (header.id == R.id.pref_header_advanced && !RestrictedProfiles.isAllowed(this, Restriction.DISALLOW_DEVELOPER_TOOLS)) {
|
||||
if (header.id == R.id.pref_header_advanced && !RestrictedProfiles.isAllowed(this, Restriction.DISALLOW_DEVELOPER_TOOLS)) {
|
||||
iterator.remove();
|
||||
} else if (header.id == R.id.pref_header_accessibility && !RestrictedProfiles.isAllowed(this, Restriction.DISALLOW_DISPLAY_SETTINGS)) {
|
||||
iterator.remove();
|
||||
|
|
|
@ -42,13 +42,6 @@
|
|||
android:value="preferences_advanced"/>
|
||||
</header>
|
||||
|
||||
<header android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:title="@string/pref_header_language"
|
||||
android:id="@+id/pref_header_language">
|
||||
<extra android:name="resource"
|
||||
android:value="preferences_locale" />
|
||||
</header>
|
||||
|
||||
<header android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:title="@string/pref_header_vendor">
|
||||
<extra android:name="resource"
|
||||
|
|
|
@ -55,13 +55,6 @@
|
|||
android:value="preferences_advanced"/>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_language"
|
||||
android:summary="@string/pref_category_language_summary"
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment" >
|
||||
<extra android:name="resource"
|
||||
android:value="preferences_locale" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_vendor"
|
||||
android:summary="@string/pref_category_vendor_summary"
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment" >
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
android:value="preferences_home" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_language"
|
||||
android:summary="@string/pref_category_language_summary"
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment" >
|
||||
<extra android:name="resource"
|
||||
android:value="preferences_locale" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<ListPreference android:key="android.not_a_preference.restoreSession3"
|
||||
android:title="@string/pref_restore"
|
||||
android:defaultValue="quit"
|
||||
|
|
|
@ -24,6 +24,13 @@
|
|||
android:value="preferences_home" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_language"
|
||||
android:summary="@string/pref_category_language_summary"
|
||||
android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment" >
|
||||
<extra android:name="resource"
|
||||
android:value="preferences_locale" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<ListPreference android:key="android.not_a_preference.restoreSession3"
|
||||
android:title="@string/pref_restore"
|
||||
android:defaultValue="quit"
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
<header android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:id="@+id/pref_header_search">
|
||||
</header>
|
||||
<header android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:id="@+id/pref_header_language">
|
||||
</header>
|
||||
<header android:fragment="org.mozilla.gecko.preferences.GeckoPreferenceFragment"
|
||||
android:id="@+id/pref_header_advanced">
|
||||
</header>
|
||||
|
|
|
@ -74,17 +74,6 @@
|
|||
</intent>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_language"
|
||||
android:summary="@string/pref_category_language_summary" >
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:targetPackage="@string/android_package_name"
|
||||
android:targetClass="org.mozilla.gecko.preferences.GeckoPreferences" >
|
||||
<extra
|
||||
android:name="resource"
|
||||
android:value="preferences_locale" />
|
||||
</intent>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_vendor"
|
||||
android:summary="@string/pref_category_vendor_summary" >
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
|
|
|
@ -20,6 +20,17 @@
|
|||
</intent>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/pref_category_language"
|
||||
android:summary="@string/pref_category_language_summary" >
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:targetPackage="@string/android_package_name"
|
||||
android:targetClass="org.mozilla.gecko.preferences.GeckoPreferences" >
|
||||
<extra
|
||||
android:name="resource"
|
||||
android:value="preferences_locale" />
|
||||
</intent>
|
||||
</PreferenceScreen>
|
||||
|
||||
<ListPreference android:key="android.not_a_preference.restoreSession3"
|
||||
android:title="@string/pref_restore"
|
||||
android:defaultValue="quit"
|
||||
|
|
|
@ -193,7 +193,6 @@
|
|||
<string name="pref_header_accessibility">&pref_header_accessibility;</string>
|
||||
<string name="pref_header_privacy_short">&pref_header_privacy_short;</string>
|
||||
<string name="pref_header_advanced">&pref_header_advanced;</string>
|
||||
<string name="pref_header_language">&pref_header_language;</string>
|
||||
<string name="pref_header_vendor">&pref_header_vendor;</string>
|
||||
|
||||
<string name="pref_learn_more">&pref_learn_more;</string>
|
||||
|
|
Загрузка…
Ссылка в новой задаче