mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 463253 - Application name displayed in title bar; r=mconnor
This commit is contained in:
parent
33a6e0cc53
commit
e4f3e7f491
@ -6911,16 +6911,10 @@ let gPrivateBrowsingUI = {
|
|||||||
if (!this._privateBrowsingAutoStarted) {
|
if (!this._privateBrowsingAutoStarted) {
|
||||||
// Adjust the window's title
|
// Adjust the window's title
|
||||||
let docElement = document.documentElement;
|
let docElement = document.documentElement;
|
||||||
#ifdef XP_MACOSX // see bug 411929 comment 38 for the reason behind this
|
|
||||||
docElement.setAttribute("titlemodifier",
|
|
||||||
docElement.getAttribute("titlemodifier_privatebrowsing"));
|
|
||||||
docElement.setAttribute("titledefault", "");
|
|
||||||
#else
|
|
||||||
docElement.setAttribute("title",
|
docElement.setAttribute("title",
|
||||||
docElement.getAttribute("title_privatebrowsing"));
|
docElement.getAttribute("title_privatebrowsing"));
|
||||||
docElement.setAttribute("titlemodifier",
|
docElement.setAttribute("titlemodifier",
|
||||||
docElement.getAttribute("titlemodifier_privatebrowsing"));
|
docElement.getAttribute("titlemodifier_privatebrowsing"));
|
||||||
#endif
|
|
||||||
docElement.setAttribute("browsingmode", "private");
|
docElement.setAttribute("browsingmode", "private");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -6945,16 +6939,10 @@ let gPrivateBrowsingUI = {
|
|||||||
if (!this._privateBrowsingAutoStarted) {
|
if (!this._privateBrowsingAutoStarted) {
|
||||||
// Adjust the window's title
|
// Adjust the window's title
|
||||||
let docElement = document.documentElement;
|
let docElement = document.documentElement;
|
||||||
#ifdef XP_MACOSX // see bug 411929 comment 38 for the reason behind this
|
|
||||||
docElement.setAttribute("titlemodifier", "");
|
|
||||||
docElement.setAttribute("titledefault",
|
|
||||||
docElement.getAttribute("titlemodifier_normal"));
|
|
||||||
#else
|
|
||||||
docElement.setAttribute("title",
|
docElement.setAttribute("title",
|
||||||
docElement.getAttribute("title_normal"));
|
docElement.getAttribute("title_normal"));
|
||||||
docElement.setAttribute("titlemodifier",
|
docElement.setAttribute("titlemodifier",
|
||||||
docElement.getAttribute("titlemodifier_normal"));
|
docElement.getAttribute("titlemodifier_normal"));
|
||||||
#endif
|
|
||||||
docElement.setAttribute("browsingmode", "normal");
|
docElement.setAttribute("browsingmode", "normal");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
# Dean Tessman <dean_tessman@hotmail.com>
|
# Dean Tessman <dean_tessman@hotmail.com>
|
||||||
# Johnathan Nightingale <johnath@mozilla.com>
|
# Johnathan Nightingale <johnath@mozilla.com>
|
||||||
# Dão Gottwald <dao@mozilla.com>
|
# Dão Gottwald <dao@mozilla.com>
|
||||||
|
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||||
#
|
#
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
# Alternatively, the contents of this file may be used under the terms of
|
||||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
@ -67,10 +68,18 @@
|
|||||||
onload="BrowserStartup()" onunload="BrowserShutdown()" onclose="return WindowIsClosing();"
|
onload="BrowserStartup()" onunload="BrowserShutdown()" onclose="return WindowIsClosing();"
|
||||||
title="&mainWindow.title;"
|
title="&mainWindow.title;"
|
||||||
title_normal="&mainWindow.title;"
|
title_normal="&mainWindow.title;"
|
||||||
title_privatebrowsing="&mainWindowPrivateBrowsing.titlemodifier;"
|
#ifdef XP_MACOSX
|
||||||
|
title_privatebrowsing="&mainWindow.title;&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
|
||||||
|
titledefault="&mainWindow.title;"
|
||||||
|
titlemodifier=""
|
||||||
|
titlemodifier_normal=""
|
||||||
|
titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
|
||||||
|
#else
|
||||||
|
title_privatebrowsing="&mainWindow.titlemodifierPrivateBrowsing;"
|
||||||
titlemodifier="&mainWindow.titlemodifier;"
|
titlemodifier="&mainWindow.titlemodifier;"
|
||||||
titlemodifier_normal="&mainWindow.titlemodifier;"
|
titlemodifier_normal="&mainWindow.titlemodifier;"
|
||||||
titlemodifier_privatebrowsing="&mainWindowPrivateBrowsing.titlemodifier;"
|
titlemodifier_privatebrowsing="&mainWindow.titlemodifierPrivateBrowsing;"
|
||||||
|
#endif
|
||||||
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
|
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
|
||||||
windowtype="navigator:browser"
|
windowtype="navigator:browser"
|
||||||
screenX="4" screenY="4"
|
screenX="4" screenY="4"
|
||||||
|
@ -49,7 +49,11 @@
|
|||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
|
#ifdef XP_MACOSX
|
||||||
|
<title></title>
|
||||||
|
#else
|
||||||
<title>&privatebrowsingpage.tabtitle;</title>
|
<title>&privatebrowsingpage.tabtitle;</title>
|
||||||
|
#endif
|
||||||
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
|
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
|
||||||
<link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
|
<link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
|
||||||
<link rel="icon" type="image/png" href="chrome://browser/skin/Privacy-16.png"/>
|
<link rel="icon" type="image/png" href="chrome://browser/skin/Privacy-16.png"/>
|
||||||
|
@ -56,11 +56,10 @@ function test() {
|
|||||||
getService(Ci.nsIObserverService);
|
getService(Ci.nsIObserverService);
|
||||||
os.addObserver(observer, "private-browsing", false);
|
os.addObserver(observer, "private-browsing", false);
|
||||||
let pbMenuItem = document.getElementById("privateBrowsingItem");
|
let pbMenuItem = document.getElementById("privateBrowsingItem");
|
||||||
// add a new blank tab to ensure the title
|
// add a new blank tab to ensure the title can be meaningfully compared later
|
||||||
let blankTab = gBrowser.addTab();
|
let blankTab = gBrowser.addTab();
|
||||||
gBrowser.selectedTab = blankTab;
|
gBrowser.selectedTab = blankTab;
|
||||||
let originalTitle = document.title;
|
let originalTitle = document.title;
|
||||||
let privateBrowsingTitle = document.documentElement.getAttribute("titlemodifier_privatebrowsing");
|
|
||||||
|
|
||||||
// test the gPrivateBrowsingUI object
|
// test the gPrivateBrowsingUI object
|
||||||
ok(gPrivateBrowsingUI, "The gPrivateBrowsingUI object exists");
|
ok(gPrivateBrowsingUI, "The gPrivateBrowsingUI object exists");
|
||||||
@ -83,7 +82,7 @@ function test() {
|
|||||||
// check to see if the Private Browsing mode was activated successfully
|
// check to see if the Private Browsing mode was activated successfully
|
||||||
is(observer.data, "enter", "Private Browsing mode was activated using the command object");
|
is(observer.data, "enter", "Private Browsing mode was activated using the command object");
|
||||||
// check to see that the window title has been changed correctly
|
// check to see that the window title has been changed correctly
|
||||||
is(document.title, privateBrowsingTitle, "Private browsing mode has correctly changed the title");
|
isnot(document.title, originalTitle, "Private browsing mode has correctly changed the title");
|
||||||
func.call(cmd);
|
func.call(cmd);
|
||||||
// check to see if the Private Browsing mode was deactivated successfully
|
// check to see if the Private Browsing mode was deactivated successfully
|
||||||
is(observer.data, "exit", "Private Browsing mode was deactivated using the command object");
|
is(observer.data, "exit", "Private Browsing mode was deactivated using the command object");
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
<!ENTITY mainWindow.titlemodifier "&brandFullName;">
|
<!ENTITY mainWindow.titlemodifier "&brandFullName;">
|
||||||
<!-- LOCALIZATION NOTE (mainWindow.titlemodifiermenuseparator): DONT_TRANSLATE -->
|
<!-- LOCALIZATION NOTE (mainWindow.titlemodifiermenuseparator): DONT_TRANSLATE -->
|
||||||
<!ENTITY mainWindow.titlemodifiermenuseparator " - ">
|
<!ENTITY mainWindow.titlemodifiermenuseparator " - ">
|
||||||
<!-- LOCALIZATION NOTE (mainWindowPrivateBrowsing.titlemodifier): This will be appended to the window's title
|
<!-- LOCALIZATION NOTE (mainWindow.titlePrivateBrowsingSuffix): This will be appended to the window's title
|
||||||
inside the private browsing mode -->
|
inside the private browsing mode -->
|
||||||
<!ENTITY mainWindowPrivateBrowsing.titlemodifier "&mainWindow.titlemodifier; (Private Browsing)">
|
<!ENTITY mainWindow.titlePrivateBrowsingSuffix "(Private Browsing)">
|
||||||
|
<!-- LOCALIZATION NOTE (mainWindowPrivateBrowsing.titlemodifier): DONT_TRANSLATE -->
|
||||||
|
<!ENTITY mainWindow.titlemodifierPrivateBrowsing "&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;">
|
||||||
|
|
||||||
<!ENTITY tabCmd.label "New Tab">
|
<!ENTITY tabCmd.label "New Tab">
|
||||||
<!ENTITY tabCmd.accesskey "T">
|
<!ENTITY tabCmd.accesskey "T">
|
||||||
|
Loading…
Reference in New Issue
Block a user