GNOME Bugzilla – Bug 406650
Would be nice to be able to print a GtkTextView
Last modified: 2013-03-24 15:16:37 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 :)
Or GtkTextBuffer?
Mmh, indeed, that sounds more relevant :)
Is anything planned towards this?
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.
(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?
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 :)
Implemented in GtkSourceView.
The request was actually about GtkTextView, not GtkSourceView, which are different projects and different use-cases.