After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 406650 - Would be nice to be able to print a GtkTextView
Would be nice to be able to print a GtkTextView
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
2.10.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-02-11 10:50 UTC by Colin Leroy
Modified: 2013-03-24 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Claws Mail's implementation of GtkTextView printing (32.15 KB, text/x-csrc)
2007-09-22 22:37 UTC, Colin Leroy
Details

Description Colin Leroy 2007-02-11 10:50:00 UTC
Hi,

it would be nice if GtkPrintOperation was integrated in GtkTextView, so that GtkTextView users could just call

gtk_text_view_print(textview);

to be able to print the contents of their textview via GtkPrintOperation, with tags (color, bold, underlined) and embedded pixbuf support.

That would avoid having to do it in apps again and again :)
Comment 1 Behdad Esfahbod 2007-02-13 21:07:07 UTC
Or GtkTextBuffer?
Comment 2 Colin Leroy 2007-02-13 22:13:36 UTC
Mmh, indeed, that sounds more relevant :)
Comment 3 Colin Leroy 2007-03-24 19:48:13 UTC
Is anything planned towards this?
Comment 4 Colin Leroy 2007-09-22 16:02:13 UTC
If no one plans to do anything about that, you could as well close this bug WONTFIX. We decided not to wait and implemented it in our app. 
Comment 5 Christian Persch 2007-09-22 20:32:15 UTC
(In reply to comment #4)
> If no one plans to do anything about that, you could as well close this bug
> WONTFIX. We decided not to wait and implemented it in our app. 

So apparently you do have code that does what this report requests. Why don't you contribute it to gtk+ then?

Comment 6 Colin Leroy 2007-09-22 22:37:38 UTC
Created attachment 96035 [details]
Claws Mail's implementation of GtkTextView printing

(In reply to comment #5)
> (In reply to comment #4)
> > If no one plans to do anything about that, you could as well close this bug
> > WONTFIX. We decided not to wait and implemented it in our app. 
> 
> So apparently you do have code that does what this report requests. Why don't
> you contribute it to gtk+ then?

I do not have the courage to remove the Claws-specific parts in it, reformat it, and go through a few iterations of a patch via Bugzilla before it gets included. Whoever wants to do it is welcome to do so from our code. It's licensed as GPL v3 or later, but we're OK to relicense it LGPL v2+ for GTK. Here is the file, attached. Do what you want with it :)
Comment 7 Sébastien Wilmet 2013-03-24 15:12:03 UTC
Implemented in GtkSourceView.
Comment 8 Holger Berndt 2013-03-24 15:16:37 UTC
The request was actually about GtkTextView, not GtkSourceView, which are different projects and different use-cases.