[Gnome-print] GnomePrintMaster & paper size + Tutorial
- From: Bryan Buchanan <bryanb webbtide com au>
- To: gnome-print helixcode com
- Subject: [Gnome-print] GnomePrintMaster & paper size + Tutorial
- Date: Tue, 30 Oct 2001 13:55:13 +1000
Hi,
I'm just getting started with gnome-print, and I'm finding it's really
very cool.
In the test programs, the paper size can be set with
printer = gnome_printer_dialog_new_modal ();
pc = gnome_print_context_new_with_paper_size (printer, "US-Letter");
If I'm using the GnomePrintDialog and GnomePrintMaster, I'm doing:
gpd = GNOME_PRINT_DIALOG (gnome_print_dialog_new(heading,
GNOME_PRINT_DIALOG_COPIES));
gnome_print_dialog_set_copies(gpd, copies, collate);
switch (gnome_dialog_run(GNOME_DIALOG(gpd))) {
// stuff deleted
}
// transfer dialog data to output context
gpm = gnome_print_master_new();
gnome_print_dialog_get_copies(gpd, &copies, &collate);
gnome_print_master_set_copies(gpm, copies, collate);
gnome_print_master_set_printer(gpm,
gnome_print_dialog_get_printer(gpd));
// set paper size here !
gnome_print_master_set_paper(gpm,
gnome_paper_with_name("US-Letter"));
In gnome-paper.h, it says the functions there are deprecated.
(i.e. gnome_paper_with_name() ).
Is there another/better way to set the preferred paper size ?
On the subject of a tutorial, I think the project desperately needs a
tutorial,
probably along the lines of the GTK tutorial (i.e. an overview of the
most
common functions, and some example code demonstrating them). I realise
that the programs in /tests pretty much covers the API, but it's a
little bit
too much digging for complete newbies to get started. I also think
it would lead to much wider usage of gnome-print if there was an easier
introduction to it.
I'm not sure what the protocol is for this, but I'd be more than happy
to
contribute an appropriate amount of money or cases of beer (that'd be
XXXX
for those not in Brisbane,Australia) etc to enthuse someone to produce
a tutorial.
Bryan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]