Bug 969831 - Use the new feature level check for desktop browser 'switch to metro' ux elements. r=msamuel

This commit is contained in:
Jim Mathies 2014-02-28 07:37:31 -06:00
parent 5c647f1701
commit 01c1a6f6fd
4 changed files with 5 additions and 5 deletions

View File

@ -831,7 +831,7 @@ const CustomizableWidgets = [{
#ifdef XP_WIN
#ifdef MOZ_METRO
if (Services.sysinfo.getProperty("hasWindowsTouchInterface")) {
if (Services.metro && Services.metro.supported) {
let widgetArgs = {tooltiptext: "switch-to-metro-button2.tooltiptext"};
let brandShortName = BrandBundle.GetStringFromName("brandShortName");
let metroTooltip = CustomizableUI.getLocalizedProperty(widgetArgs, "tooltiptext",

View File

@ -1692,7 +1692,7 @@ BrowserGlue.prototype = {
},
};
if (Services.sysinfo.getProperty("hasWindowsTouchInterface")) {
if (Services.metro && Services.metro.supported) {
smartBookmarks.Windows8Touch = {
title: bundle.GetStringFromName("windows8TouchTitle"),
uri: NetUtil.newURI("place:folder=" +

View File

@ -63,10 +63,10 @@ let (XULAppInfo = {
}
// Smart bookmarks constants.
let isWin8OrHigher = Services.sysinfo.getProperty("hasWindowsTouchInterface");
let isMetroSupported = Services.metro && Services.metro.supported;
const SMART_BOOKMARKS_VERSION = 6
const SMART_BOOKMARKS_ON_TOOLBAR = 1;
const SMART_BOOKMARKS_ON_MENU = isWin8OrHigher ? 4 : 3; // Takes in count the additional separator.
const SMART_BOOKMARKS_ON_MENU = isMetroSupported ? 4 : 3; // Takes in count the additional separator.
// Default bookmarks constants.
const DEFAULT_BOOKMARKS_ON_TOOLBAR = 1;

View File

@ -77,7 +77,7 @@ XPCOMUtils.defineLazyGetter(this, "DEFAULT_AREA_PLACEMENTS", function() {
result["PanelUI-contents"].push("characterencoding-button");
}
if (Services.sysinfo.getProperty("hasWindowsTouchInterface")) {
if (Services.metro && Services.metro.supported) {
result["PanelUI-contents"].push("switch-to-metro-button");
}