Page 1 of 1

[PB-Linux] Printing with 3.94 & Demo-App

Posted: Tue Jun 20, 2006 8:00 pm
by walker
Hi,

ever wanted to print on Linux with PB?
Here is a solution until 4.00 is ready (hope, there will be printer support)... Anyway

I've written a small text-app (nothing special) just to show, how to print on Linux.

The demo-application:
Image
(you can load/save textfiles, cut/copy/paste but no undo yet)

The printing dialog:
Image
Files to print MUST be previous saved (for the moment you can't print unsaved text); settings are NOT saved yet

There are a few things to do before you can start.
Install (if not already) the packages evince (for preview) and enscript (for textoutput) using your favorite package manager

Download this: http://home.arcor.de/x-linux/pure/TeEDx_source.tar.gz
(which contains the source and a precompiled exe)
or this:
http://home.arcor.de/x-linux/pure/TeEDx
(which is the executable only)

And finally here is an includefile for your own projects:
http://home.arcor.de/x-linux/pure/printing.pbi

Include this in your project, do a

Code: Select all

gtk_init_(0,0)
before this include; thats all
To call the printing dialog simply do a

Code: Select all

pd=create_window_print()
gtk_widgets_show_all_(pd)
May you have to include the missing_functions.pb too which are found in the tar.gz or here:
http://home.arcor.de/x-linux/pure/missing_functions.pb

It's a simple version for now (even without language support) so I appologize for the labels in german... translation follows

Btw.: the application and the dialogs are created with Glade2PB.. :wink:

The source is free for everyone. Feel free to modify and use in your own projects (may you mention me in the credits.. but this isn't a must)

Feedback, questions and comments are appreciated...

Posted: Tue Jun 20, 2006 8:44 pm
by dracflamloc
Hey very cool man! I might actually be needing this soon.

Posted: Tue Jun 20, 2006 11:29 pm
by Inf0Byt3
Gonna try this and the new Glade2PB tomorrow. Thanks!

Posted: Wed Jun 21, 2006 12:21 am
by Fred
Yes, the printer management is already done for PB4 Linux.

Posted: Wed Jun 21, 2006 9:28 am
by walker
Nice to hear.... and if you may need help on testing... :D

Btw. Which GTK-version do you use while developing v4.0?

Posted: Wed Jun 21, 2006 1:19 pm
by Flype
Fred wrote:Yes, the printer management is already done for PB4 Linux.
yeah, a little screenshot ?

Posted: Wed Jun 21, 2006 2:46 pm
by walker
:shock:

Image

:lol:

Posted: Wed Jun 21, 2006 2:49 pm
by Flype
very thank you walker, nice to you. :D

but, humm, i was speaking about the PrintRequester under linux...
what does it looks like ? :roll:

Posted: Wed Jun 21, 2006 3:50 pm
by walker
sorry.. couldn't resist.. :wink:

maybe it looks like this:

http://groups.osdl.org/apps/group_publi ... it-gtk.pdf

Posted: Wed Jun 21, 2006 5:47 pm
by Flype
yes i guessed you couldn't resist, funny guy :)
about gtk printer dialog, it looks very good indeed.

Posted: Wed Jun 21, 2006 6:30 pm
by walker
Yes, and I hope, this will be near to the requester we'll get... (as this is the GTK-build-in requester... )

@Fred: any hint?