From 3e2a47c36765bc6b67d966b9e8c281f7d7fe2aa1 Mon Sep 17 00:00:00 2001 From: "reed@reedloden.com" Date: Wed, 23 Jan 2008 23:20:44 -0800 Subject: [PATCH] Bug 407481 - "Unicode ellipsis to be used in code as well" [p=masa141421356@gmail.com (Masahiro Yamada) r=gavin a1.9=beltzner] --- browser/base/content/nsContextMenu.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js index eb4fdafa620..60d8f208ca0 100644 --- a/browser/base/content/nsContextMenu.js +++ b/browser/base/content/nsContextMenu.js @@ -83,6 +83,11 @@ function nsContextMenu(aXulMenu, aBrowser) { this.shouldDisplay = true; this.isDesignMode = false; this.possibleSpellChecking = false; + this.ellipsis = "\u2026"; + try { + this.ellipsis = gPrefService.getComplexValue("intl.ellipsis", + Ci.nsIPrefLocalizedString).data; + } catch (e) { } // Initialize new menu. this.initMenu(aXulMenu, aBrowser); @@ -249,7 +254,7 @@ nsContextMenu.prototype = { if (hostLabel) { var shortenedUriHost = hostLabel.replace(/^www\./i,""); if (shortenedUriHost.length > 15) - shortenedUriHost = shortenedUriHost.substr(0,15) + "..."; + shortenedUriHost = shortenedUriHost.substr(0,15) + this.ellipsis; blockImage.label = gNavigatorBundle.getFormattedString("blockImages", [shortenedUriHost]); if (this.isImageBlocked()) @@ -1035,7 +1040,7 @@ nsContextMenu.prototype = { return false; if (selectedText.length > 15) - selectedText = selectedText.substr(0,15) + "..."; + selectedText = selectedText.substr(0,15) + this.ellipsis; // Use the current engine if the search bar is visible, the default // engine otherwise.