Closed Bug 24027 Opened 25 years ago Closed 25 years ago

Charset Menu <Static> area: read from prefs and have editing UI

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cata, Assigned: jbetak)

Details

(Whiteboard: [PDT+])

There are two things to be done here:
a) The menu items should be read from preferences
b) We need an UI to edit those preferences
Status: NEW → ASSIGNED
Target Milestone: M14
Summary: Charset Menu <Static area → Charset Menu <Static> area: read from prefs and have editing UI
The first part is done. The static area of the charset menu is being read from 
the prefs. It looks like:

pref("intl.charset_menu.static", "iso-8859-1, iso-2022-jp");

Now we need an UI to edit these prefs. Matt, I am reassigning this bug to you 
because I need your attention and help here. Just some pointers/examples & an 
entry point should suffice, I can do the rest of the work myself. You can 
reassign the bug back to me after you put me on the right track. Thanks!

Th UI I need should allow me to build the list of charsets from the available 
ones.
Assignee: cata → matt
Status: ASSIGNED → NEW
The code I was talking about will be in the tree this afternoon.
Added beta1 because this is beta criteria.
Keywords: beta1
PDT+
Whiteboard: [PDT+]
Sorry just saw this bug.
here is the best example for you
http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/con
tent/pref-fonts.js
http://lxr.mozilla.org/seamonkey/source/xpfe/components/prefwindow/resources/con
tent/pref-fonts.xul
This is using the font enumerator.
Any form that uses the prefs panel
initialization will get read into the forms automatically.

Make a form
These are the entries:
pref= true if it is a pref
preftype = either int or string or bool
prefindex = this is used for radio buttons
prefstring = this is the js pref
If you need more help ask please
Assignee: matt → cata
Status: NEW → ASSIGNED
Matt,
I don't think the font prefs is a good example for charset menu customization.

It needs something along the lines of the sidebar customization that has a
Add/Remove GUI.  See the spec:
  http://www.mozilla.org/projects/intl/uidocs/browsercharmenu.html
Look under the bullet "Customize ... Preference Dialogs".

So is this a better example for what is needed?
http://lxr.mozilla.org/seamonkey/source/xpfe/components/sidebar/resources/custom
ize-panel.xul
http://lxr.mozilla.org/seamonkey/source/xpfe/components/sidebar/resources/custom
ize-panel.js
Whiteboard: [PDT+] → [PDT+] ETA: 15/Feb
Reassigned to jbetak.
jbetak, Please update ETA if necessary.
Assignee: cata → jbetak
Status: ASSIGNED → NEW
jbetak,
If you need help, the expert on this GUI stuff is matt.
Also tao played with some stuff a while ago and may be able to help too.
Status: NEW → ASSIGNED
Do you have the IDL interface to get the list of charsets and the corresponding
UI names?
Bob,

no not yet - I'm sure Cata has finished working on it. I have the UI and the 
underlying JavaScript logic ready to go. I also can write out the composite 
string containing the selected charsets to virtually any preference, except 
intl.charset_menu.static. 

I might need to ask Cata to have a look at it, seems to be very specific to this 
preference .



Do you have the IDL interface to get the list of charsets and the corresponding
UI names?

Incorporated changes suggested by bobj on Feb 18, ready to check-in...
Whiteboard: [PDT+] ETA: 15/Feb → [PDT+] ETA: 22/Feb
As I was saying, the new interface (IDL file and its implementation) are ready, 
reviewed & tested. As I have Bob's permission, I'll check in ASAP.

Juraj, after you have your preference editing UI in, please assign this bug to 
me: listen at runtime to preference change and rebuild static area of charset 
menu when it happens.
Ok, my part is in.
It´s in! Cata - as requested sending over to you for the runtime to preference change and rebuild static area of charset 
menu.
Assignee: jbetak → cata
Status: ASSIGNED → NEW
Cata, Please update the ETA.
Whiteboard: [PDT+] ETA: 22/Feb → [PDT+]
We have what we need for Beta1.
I opened bug 28983 for the remaining work to make this dynamic.
Assignee: cata → jbetak
bugzilla forces me to add a comment when I resolve this...
see above comment...
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Changed QA contact to amasri@netscape.com.
QA Contact: teruko → amasri
with build of 2/29/2000, ID 2000022708:
Most of this works, but there are still some problems.
1) Juraj finds that selected fonts are not displayed in View|Character
coding|Customize screen--should be displayed in right-hand list
2) I find that Big5 charset can't be saved. I can select it, but when I restart,
it is not in the View | Character coding submenu nor in the Customize panel's
right-hand list.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Hi Alan,

I'm closing this bug again - the Big5 was a very good catch. I had some code 
from the early development stages that didn't handle short pref IDs (e.g. big5) 
all that well.

The other problem was caused by some new decoders without a title/lable. I 
beefed upp the error handling in the Init() function to make sure JS doesn't 
stop interpreting if something similar happened again...

Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
verified in 3/1/2000 build
Status: RESOLVED → VERIFIED
On Win95, not all the corresponding fonts are shown in the drop down.  I did
not carefully inspect anything but the "Western fonts".  Below is my comparison
of what is shown in the 3/3 build vs. IE5.

Seamonkey "Western:Serif:"

Bitstream CyberCJK
Bitstream Cyberbit
Bookman Old Style
Garamond
Times New Roman

Seamonkey Western:Monospace:
Courier New
OCR B MT
OCR-A
QuickType Mono
r_ansi

By comparison here is what IE5 shows.

IE5 "Latin based: Web page font:"
Arial
Arial Black
Arial Narrow
Bitstream Cyberbit
Bitstream Cyberbit
Bookman Old Style
Comic Sans MS
Courier New
Garamond
Impact
OCR B MT
OCR-A
QuickType
QuickType Condensed
QuickType Mono
QuickType Pi
r_ansi
Tahoma
Times New Roman

IE5 "Latin based: Plain text font:"
Courier New
OCR B MT
OCR-A
QuickType Mono
r_ansi
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Whoops.  Commented on the wrong bug!
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Re-opened wrong bug.  Restoring this bug to FIXED/VERIFED...
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.