Closed Bug 195481 Opened 21 years ago Closed 21 years ago

Automatic image resize: Image status should be reflected in document title bar and Tab marker

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla1.4beta

People

(Reporter: chrispetersen, Assigned: janv)

Details

(Whiteboard: [adt2] [UI])

Attachments

(1 file, 3 obsolete files)

When automatic image resize is enabled, we need to indicate the image's current
status. One idea is too have the status name (Normal or Shrink to Fit)  to be
displayed in the documents tab or window title bar.
Component: Layout → Image: Layout
QA Contact: ian → petersen
-> me
Assignee: other → varga
Whiteboard: [adt2]
Keywords: nsbeta1+
Priority: -- → P3
Target Milestone: --- → mozilla1.4beta
Whiteboard: [adt2] → [adt2] [UI]
Attached patch patch (obsolete) — Splinter Review
Attached patch diff -w version (obsolete) — Splinter Review
Attachment #121111 - Flags: superreview?(jaggernaut)
Attachment #121111 - Flags: review?(bzbarsky)
Comment on attachment 121111 [details] [diff] [review]
patch

>+    SetTitle(title + NS_LITERAL_STRING(" - ") + aStatus);

Imo, things like that dash should really be localized, not hardcoded.

>+                             const nsAString&   aStatus = NS_LITERAL_STRING(""));

You've tested that on both Windows and Linux (the latter without
--fshort-wchar)?
Attached patch new patch (obsolete) — Splinter Review
made the title separator localizable and tested on windows and linux (gcc 3.2.2
and gcc 2.95.3)
Attachment #121111 - Attachment is obsolete: true
Attachment #121112 - Attachment is obsolete: true
Attachment #121111 - Flags: superreview?(jaggernaut)
Attachment #121111 - Flags: review?(bzbarsky)
Attachment #121134 - Flags: superreview?(jaggernaut)
Attachment #121134 - Flags: review?(bzbarsky)
Comment on attachment 121134 [details] [diff] [review]
new patch

Um... Why \u00a0 instead of regular spaces?

Also, it's usually better to localize the whole string so that localizers can
rearrange it as needed to fit the conventions of the target language, rather
than localizing the pieces and concatenating them in a hardcoded way.
> Um... Why \u00a0 instead of regular spaces?
There's no other way to do it, the strings are trimmed during parsing.
00a0 is no-break space according to http://www.unicode.org/charts/PDF/U0000.pdf
That's exactly what we need.

Btw, nsContentTreeOwner::SetTitle() does similar thing, it uses standalone
mTitleSeparator too.
Status: NEW → ASSIGNED
> 00a0 is no-break space

Right.  Why not use the unicode escape for a normal vanilla breaking space? 
That should have much better chance of being supported in titlebars...

And yes, I know that nsContentTreeOwner does that.  I feel that that's wrong too...

Apart from these issues, r=me; in the end I really don't care that much about
any of this stuff as long as it does not adversely affect gecko proper.
>Right.  Why not use the unicode escape for a normal vanilla breaking space? 
>That should have much better chance of being supported in titlebars...

The problem here is that if I use standard space it will be trimmed during parsing.

Thanks for the review.

>The problem here is that if I use standard space it will be trimmed during
>parsing.

It will?

|+TitleSeparator= - |

Would get trimmed.

|+TitleSeparator=\u0020-\u0020|

should not... if it does, that's a bug (not that I'd be too surprised, come to
think of it...)
yes, \u0020 gets trimmed (using a trunk build)
Comment on attachment 121134 [details] [diff] [review]
new patch

Sigh.  Could we smack alecf, please?
Attachment #121134 - Flags: review?(bzbarsky) → review+
Alec, can you provide a better solution or you're ok with this approach?
don't smack me! :)
I didn't write that string-trimming stuff (I'm cvs blamed only because I backed
out my parser rewrite some time ago)

I think that its part of the .properties file spec which came from java. (I'm
not defending it, just explaining it)
I think I'd prefer "%S - %S" (title, status) and then use that if
!aStatus.IsEmpty(), otherwise just use title.
Attached patch revised patchSplinter Review
Attachment #121134 - Attachment is obsolete: true
Attachment #121134 - Flags: superreview?(jaggernaut)
Attachment #121203 - Flags: superreview?(jaggernaut)
Comment on attachment 121203 [details] [diff] [review]
revised patch

sr=jag
Attachment #121203 - Flags: superreview?(jaggernaut) → superreview+
checked in
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verified in the 2003-04-22-08 Macho and Win32 trunk builds.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: