diff --git a/js/lib/utils.js b/js/lib/utils.js --- a/js/lib/utils.js +++ b/js/lib/utils.js @@ -519,16 +519,30 @@ const nsIWindowMediator = Components.interfaces.nsIWindowMediator; var windowManager = Components.classes[MEDIATOR_CONTRACTID].getService(nsIWindowMediator); return windowManager.getMostRecentWindow(windowType); } +function toOpenWindowByType(inType, url, features) +{ + var topWindow = getWindowByType(inType); + + if (typeof features == "undefined") + features = "chrome,extrachrome,menubar,resizable," + + "scrollbars,status,toolbar"; + + if (topWindow) + topWindow.focus(); + else + window.open(url, "_blank", features); +} + function renameProperty (obj, oldname, newname) { if (oldname == newname) return; obj[newname] = obj[oldname]; delete obj[oldname]; diff --git a/locales/en-US/chrome/chatzilla.properties b/locales/en-US/chrome/chatzilla.properties --- a/locales/en-US/chrome/chatzilla.properties +++ b/locales/en-US/chrome/chatzilla.properties @@ -75,16 +75,23 @@ # # All localised strings may contain certain entities for branding purposes. # The three standard brand entities (brandShortName, brandFullName, vendorName) # can all be used like this: # foo.bar = Some text used in &brandFullName;! # ### End of notes ### +cmd.add-ons.label = Add-ons +cmd.add-ons.help = +cmd.jsconsole.label = JavaScript Console +cmd.jsconsole.help = +cmd.about-config.label = Advanced Configuration +cmd.about-config.help = + cmd.about.label = About ChatZilla cmd.about.help = Display information about this version of ChatZilla. cmd.alias.params = [ []] cmd.alias.help = Defines as an alias for the semicolon (';') delimited list of commands specified by . If is a minus ('-') character, the alias will be removed; if omitted, the alias will be displayed. If is not provided, all aliases will be listed. cmd.attach.params = cmd.attach.help = Attaches to the IRC URL specified by . If you are already attached, the view for is made current. If that view has been deleted, it is recreated. You may omit the irc:// portion of the . Examples are; /attach moznet, /attach moznet/chatzilla, and /attach irc.mozilla.org/mozbot,isnick. diff --git a/xul/content/commands.js b/xul/content/commands.js --- a/xul/content/commands.js +++ b/xul/content/commands.js @@ -218,16 +218,20 @@ ["motif-dark", "motif dark", 0], ["motif-light", "motif light", 0], ["sync-output", "evalsilent syncOutputFrame(this)", 0], ["userlist", "toggle-ui userlist", CMD_CONSOLE], ["tabstrip", "toggle-ui tabstrip", CMD_CONSOLE], ["statusbar", "toggle-ui status", CMD_CONSOLE], ["header", "toggle-ui header", CMD_CONSOLE], + ["add-ons", cmdAddons, 0], + ["jsconsole", cmdJSConsole, 0], + ["about-config", cmdAboutConfig, 0], + // text-direction aliases ["rtl", "text-direction rtl", CMD_CONSOLE], ["ltr", "text-direction ltr", CMD_CONSOLE], ["toggle-text-dir", "text-direction toggle", 0], ["irtl", "input-text-direction rtl", CMD_CONSOLE], ["iltr", "input-text-direction ltr", CMD_CONSOLE], // Instrumentation aliases ["allow-ceip", "ceip on; ceip", 0], @@ -4702,8 +4706,25 @@ } else { searchText = encodeURIComponent(searchText).replace(/%20/g, "+"); searchURL = "https://www.google.com/search?q=" + searchText; } dispatch(client.prefs["messages.click"], {url: searchURL}); } + +function cmdAddons(e) +{ + toOpenWindowByType("Addons:Manager", + "chrome://mozapps/content/extensions/extensions.xul"); +} + +function cmdJSConsole(e) +{ + toOpenWindowByType("global:console", "chrome://global/content/console.xul"); +} + +function cmdAboutConfig(e) +{ + toOpenWindowByType("Preferences:ConfigManager", + "chrome://global/content/config.xul"); +} diff --git a/xul/content/menus.js b/xul/content/menus.js --- a/xul/content/menus.js +++ b/xul/content/menus.js @@ -109,16 +109,20 @@ items: [ ["cmd-prefs"], ["install-plugin"], ["goto-startup"], ["-"], ["print"], ["save"], + ["-", {visibleif: XULRunner}], + ["add-ons", {visibleif: XULRunner}], + ["jsconsole", {visibleif: XULRunner}], + ["about-config", {visibleif: XULRunner}], ["-", {visibleif: NotMac}], ["exit", {visibleif: Win}], ["quit", {visibleif: NotMac + " and " + NotWin}] ] }; client.menuSpecs["mainmenu:irc"] = { label: MSG_MNU_IRC, diff --git a/xul/content/static.js b/xul/content/static.js --- a/xul/content/static.js +++ b/xul/content/static.js @@ -1,15 +1,15 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -const __cz_version = "0.9.92"; +const __cz_version = "0.9.93"; const __cz_condition = "green"; const __cz_suffix = ""; const __cz_guid = "59c81df5-4b7a-477b-912d-4e0fdf64e5f2"; const __cz_locale = "0.9.92"; var warn; var ASSERT; var TEST;