Closed Bug 412196 Opened 17 years ago Closed 13 years ago

[1.8 only] patch to allow pasting image from clipboard into composer under linux/unix

Categories

(Core :: Widget: Gtk, enhancement)

1.8 Branch
x86
Linux
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: tokoe, Assigned: tokoe)

References

()

Details

(Whiteboard: [GS])

Attachments

(2 files)

User-Agent: w3m/0.5.1+cvs-1.968 Build Identifier: Hej, attached is a patch which adds the functionality to Thunderbird 2.0 to paste an image from the clipboard under Linux/Unix (whenever gtk2 widget is used...). I hope this patch will make it upstream :) Ciao, Tobias Reproducible: Always Steps to Reproduce: 1. 2. 3.
I don't think you need the #ifdef MOZILLA_1_8_BRANCH since the patch isn't very likely to get accepted for tb2, only for tb3. To get the patch included, set the appropriate review/superreview flag of the patch. See http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree Marking NEW as we got a patch.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Message Compose Window → Editor
Ever confirmed: true
Product: Thunderbird → Core
QA Contact: message-compose → editor
Assignee: nobody → tokoe
Attachment #296847 - Flags: superreview?(mkmelin+mozilla)
Attachment #296847 - Flags: review?(mkmelin+mozilla)
Comment on attachment 296847 [details] [diff] [review] Paste clipboard image into composer under Linux/Unix I'm not a reviewer for this code, try roc@ocallahan.org perhaps?
Attachment #296847 - Flags: superreview?(mkmelin+mozilla)
Attachment #296847 - Flags: review?(mkmelin+mozilla)
Attachment #296847 - Flags: review?(roc)
Status: NEW → ASSIGNED
Component: Editor → Widget: Gtk
QA Contact: editor → gtk
Version: unspecified → 1.8 Branch
Version: 1.8 Branch → Trunk
Comment on attachment 296847 [details] [diff] [review] Paste clipboard image into composer under Linux/Unix Please make your patch against the latest trunk CVS.
Attachment #296847 - Flags: superreview?(roc)
Hmm, it seems this issue is fixed in latest trunk already (at least what I can read from the sources) :| Can you paste images from clipboard under Linux? (compiling trunk here again will take some hours).
(In reply to comment #5) > Hmm, it seems this issue is fixed in latest trunk already (at least what I can > read from the sources) :| Can you paste images from clipboard under Linux? > (compiling trunk here again will take some hours). > AFAICT you can. This was fixed as part of bug 21747.
Comment on attachment 296847 [details] [diff] [review] Paste clipboard image into composer under Linux/Unix guess we don't need this then.
Attachment #296847 - Flags: superreview?(roc)
Attachment #296847 - Flags: review?(roc)
I suppose Linux distributions might want to take this on branch, in which case we could take it on branch too. But we don't need it on trunk anymore.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Ok, so do I have to open the bug again and trigger a review for branch?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: patch to allow pasting image from clipboard into composer under linux/unix → [1.8 only] patch to allow pasting image from clipboard into composer under linux/unix
Version: Trunk → 1.8 Branch
Attachment #296847 - Flags: superreview?(roc)
Attachment #296847 - Flags: review?(roc)
Status: REOPENED → ASSIGNED
Blizzard, caillon, who decides what to take on branch for Linux these days?
I trust the Linux brain trust at the distributions - caillon, asac, others. With your review, of course.
For 1.8.0.x that's asac and me. For 1.8.1.x that's still dveditz and co. This patch would need to get reviewed/approved for the 1.8.1 branch first I think before we'd take it on the 1.8.0 branch so we don't "regress" moving forward. But I'm not opposed to having it, pending discussion with asac if the rest falls into place, though I'd rather see the patch support more than just jpg (not sure if that's possible back then)
- tv.tv_sec = 0; + tv.tv_sec = 5; tv.tv_usec = kClipboardTimeout; You're adding 5 seconds here? wouldn't it make more sense to change kClipboardTimeout? + if (gdk_pixbuf_get_has_alpha(new_pixbuf) == TRUE) + format = imgIEncoder::INPUT_FORMAT_RGBA; Why bother since we can't create a transparent image anyway?
(In reply to comment #13) > - tv.tv_sec = 0; > + tv.tv_sec = 5; > tv.tv_usec = kClipboardTimeout; > > You're adding 5 seconds here? wouldn't it make more sense to change > kClipboardTimeout? Well, because increasing the microseconds is not enough, you need a timeout of several seconds for large images. > + if (gdk_pixbuf_get_has_alpha(new_pixbuf) == TRUE) > + format = imgIEncoder::INPUT_FORMAT_RGBA; > > Why bother since we can't create a transparent image anyway? We can't? So why does ImageEncoder provide that format flag? Ciao, Tobias
Maybe the encoder is capable of creating transparent images, but you're a) creating a JPEG, which doesn't support transparency and b) passing "transparency=none". > Well, because increasing the microseconds is not enough, you need a timeout > of several seconds for large images. OK, but you're changing kClipboardTimeout to mean "the clipboard timeout, minus five seconds", which is not very intuitive. Either you need two constants, say kClipboardTimeoutSeconds and kClipboardTimeoutMicroseconds, or you need to change kClipboardTimeout to 5000000 microseconds and do some arithmetic to split it up into the tv fields.
Comment on attachment 296847 [details] [diff] [review] Paste clipboard image into composer under Linux/Unix Comments need to be addressed
Attachment #296847 - Flags: superreview?(roc)
Attachment #296847 - Flags: superreview-
Attachment #296847 - Flags: review?(roc)
Attachment #296847 - Flags: review-
Tobias, do you still work on this -annoying- bug? Seems most of the job is done, so it would be a pity if we stop when 90% of the job is done :-(
-> WONTFIX as this works on recent versions, and the 1.8 branch is dead.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago13 years ago
Resolution: --- → WONTFIX
sorry, it doesn't works for me on Ubuntu 11.10 and TB8 (also tryed with earlybird). Are you sure that this bug is fixed?
Yup- just tried it, works just fine - ubuntu (still 11.04) and tb 3.1.13, also latest trunk. Make sure you're using HTML compose mode though...
exemple of an image of a car in a odt document which doesn't work in Thunderbird 8. I also try in safe mode, the result is the same: the "past" command in the "Edit" menu is disabled (gray). I am sure I compose mail in html. I also check that the past command works in other application (like Gimp). Could you do the test to with this particular file? Any other person can give its feedback?
Yeah copying from that file doesn't work. Maybe the source have to be in compatible format (jpg/gif/png)? Try finding a pic on the web, in firefox go to the image and use "Copy Image" from the context menu, then paste in thunderbird. That's what i tested.
Ok, I understand now that my problem should have its own bug report. I will try to find an existing one or create a new one if needed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: