From 6324418b63efed2b01a79bbedb42194c6b3d4cb2 Mon Sep 17 00:00:00 2001 From: "silver%warwickcompsoc.co.uk" Date: Sat, 4 Mar 2006 23:11:40 +0000 Subject: [PATCH] Bug 40974 - Add away/nick menu to main menu for accessibility. Update links to website to new address. Add FAQ/homepage to Help menu. Work around bug 98997 (again). ChatZilla only. r=silver p=gijskruitbosch+bugs@gmail.com (Gijs Kruitbosch) --- extensions/irc/xpi/resources/install.rdf | 2 +- extensions/irc/xul/content/commands.js | 5 +++- extensions/irc/xul/content/menus.js | 23 ++++++++++++++++++- .../irc/xul/locale/en-US/chatzilla.properties | 9 ++++++-- extensions/irc/xul/locale/en-US/config.dtd | 2 +- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/extensions/irc/xpi/resources/install.rdf b/extensions/irc/xpi/resources/install.rdf index 320e41f38674..7fe9e350619a 100644 --- a/extensions/irc/xpi/resources/install.rdf +++ b/extensions/irc/xpi/resources/install.rdf @@ -41,7 +41,7 @@ James Ross Lim Chee Aun (graphics) chrome://chatzilla/skin/images/logo.png - http://www.hacksrus.com/~ginda/chatzilla/ + http://chatzilla.hacksrus.com/ javascript:opener.openDialog('chrome://chatzilla/content/config.xul','','chrome,modal,resizable');window.close(); diff --git a/extensions/irc/xul/content/commands.js b/extensions/irc/xul/content/commands.js index b7ef927d1cc8..7b5ce793d447 100644 --- a/extensions/irc/xul/content/commands.js +++ b/extensions/irc/xul/content/commands.js @@ -209,6 +209,9 @@ function initCommands() ["j", "join", CMD_CONSOLE], ["part", "leave", CMD_CONSOLE], ["raw", "quote", CMD_CONSOLE], + // Shortcuts to useful URLs: + ["faq", "goto-url http://chatzilla.hacksrus.com/faq/", 0], + ["homepage", "goto-url http://chatzilla.hacksrus.com/", 0], // Used to display a nickname in the menu only. ["label-user", "echo", 0], // These are all the font family/size menu commands... @@ -2108,7 +2111,7 @@ function cmdGotoURL(e) return; } - if (e.command.name == "goto-url-external") + if ((e.command.name == "goto-url-external") || (client.host == "XULrunner")) { const ioSvc = getService(IO_SVC, "nsIIOService"); const extProtoSvc = getService(EXT_PROTO_SVC, diff --git a/extensions/irc/xul/content/menus.js b/extensions/irc/xul/content/menus.js index 21b3adf65b5c..d6b594104d5f 100644 --- a/extensions/irc/xul/content/menus.js +++ b/extensions/irc/xul/content/menus.js @@ -167,6 +167,8 @@ function initMenus() // Planned future menu items, not implemented yet. //["-"] //[">popup:current_networks"] + [">popup:nickname"], + ["-"], ["leave", {visibleif: ChannelActive}], ["rejoin", {visibleif: ChannelInactive}], ["disconnect", {visibleif: NetConnected}], @@ -263,7 +265,11 @@ function initMenus() domID: "menu_Help", items: [ - ["about"], + ["-", {visibleif: Mozilla}], + ["homepage"], + ["faq"], + ["-"], + ["about"] ] }; @@ -436,6 +442,12 @@ function initMenus() ] }; + client.menuSpecs["popup:nickname"] = { + label: MSG_STATUS, + getContext: getDefaultContext, + items: client.menuSpecs["mainmenu:nickname"].items + }; + } function createMenus() @@ -454,6 +466,15 @@ function createMenus() } else { comBar.collapsed = false; } + + if (client.host == "XULrunner") + { + // This is a hack to work around Gecko bug 98997, which means that + // :empty causes menus to be hidden until we force a reflow. + var menuBar = document.getElementById("mainmenu"); + menuBar.hidden = true; + menuBar.hidden = false; + } } function getCommandContext (id, event) diff --git a/extensions/irc/xul/locale/en-US/chatzilla.properties b/extensions/irc/xul/locale/en-US/chatzilla.properties index bca57a818622..4e0dd16721d6 100644 --- a/extensions/irc/xul/locale/en-US/chatzilla.properties +++ b/extensions/irc/xul/locale/en-US/chatzilla.properties @@ -301,6 +301,8 @@ cmd.exit.help = Disconnects from all active servers and networks, providing t cmd.exit-mozilla.label = E&xit cmd.exit-mozilla.help = Exit &brandShortName;. +cmd.faq.label = ChatZilla FAQ + cmd.find.label = &Find... cmd.find.key = accel F cmd.find.params = [] @@ -370,6 +372,8 @@ cmd.hide-view.label = &Hide Tab cmd.hide-view.params = [] cmd.hide-view.help = Drop the current view's icon from the tab strip, but save its contents. The icon will reappear the next time there is activity on the view. +cmd.homepage.label = ChatZilla Homepage + cmd.hop.label = Give Half-operator Status cmd.hop.params = [<...>] cmd.hop.help = Gives half-operator status to on current channel. Requires operator status. @@ -858,7 +862,7 @@ msg.cmdmatch = Commands matching ``%1$S'' are [%2$S]. msg.default.alias.help = This command is an alias for |%1$S|. msg.extra.params = Extra parameters ``%1$S'' ignored. msg.version.reply = Chatzilla %S [%S] -msg.source.reply = http://hacksrus.com/~ginda/chatzilla/ +msg.source.reply = http://chatzilla.hacksrus.com/ msg.nothing.to.cancel = No connection or /list in progress, nothing to cancel. msg.cancelling = Cancelling connection to ``%S''... msg.cancelling.list = Cancelling /list request... @@ -896,7 +900,7 @@ msg.channel.opened = Channel view for ``%S'' opened. msg.commands.header = Type /help for information about a specific command. msg.matching.commands = Currently implemented commands matching the pattern ``%S'' are [%S].\nType /help for information about a specific command. msg.all.commands = Currently implemented commands are [%S]. -msg.help.intro = Help is available from many places:\n - |/commands| lists all the built-in commands in ChatZilla. Use |/help | to get help on individual commands.\n - The IRC Help website provides introductory material for new IRC users. \n - The ChatZilla FAQ answers many common questions about using ChatZilla.\n - The ChatZilla Support Channel is always available to answer any further questions. +msg.help.intro = Help is available from many places:\n - |/commands| lists all the built-in commands in ChatZilla. Use |/help | to get help on individual commands.\n - The IRC Help website provides introductory material for new IRC users. \n - The ChatZilla FAQ answers many common questions about using ChatZilla.\n - The ChatZilla Support Channel is always available to answer any further questions about ChatZilla. msg.homepage = Please visit the ChatZilla homepage at for more information. msg.client.opened = JavaScript console for ``*client*'' opened. msg.newnick.you = YOU are now known as %S @@ -919,6 +923,7 @@ msg.stalk.add = Now stalking %S. msg.stalk.del = No longer stalking %S. msg.stalking.already = Already stalking %S. +msg.status = Status msg.title.net.on = User %S on ``%S'' (%S:%S) msg.title.net.off = User %S, not connected to network ``%S'' msg.title.nonick = diff --git a/extensions/irc/xul/locale/en-US/config.dtd b/extensions/irc/xul/locale/en-US/config.dtd index 9fd8ecace06c..f7e53c14b49e 100755 --- a/extensions/irc/xul/locale/en-US/config.dtd +++ b/extensions/irc/xul/locale/en-US/config.dtd @@ -38,7 +38,7 @@ - +