[Pkg-mozext-commits] [firetray] 29/38: Fix extraction of window title (especially for ukrainian l10n).
David Prévot
taffit at moszumanska.debian.org
Mon Apr 6 15:58:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firetray.
commit a2c0d655a0373c9b2dff2a9101e2eb7ac8274405
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Wed Mar 25 02:18:53 2015 +0100
Fix extraction of window title (especially for ukrainian l10n).
---
src/modules/FiretrayWindow.jsm | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/modules/FiretrayWindow.jsm b/src/modules/FiretrayWindow.jsm
index a3fd3ed..3da2416 100644
--- a/src/modules/FiretrayWindow.jsm
+++ b/src/modules/FiretrayWindow.jsm
@@ -27,19 +27,14 @@ FiretrayWindow.prototype = {
getWindowTitle: function(wid) {
let title = firetray.Handler.windows[wid].baseWin.title;
log.debug("|baseWin.title="+title+"|");
- let tailIndex;
- tailIndex = title.indexOf(" - Mozilla "+firetray.Handler.appName);
- if (tailIndex === -1)
- tailIndex = title.indexOf(" - Nightly");
- if (tailIndex === -1)
- tailIndex = title.indexOf(" - "+firetray.Handler.appName);
-
+ // FIXME: we should be able to compute the base title from the XUL window
+ // attributes.
+ const kTailRe = " (-|\u2014) ((Mozilla )?"+firetray.Handler.appName+"|Nightly)";
+ let tailIndex = title.search(kTailRe);
if (tailIndex !== -1)
return title.substring(0, tailIndex);
- else if (title === "Mozilla "+firetray.Handler.appName)
- return title;
else
- return null;
+ return title;
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list