Closed
Bug 129327
Opened 23 years ago
Closed 22 years ago
Outliner needs to support progressmeter
Categories
(Core :: XUL, defect, P3)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: bugzilla, Assigned: janv)
References
Details
Attachments
(6 files, 2 obsolete files)
We have to support progressmeters in cells for download manager. We could get away with using tree like we are now, except that it has a bad column resizing bug; I wouldn't want to ship with it. The bug is visible in the Subscribe dialog: try to resize using the splitter between Subscribe and Messages. We could try to set reasonable defaults for each column and disable column resizing, but that would be flaky at best. We could also try to fix the tree bug.
Reporter | ||
Comment 1•23 years ago
|
||
Jan says he already has some code for editable cells that will likely make this easier to fix.
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 3•22 years ago
|
||
First, do we also need support for undetermined progressmeters? Here is my idea how to implement support for progressmeters and actually for other special content too: XUL syntax: <outliner ref="NC:DownloadsRoot" datasources="rdf:null"> <outlinercols> <outlinercol id="name" label="&view.header.name.label;"/> <outlinercol id="progress" type="progressmeter" label="&view.header.progress.label;"/> </outlinercols> <template> <outlinerchildren> <outlineritem uri="rdf:*"> <outlinerrow> <outlinercell label="rdf:http://home.netscape.com/NC-rdf#Name"/> <outlinercell label="rdf:http://home.netscape.com/NC-rdf#Progress"/> </outlinerrow> </outlineritem> </outlinerchildren> </template> </outliner> type attribute could be: text checkbox progressmeter a new CSS pseudo class which would support these properties: outlinerchildren:-moz-outliner-progressmeter { background-color margin color border padding } maybe also: -moz-border-[top|right|bottom|left]-colors Implementation: - a new member property for nsOutlinerCOlumn: mType (eText, eCheckbox, eProgressmeter) - a new switch construct at the end of the PaintCell() method switch(aColumn->mType) { default: case eText: PaintText(); break; case eCheckbox: PaintCheckbox(); break; case eProgressmeter: PaintProgressmeter(); break; } - PaintProgressmeter() method This new method would query view for cell value. This value could be from the range 0-100. Then it would paint only part of the available cell rect. This part would be adequate to queried value (0-100% of the cell rect) Blake, would it satisfy your needs ? Hyatt, does it sound reasonable to you ?
Assignee | ||
Comment 4•22 years ago
|
||
Hmm, I think there is a way to support undetermined progressmeters too. XUL sysntax: <outlinercol progressmode="undermined"/> Implementation: - install a new timer if we have undermined progressmeters - when timer fires invalidate all columns with undermined progressmeters
Assignee | ||
Comment 5•22 years ago
|
||
uhm, I meant "undetermined", I should take a rest :)
Reporter | ||
Comment 6•22 years ago
|
||
This is fine for my needs. This is somewhat limiting as one column can only contain one type of element. In Download Manager, when a download finishes, "Finished" text takes the place of the progressmeter (or "Cancelled," "Failed," etc. as appropriate). But that's ok, because I use a simplistic xbl widget <downloadstate/> for that.
Reporter | ||
Comment 7•22 years ago
|
||
Er, nevermind, brain freeze -- that's not ok, since I obviously can't use the downloadstate widget in outliner.
Assignee | ||
Comment 8•22 years ago
|
||
Shouldn't be a problem. We can just paint a text when we get it instead of an integer value. So, now waiting for hyatt to take a look and then I can start coding.
Reporter | ||
Comment 9•22 years ago
|
||
<hyatt> jan owns outliner now. <hyatt> he can do whatever he wants. <hyatt> :)
Assignee | ||
Comment 10•22 years ago
|
||
Assignee | ||
Comment 11•22 years ago
|
||
TODO: - add new CSS style rules for Modern theme - add new stub method GetProgressState() to other outliner views - implement GetProgressState() for rdfliner - investigate why undetermined progress meter hogs CPU
Comment 12•22 years ago
|
||
can you make the progress bars line up with the range that text gets for a collumn?
Assignee | ||
Comment 13•22 years ago
|
||
sure
Reporter | ||
Comment 14•22 years ago
|
||
Jan: awesome!
Reporter | ||
Comment 15•22 years ago
|
||
how's this coming? would be better, but not critical, to give se test builds with outliner instead of tree.
Assignee | ||
Comment 16•22 years ago
|
||
I need to fix TODO list mentioned above. I was flooded by other bug reports and other stuff. Once I clean it up I'll post a patch.
Assignee | ||
Comment 17•22 years ago
|
||
Assignee | ||
Comment 18•22 years ago
|
||
Assignee | ||
Comment 19•22 years ago
|
||
Assignee | ||
Comment 20•22 years ago
|
||
Assignee | ||
Comment 21•22 years ago
|
||
I figured out that undetermined progress meter hogs CPU only when using Classic skin. Mac progress meter also needs some loving.
Assignee | ||
Comment 22•22 years ago
|
||
This is really bad: outlinerchildren:-moz-outliner-progressmeter(progressUndetermined) { background: url("chrome://global/skin/progressmeter/progressmeter-busy.gif"); } since it invalidates all outliner very often. Need a better way for undetermined progressmeter.
Assignee | ||
Comment 23•22 years ago
|
||
Ok, I figured out that perf issue with undetermined progressmeter. But there is still a general perf issue with animated images in outliner. If an undetermined progressmeter (animated image) goes to normal or none mode, cell gets invalidated all over again. In other words, if a cell has animated image once, it is still considered as animated image even though it has no animated image anymore.
Reporter | ||
Comment 24•22 years ago
|
||
Jan, can you fix it so that I can switch between progressmeter and text by setting numeric and non-numeric values, respectively? Maybe not the best solution in the end, but that's the only thing preventing me from converting download manager to outliner (which is always blocking Joe's work).
Assignee | ||
Comment 25•22 years ago
|
||
This patch should be ready for a review. I fixed undetermined progressmeters by using |list-style-image| instead of |background| and using DrawTile instead of DrawImage for image painting. It is also possible to use an image to paint determined progress, like we do on Mac Once this lands, I'll fill a separate bug for the issue with animated images.
Attachment #73920 -
Attachment is obsolete: true
Assignee | ||
Comment 26•22 years ago
|
||
Attachment #75548 -
Attachment is obsolete: true
Comment 27•22 years ago
|
||
Comment on attachment 76203 [details] [diff] [review] real patch r=bryner, looks good
Attachment #76203 -
Flags: review+
Comment 28•22 years ago
|
||
Comment on attachment 76203 [details] [diff] [review] real patch sr=hyatt
Attachment #76203 -
Flags: superreview+
Comment 29•22 years ago
|
||
Comment on attachment 76203 [details] [diff] [review] real patch a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #76203 -
Flags: approval+
Comment 30•22 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 31•22 years ago
|
||
Bug 136860 is a regression of this. Just one "getImageSrc: function(row, colID){}" is missing in content/global/config.js
Assignee | ||
Comment 32•22 years ago
|
||
yeah, I forgot to add it there.
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•