Closed
Bug 72515
Opened 23 years ago
Closed 23 years ago
drag and drop of message drags the whole outliner image
Categories
(SeaMonkey :: MailNews: Message Display, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: sspitzer, Assigned: bugzilla)
References
Details
(Whiteboard: [nsbeta1+])
Attachments
(2 files)
1.80 KB,
patch
|
Details | Diff | Splinter Review | |
2.81 KB,
patch
|
Details | Diff | Splinter Review |
ducarroz found this out, and pinkerton explained to me why this was the case. something about getting the image from the frame, and in this case the frame contains the whole outliner body. pinkerton, can you clarify, and repeat your suggestion on how to fix this?
Comment 1•23 years ago
|
||
when you call nsIDragService::InvokeDragSession, there is a parameter that is an array of regions. This list of regions forms the structure dragged by the cursor. Instead of passing null, pass the rectangles of what is selected. I also need to turn off the translucent dragging stuff for now. It just causes more problems than it's worth.
Assignee | ||
Comment 2•23 years ago
|
||
Scott, Seth, do you know how I can retreive the rectangle from the ouliner widget?
Comment 3•23 years ago
|
||
nope...maybe dave knows.
Updated•23 years ago
|
QA Contact: esther → sheelar
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.1
Comment 5•23 years ago
|
||
It sounds like this is probably going to be a fix needed in the outliner. Who is the right person to assign this to? If it's a mailnews bug then feel free to correct me.
Comment 6•23 years ago
|
||
this has nothing to do with the outliner. there is a param to InvokeDragSession() that everyone (incorrectly) passes null to that lists an array of rectangles. if this list is null, we cheat and use the frame. the bug is on the client side, not outliner.
Comment 7•23 years ago
|
||
How do we get this list of rectangles? I don't know if the d&d code changed, but I don't think this bug existed when we weren't using the outliner. What is different?
Comment 8•23 years ago
|
||
what is different is that outliner now uses 1 frame, where as before each cell of the tree widget was a frame. you get the rectangles from outliner itself, by iterating over the selection and asking outliner for the rectangles of the needed rows.
Assignee | ||
Comment 9•23 years ago
|
||
the problem here is to retreive the rectangle to drag...Whe we have figure out that, should be very easy to fix it!
Assignee | ||
Comment 10•23 years ago
|
||
pink, I did the following test: var region = Components.classesByID["{da5b130a-1dd1-11b2-ad47-f455b1814a78}"].createInstance(Components.interfaces.nsIScriptableRegion); region.Init(); region.SetToRect(10, 20, 30, 50); dump("region=" + region + "\n"); ... var nsIDragService = Components.interfaces.nsIDragService; dragService.invokeDragSession ( event.target, transArray, region, nsIDragService.DRAGDROP_ACTION_COPY + nsIDragService.DRAGDROP_ACTION_MOVE ); and, despite I pass a valid region, we still drag the whole outliner frame?? BTW, I still don't know how to retreive the rects from the outliner!
Comment 11•23 years ago
|
||
Note that this applies even when the mousedown isn't on a message -- you can drag the thread pane of an empty folder. Is that a separate bug?
Hardware: PC → Macintosh
Summary: drag and drop of message causes us to drag an the whole outliner image → drag and drop of message drags the whole outliner image
Comment 12•23 years ago
|
||
ok, that should have at least given a smaller rectangle...i'll try looking into it when i get a free second (heh). regarding getting the rects, ben has hiding in his tree (for months) an api to get the appropriate rectangles of a row, but it's been beta1-'d or something. i forget the exact bug, but it's already marked as a blocker. check his buglist and make some noise.
Assignee | ||
Comment 13•23 years ago
|
||
Thanks for looking at it...
Comment 14•23 years ago
|
||
74831 has landed to the point where it's good enough to start using.
No longer depends on: 74831
Comment 15•23 years ago
|
||
i have a fix to nsIScriptableRegion and to the mac drag service to make this work with the hacked region. durcarroz, you need to make your calls to nsIScriptableRegion lowercase (eg, init(), setRect(), etc) as I changed the IDL while i was in there. filed 80196 for my changes.
Depends on: 80196
Assignee | ||
Comment 16•23 years ago
|
||
much better this time, I can drag my test rectangle. Now I still need to extract the right one...
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [nsbeta1+] → [nsbeta1+] Have fix
Assignee | ||
Comment 17•23 years ago
|
||
Assignee | ||
Comment 18•23 years ago
|
||
Comment 19•23 years ago
|
||
r=varada
Reporter | ||
Comment 20•23 years ago
|
||
I was going to ask: please use the prog id ("@mozilla.org/gfx/region;1") instead of the CID. but then looking at nsGfxFactoryWin.cpp and nsGfxFactoryMac.cpp, that wouldn't work. not all the Gfx factories (for all the various toolkits) are generic modules. can you log a byg on switching from CID to progid in messengerdnd.js? we'll make it blocked by bugs to switch the factories to use generic modules. sr=sspitzer
Assignee | ||
Comment 21•23 years ago
|
||
Fixed and checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [nsbeta1+] Have fix → [nsbeta1+]
Comment 22•23 years ago
|
||
Mac only bug verified 2001052112 buildid Mac G4 9.0.4. This problem is now fixed.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•