From 101329e4d682807cd62585d650485fd8f0edd956 Mon Sep 17 00:00:00 2001 From: "silver%warwickcompsoc.co.uk" Date: Wed, 10 Mar 2004 00:31:03 +0000 Subject: [PATCH] Bug 226408 - Replace 4 charset commands with just '/charset' and '/default-charset'. Bump version to 0.9.61. r=rginda@hacksrus.com git-svn-id: svn://10.0.0.236/trunk@153795 18797224-902f-48f8-a5cc-f745e15eee43 --- .../extensions/irc/xul/content/commands.js | 26 +++++-------------- .../extensions/irc/xul/content/contents.rdf | 2 +- mozilla/extensions/irc/xul/content/static.js | 2 +- .../irc/xul/locale/en-US/chatzilla.properties | 18 ++++--------- 4 files changed, 14 insertions(+), 34 deletions(-) diff --git a/mozilla/extensions/irc/xul/content/commands.js b/mozilla/extensions/irc/xul/content/commands.js index fab2cab5e34..fa2b2d8a06c 100644 --- a/mozilla/extensions/irc/xul/content/commands.js +++ b/mozilla/extensions/irc/xul/content/commands.js @@ -50,7 +50,6 @@ function initCommands() ["away", cmdAway, CMD_NEED_SRV | CMD_CONSOLE], ["cancel", cmdCancel, CMD_NEED_NET | CMD_CONSOLE], ["charset", cmdCharset, CMD_CONSOLE], - ["channel-charset", cmdCharset, CMD_NEED_CHAN | CMD_CONSOLE], ["channel-motif", cmdMotif, CMD_NEED_CHAN | CMD_CONSOLE], ["channel-pref", cmdPref, CMD_NEED_CHAN | CMD_CONSOLE], ["cmd-copy", cmdCopy, 0], @@ -66,6 +65,7 @@ function initCommands() ["client", cmdClient, CMD_CONSOLE], ["commands", cmdCommands, CMD_CONSOLE], ["ctcp", cmdCTCP, CMD_NEED_SRV | CMD_CONSOLE], + ["default-charset", cmdCharset, CMD_CONSOLE], ["delete-view", cmdDeleteView, CMD_CONSOLE], ["disable-plugin", cmdAblePlugin, CMD_CONSOLE], ["disconnect", cmdDisconnect, CMD_NEED_SRV | CMD_CONSOLE], @@ -98,7 +98,6 @@ function initCommands() ["msg", cmdMsg, CMD_NEED_SRV | CMD_CONSOLE], ["names", cmdNames, CMD_NEED_SRV | CMD_CONSOLE], ["network", cmdNetwork, CMD_CONSOLE], - ["network-charset", cmdCharset, CMD_NEED_NET | CMD_CONSOLE], ["network-motif", cmdMotif, CMD_NEED_NET | CMD_CONSOLE], ["network-pref", cmdPref, CMD_NEED_NET | CMD_CONSOLE], ["networks", cmdNetworks, CMD_CONSOLE], @@ -132,7 +131,6 @@ function initCommands() ["unignore", cmdIgnore, CMD_NEED_NET | CMD_CONSOLE], ["unstalk", cmdUnstalk, CMD_CONSOLE], ["usermode", cmdUsermode, CMD_CONSOLE], - ["user-charset", cmdCharset, CMD_NEED_USER | CMD_CONSOLE], ["user-motif", cmdMotif, CMD_NEED_USER | CMD_CONSOLE], ["user-pref", cmdPref, CMD_NEED_USER | CMD_CONSOLE], ["version", cmdVersion, CMD_CONSOLE], @@ -610,26 +608,16 @@ function cmdCharset(e) { var pm; - if (e.command.name == "channel-charset") - { - pm = e.channel.prefManager; - msg = MSG_CURRENT_CHARSET_CHAN; - } - else if (e.command.name == "network-charset") - { - pm = e.network.prefManager; - msg = MSG_CURRENT_CHARSET_NET; - } - else if (e.command.name == "user-charset") - { - pm = e.user.prefManager; - msg = MSG_CURRENT_CHARSET_USER; - } - else + if (e.command.name == "default-charset") { pm = client.prefManager; msg = MSG_CURRENT_CHARSET; } + else + { + pm = e.sourceObject.prefManager; + msg = MSG_CURRENT_CHARSET_VIEW; + } if (e.newCharset) { diff --git a/mozilla/extensions/irc/xul/content/contents.rdf b/mozilla/extensions/irc/xul/content/contents.rdf index d7a30798645..79fcd019c32 100644 --- a/mozilla/extensions/irc/xul/content/contents.rdf +++ b/mozilla/extensions/irc/xul/content/contents.rdf @@ -9,7 +9,7 @@ is specified, sets you away with that message. Use cmd.cancel.help = Cancels a /attach or /server command. Use /cancel when ChatZilla is repeatedly trying to attach to a network that is not responding, to tell ChatZilla to give up before the normal number of retries. cmd.charset.params = [] -cmd.charset.help = Sets the character encoding mode to , or displays the current character encoding mode if is not provided. - -cmd.channel-charset.params = [ []] -cmd.channel-charset.help = Sets the character encoding mode to , or displays the current character encoding mode if is not provided. If is not provided, the current channel will be assumed. +cmd.charset.help = Sets the character encoding mode for the current view to , or displays the current character encoding mode if is not provided. cmd.channel-motif.params = [ []] cmd.channel-motif.help = Sets the CSS file used for the message tab for this specific channel. can be a URL to a .css file, or the shortcut "default", "light", or "dark". If is a minus ('-') character, the motif will revert to the network motif. If is not provided, the current channel will be assumed. See the the ChatZilla homepage at for more information on how to style ChatZilla. See also |motif|. @@ -100,6 +97,9 @@ cmd.sync-windows.help = Syncronizes all views with their current output windo cmd.ctcp.params = [] cmd.ctcp.help = Sends the CTCP code to the target (user or channel) . If are specified they are sent along as well. +cmd.default-charset.params = [] +cmd.default-charset.help = Sets the global default character encoding mode to , or displays the current global default character encoding mode if is not provided. + cmd.delete-view.key = accel W cmd.delete-view.label = &Close Tab cmd.delete-view.params = [] @@ -297,9 +297,6 @@ cmd.network.help = Sets the current network to cmd.networks.help = Lists all available networks as clickable links. -cmd.network-charset.params = [ []] -cmd.network-charset.help = Sets the character encoding mode to , or displays the current character encoding mode if is not provided. If is not provided, the current network will be assumed. - cmd.network-motif.params = [ []] cmd.network-motif.help = Sets the CSS file used for the message tab for the network . can be a URL to a .css file, or the shortcut "default", "light", or "dark". If is a minus ('-') character, the motif will revert to the global motif. If is not provided, the current network is assumed. See the the ChatZilla homepage at for more information on how to style ChatZilla. See also |motif|. @@ -388,9 +385,6 @@ cmd.disable-plugin.help = This command calls the plugin's disablePlugin functi cmd.usermode.params = [] cmd.usermode.help = Changes or displays the current user mode. -cmd.user-charset.params = [ []] -cmd.user-charset.help = Sets the character encoding mode to , or displays the current character encoding mode if is not provided. If is not provided, the current user will be assumed. - cmd.user-motif.params = [ []] cmd.user-motif.help = Sets the CSS file used for the message tab for the user . can be a URL to a .css file, or the shortcut "default", "light", or "dark". If is a minus ('-') character, the motif will revert to the network motif. If is not provided, the current user is assumed. See the the ChatZilla homepage at for more information on how to style ChatZilla. See also |motif|. @@ -545,9 +539,7 @@ msg.version.reply = Chatzilla %S [%S] msg.nothing.to.cancel = No connection in progress, nothing to cancel. msg.cancelling = Cancelling connection to ``%S''... msg.current.charset = Using ``%S'' as default charset. -msg.current.charset.net = Using ``%S'' as default charset for this network. -msg.current.charset.chan = Using ``%S'' as charset for this channel. -msg.current.charset.user = Using ``%S'' as charset for this user. +msg.current.charset.view = Using ``%S'' as charset for this view. msg.current.css = Using <%S> as default motif. msg.current.css.net = Using <%S> as default motif for this network. msg.current.css.chan = Using <%S> as motif for this channel.