Closed Bug 226408 Opened 21 years ago Closed 21 years ago

Need simple "set charset" command for current view

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: relf, Assigned: bugzilla-mozilla-20000923)

References

(Blocks 1 open bug)

Details

(Whiteboard: cz-patch)

Attachments

(1 file)

Chatzilla 0.9.45 [Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031029] I'm totally disappointed by Chatzilla charset related commands and think that their design should be changed. Let me state my point of view. 1. Default charset command (currently "/charset") is by nature is very rare command. Usually it's given only once and "default codepage" will be saved in config forever. So this command should have other form rather than take a short and elegant command "/charset" (see below). I'd suggest for this command to be "/default-charset". In my vision, "/default-charset" should not affect already opened tabs but be applicable only to newly created one. Say, if I opened a number of tabs and set up own charset for each one, then I wouldn't like if single command destroyed them all. 2. There is should be a short and easy command for changing charset in the _current_ tab (no matter what it is). Currently there is no such universal command, but specific commands like "/channel-charset", "/user-charset" etc. may play its role for specific tab types. But I'd suggest to have single simple command like "/charset" for changing charset in the current tab. It would free the user from thinking what tab she is dealing with, and will simply perform charset change for _any_ tab. I think this command should recode current content of the tab. See related bug 225950 Say, if some user contacted me through personal chat but used different charset from my default, I simply give proper "/charset" command and recode what the user said to me.
Blocks: 225950
Bug 226410 is somehow related to this one. There is an idea how to improve a choice of codepage for a personal chat tabs.
I sort of agree with what you're saying, but there's a slight correction needed. If I set a channel, network, or user's charset (with the appropriate command), then they no longer depend on the default (channels depends of the network's which depends on the default). I have, for example, one network set to ISO-8859-15 - changing what my default is had no effect on this network, it stays entirely as ISO-8859-15, unless I override individual channels or user views. There is a bug, however, that changing the default charset *does not* update the views that depend on it (i.e. ones that haven't been overriden) until you restart. I think this problem does need to be fixed, though probably in a different bug/independantly. I agree entirely with the need for a single command to change the current view, though. :) (obviously the recode issue is left for bug 225950)
Summary: Bad design of charset commands → Need simple "set charset" command for current view
yeah, this sounds like a good idea, and shouldn't be too hard either.
actually, how about rename /charset to /default-charset, have /charset list the available charset commands and associated help text, and leave everything else as is. I could picture users frustrated by the fact that they "have to" issue a /charset command for each view, just because they don't know about /default-charset.
I would still like to see a simple, easy-to-tab-complete, command, such as /charset. Perhaps "/charset" could list the commands, and "/charset <code>" would just set it for the current view anyway?
Yes, if specific network/channel/user was assigned a charset via "/network-charset", "/channel-charset", or "/user-charset", then NO generic charset change will affect that network/channel/user. On the other hand, there should be a command to remove a charset assignment, or a special charset value like "none" for that. Say, "/network-charset none" will remove charset assignment to network. Yes again, "default charset" should NOT change anything except some variable in memory/config. This value will be used by newly created object in future.
Max, there is a special value, "-". Setting it on a user or channel makes it default to the network, and makes a network default to the global default.
James, oh yeah, now I remember I even used it once. Just fine!
Yes. I need this too. And I think the best choice is a simple /charset PS Mozilla must think itself where user is and that does he mean and want. ;-)
Assignee: rginda → silver
Removes network-, channel- and user-charset commands, and adds default-charset. /charset acts on the current view, /default-charset the global charset. I'm not sure this makes sense, as it's not the *default* it's the *global* charset. Perhaps networks should only pick up the global charset when initially creating them? (does the network list actually create CIRCNetwork objects?)
> I'm not sure this makes sense, as it's not the *default* it's the *global* > charset. What is the difference between "default" and "global" here? I think, "default" name is ok since this charset will be in all cases when Chatzilla is uncertain about the charset. In other words, "default" charset will be used by default ;)
The difference, at least how I think of it, is that "global" affects everything that doesn't have it's own value already, whereas "default" only defines the value other things get initially (i.e. global affects already open stuff, default doesn't). ChatZilla currently does charsets using the "global" way, meaning if I change the global setting, anything open that doesn't have it's own charset is affected, so I'm not sure /default-charset matches the behaviour.
Is it hard to change current "global" behavior to "default" one? I think no command should affect all the already opened stuff.
In general, ChatZilla's prefs use the "global" system. Things like the motif really work better like this, as you normally want the same motif change on all windows (though ones with their own setting are left alone). Having the charset inherit from the server to channels dynamically is *very* useful, but the global --> server inheriting probably isn't. Changing it is as simple as this: - ["charset", defer], + ["charset", client.prefs["charset"]], (http://lxr.mozilla.org/mozilla/source/extensions/irc/xul/content/prefs.js#189)
Whiteboard: cz-patch
Attachment #141204 - Flags: review?(rginda)
Comment on attachment 141204 [details] [diff] [review] Replace charset commands with just [default-]charset. r=rginda
Attachment #141204 - Flags: review?(rginda) → review+
Comment on attachment 141204 [details] [diff] [review] Replace charset commands with just [default-]charset. Checked in.
This is been in cVS and hacksrus.com releases for over a month. FIXED. :)
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: