Closed Bug 229327 Opened 20 years ago Closed 16 years ago
Drag and Drop of graphic places URL in composer (rather than a <img src
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.5) Gecko/20030929 Build Identifier: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.5) Gecko/20030929 Drag and Drop of a image (JPG or PNG) places "file:///home/cvmiller/Screenshot.png" rather than the image in the Composer.This is using Mandrake 9.1 PPC (Gnome & Nautilus). This has been broken in every version of Mozilla that I have tried (which goes back a long way). I am unaware that this feature has ever worked. Reproducible: Always Steps to Reproduce: 1.Open New Composer Window 2.Open a Nautilus Window 3.Drag and drop a graphic file (JPG, PNG, GIF) from the Nautilus Window to the Composer Window Actual Results: the string "file:///home/cvmiller/Screenshot.png" is inserted into the Composer Window Expected Results: The image should be inserted into the Composer window (just like it does for other platforms, such as Windows and Mac)
This works on MacOSX mozilla so I'm guessing this is a linux issue. I'm guessing it works if you drag an image from a browser window into the Composer window. The bug is probably specific to dragging from the OS into Composer. icky workaround: cut the url from Composer, insert > image, paste url into dialog, click radio button for no alt text (or add it), click insert. alternative icky workaround: load image in browser, drag from browser into composer If someone can confirm that the bug is indeed specific to OS dragging I recommend that this bug be reassigned to XP Apps: Drag and Drop cc glazman in case this bug affects his efforts
Also works on WinXP.
Clearification: This bug is only in LINUX. I am requesting that the behavior in Linux be similar to that of Windows and MacOS.
Assignee: composer → blizzard
Component: Composer → Widget: Gtk
Product: Mozilla Application Suite → Core
QA Contact: ian
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
Thanks to all, but the bug remains in Mozilla 1.7.6 composer, it is specific to the Linux OS (both with Gnome, and KDE). It isn't hard to reproduce (follow instructions in original post). It is a problem with both x86 and PPC linux. I have reproduced this problem with the latest version of seamonkey (1.0 alpha) under Linux (x86) and Gnome. As a side note, I have performed the same test with Nvu (1.0) and it properly handles the images (displaying the image rather than the path to the image).
Its reproducible even on TB 184.108.40.206. Same problem is there with firefox 220.127.116.11 on Linux. I think its GTK+ problem.
Assignee: blizzard → ventnor.bugzilla
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
This works, and does the exact same thing that Cocoa does to generate an nsILocalFile, albeit I've learned some very strange things about GTK's drag stuff in this case. Maybe its because I request plain text, but newlines (both \n and \r) are added at the end. It also gives off a file:// URL rather than a path so I had to fix that up too. Still, a huge boost to editor consumers on Linux!
+ const char* castedText = "castedText"? ew. "text" please. + reinterpret_cast<char*>(mTargetDragData); static_cast Use StripChar to get rid of the newlines. + nsCOMPtr<nsISupports> genericDataWrapper; + genericDataWrapper = do_QueryInterface(file); Why do you need this? This doesn't really do anything. The documentation for SetTransferData says * @param aData the data, some variant of class in nsISupportsPrimitives.idl, * or an nsIFlavorDataProvider (see above) But it seems we actually and use nsIFile here, so please change the documentation to mention that.
(In reply to comment #8) > + const char* castedText = > > "castedText"? ew. "text" please. > > + reinterpret_cast<char*>(mTargetDragData); > > static_cast You can blame Chris Blizzard's conventions for that ;-) > + nsCOMPtr<nsISupports> genericDataWrapper; > + genericDataWrapper = do_QueryInterface(file); > > Why do you need this? This doesn't really do anything. > > The documentation for SetTransferData says > > * @param aData the data, some variant of class in > nsISupportsPrimitives.idl, > * or an nsIFlavorDataProvider (see above) > > But it seems we actually and use nsIFile here, so please change the > documentation to mention that. > I don't really understand this comment. What exactly should I mention in the documentation?
That aData can be an nsIFile.
Comment on attachment 307179 [details] [diff] [review] Patch 2 A very small patch to enable platform parity and provide a non-trivial functionality increase to users of editor.
Attachment #307179 - Flags: approval1.9?
Hey this is _great_ news! Thanks to all who worked on this, finally bringing parity to Linux. Will this patch be accepted upstream (so the masses will have this feature)? Craig...
Comment on attachment 307179 [details] [diff] [review] Patch 2 a1.9=beltzner
Attachment #307179 - Flags: approval1.9? → approval1.9+
Checking in widget/src/gtk2/nsDragService.cpp; /cvsroot/mozilla/widget/src/gtk2/nsDragService.cpp,v <-- nsDragService.cpp new revision: 1.22; previous revision: 1.21 done Checking in widget/public/nsITransferable.idl; /cvsroot/mozilla/widget/public/nsITransferable.idl,v <-- nsITransferable.idl new revision: 1.13; previous revision: 1.12 done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
This patch broke the ability to drag'n'drop multiple files in to a mozilla window. My problem in bug 428876 goes away when I back out this patch locally.
You need to log in before you can comment on or make changes to this bug.