Closed
Bug 235763
Opened 21 years ago
Closed 21 years ago
Print dialog show list printer descriptions if available
Categories
(Core :: Printing: Output, enhancement)
Tracking
()
RESOLVED
FIXED
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
Details
Attachments
(3 files, 6 obsolete files)
21.72 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
82.03 KB,
image/jpeg
|
Details | |
154.32 KB,
image/jpeg
|
Details |
RFE: Print dialog show list printer descriptions if available.
Some print APIs (such as Xprint :) allow that printers have descriptions
additional to their name. It would be nice if we could fetch that information
and display that in the print dialog.
Assignee | ||
Comment 1•21 years ago
|
||
Assignee: core.printing → roland.mainz
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•21 years ago
|
||
There is one problem:
The current selection is not being rendered in the <menupopup>. When I open the
popup everything is rendered OK, but the selection remains "white" (or "blue"
when selected).
Neil/bz:
Any ideas what I am doing wrong ?
Assignee | ||
Comment 3•21 years ago
|
||
Assignee | ||
Comment 4•21 years ago
|
||
Attachment #142433 -
Attachment is obsolete: true
Attachment #142434 -
Attachment is obsolete: true
Assignee | ||
Comment 5•21 years ago
|
||
Comment on attachment 142517 [details] [diff] [review]
Patch for 2004-02-28-trunk
Requesting r=/sr= ...
Attachment #142517 -
Flags: superreview?(roc)
Attachment #142517 -
Flags: review?(roc)
Comment 6•21 years ago
|
||
Comment on attachment 142517 [details] [diff] [review]
Patch for 2004-02-28-trunk
>+function buildPrinterDescription(printerName)
>+{
>+ var XHTMLNS = "http://www.w3.org/1999/xhtml";
>+
>+ var name_elem = document.createElementNS(XHTMLNS, "div");
>+ var name_text = document.createTextNode(printerName);
>+ name_elem.appendChild(name_text);
>+
>+ var desc_elem = document.createElementNS(XHTMLNS, "i");
>+ var desc_text = document.createTextNode(" / " + getPrinterDescription(printerName));
>+ desc_elem.style.color = "gray";
>+ desc_elem.appendChild(desc_text);
>+
>+ name_elem.appendChild(desc_elem);
>+
>+ return name_elem;
>+}
This is a good example of how not to style chrome.
Assignee | ||
Comment 7•21 years ago
|
||
neil@parkwaycc.co.uk wrote:
> (From update of attachment 142517 [details] [diff] [review])
> >+function buildPrinterDescription(printerName)
> >+{
> [snip]
> >+}
> This is a good example of how not to style chrome.
The other "solutions" offered all have their catch, either being non-functional
or an overkill (such as XBL... and then we need CSS... and then it turns out
that the whole mess still needs more adjustments which are beyond my power. And
if someone hacks a solution for that noone except the author him-/herself is
able to maintain that... please: NO.).
Comment 8•21 years ago
|
||
(In reply to comment #7)
>and then we need CSS...
Just how did you think themes work? To take an example, in the Sky Pilot theme
menuitems have a gray background, so your description would be unreadable...
Comment on attachment 142517 [details] [diff] [review]
Patch for 2004-02-28-trunk
chrome is really beyond my expertise
Attachment #142517 -
Flags: review?(roc)
Assignee | ||
Comment 11•21 years ago
|
||
Comment on attachment 142517 [details] [diff] [review]
Patch for 2004-02-28-trunk
db48x:
Can you review the patch and/or adjust it to use the new functionality
introduced with bug 235872, please ?
Attachment #142517 -
Flags: review?(db48x)
Assignee | ||
Comment 12•21 years ago
|
||
Attachment #142517 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #142517 -
Flags: superreview?(roc)
Attachment #142517 -
Flags: review?(db48x)
Assignee | ||
Updated•21 years ago
|
Attachment #142878 -
Flags: superreview?(roc)
Attachment #142878 -
Flags: review?(db48x)
Comment 13•21 years ago
|
||
Comment on attachment 142878 [details] [diff] [review]
New patch per db48x's comments (note that this patch depends on the patch in bug 235872)
>+ if ( s != "" )
>+ return s;
>+
>+ return "-";
Just make this a 'return s'. the - looks funny all by itself.
With that minor change, and provided the sr accepts it, r=db48x
Attachment #142878 -
Flags: review?(db48x) → review+
Assignee | ||
Comment 14•21 years ago
|
||
Attachment #142878 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #142878 -
Flags: superreview?(roc)
Assignee | ||
Updated•21 years ago
|
Attachment #142931 -
Flags: superreview?(roc)
Comment on attachment 142931 [details] [diff] [review]
New patch per db48x's comments
will this actually work with I18N printer names? Seems like you're stuffing the
UTF8 bytes into the pref name, and then reading the pref via Javascript call to
IDL 'string', which will not translate chars >= 256 to UTF8. Right?
Attachment #142931 -
Flags: superreview?(roc) → superreview+
Comment 16•21 years ago
|
||
Comment on attachment 142931 [details] [diff] [review]
New patch per db48x's comments
>- mGlobalPrinterList->AppendString(nsString(NS_ConvertASCIItoUCS2(plist[i].name)));
>+ /* Add name to our list of printers... */
>+ mGlobalPrinterList->AppendString(nsString(NS_ConvertUTF8toUCS2(plist[i].name)));
Doesn't NS_ConvertUTF8toUCS already return an nsString?
>+ s = gPrefs.getCharPref("print.printer_" + printerName + ".printer_description")
roc's right, you'll need to use getComplexValue(prefName,
Components.interfaces.nsISupportsString).data; here.
Comment 17•21 years ago
|
||
Comment on attachment 142931 [details] [diff] [review]
New patch per db48x's comments
>+ <menulist id="printerList" flex="1" oncommand="setPrinterDefaultsForSelectedPrinter();"/>
this needs type="description", other than that it's good
Attachment #142931 -
Flags: review+
Assignee | ||
Comment 18•21 years ago
|
||
Robert O'Callahan wrote:
> (From update of attachment 142931 [details] [diff] [review])
> will this actually work with I18N printer names? Seems like you're stuffing
> the UTF8 bytes into the pref name, and then reading the pref via Javascript
> call to IDL 'string', which will not translate chars >= 256 to UTF8. Right?
Right now the print dialog doesn't really work with non-ascii names (the
PostScript printing backend does not support then and for Xprint we have to wait
until I am done with the native charset fixes (one of my other bugs I am working
on)... if that's done I am going to fix everything which needs to be done to
make the backend and frontend "i18n-enabled" (this is beyond the scope of this
bug)).
Assignee | ||
Comment 19•21 years ago
|
||
Attachment #142931 -
Attachment is obsolete: true
Assignee | ||
Comment 20•21 years ago
|
||
Comment on attachment 149428 [details] [diff] [review]
New patch per db48x's comments
Requesting r=/sr= and checkin= from roc+moz...
Attachment #149428 -
Flags: superreview?(roc)
Attachment #149428 -
Flags: review?(roc)
Assignee | ||
Comment 21•21 years ago
|
||
neil@parkwaycc.co.uk wrote:
> >+ s = gPrefs.getCharPref("print.printer_" + printerName +
> ".printer_description")
> roc's right, you'll need to use getComplexValue(prefName,
> Components.interfaces.nsISupportsString).data; here.
jshin:
Is that right ?
Assignee | ||
Comment 22•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #149428 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #149428 -
Flags: superreview?(roc)
Attachment #149428 -
Flags: review?(roc)
Assignee | ||
Updated•21 years ago
|
Attachment #149430 -
Flags: superreview?(roc)
Attachment #149430 -
Flags: review?(roc)
Assignee | ||
Comment 23•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #149431 -
Attachment is patch: false
Attachment #149431 -
Attachment mime type: text/plain → image/jpeg
Assignee | ||
Comment 24•21 years ago
|
||
Attachment #149430 -
Flags: superreview?(roc)
Attachment #149430 -
Flags: superreview+
Attachment #149430 -
Flags: review?(roc)
Attachment #149430 -
Flags: review+
Comment 25•21 years ago
|
||
checked in, please mark fixed if it is
Summary: RFE: Print dialog show list printer descriptions if available → Print dialog show list printer descriptions if available
Assignee | ||
Comment 26•21 years ago
|
||
bryner:
Do you want this patch for FireFox, too ?
Assignee | ||
Comment 27•21 years ago
|
||
> bryner:
> Do you want this patch for FireFox, too ?
The dependicy bug 235872 was marked approval1.7- (since it is a feature, no real
bugfix) so we can forget the idea to include this into firefox/thunderbird...
;-((
... anyway... marking bug as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 28•21 years ago
|
||
For the log:
Followup is bug 171809 ("Create |NS_ConvertUnicodeToNative| and
|NS_ConvertNativeToUnicode|") to add the neccesary code to make the print dialog
useable for non-ASCII text.
You need to log in
before you can comment on or make changes to this bug.
Description
•