Re: [Gnome-print] GnomePrintMaster & paper size + Tutorial



Hello!

Yes, although the gnome_paper_* functions are deprecated, there is no
better alternative at moment.
It will be somewhat sorted out in gnome-2. The main problem is, that
gnome-paper a) is in libgnome, where it does not belong, and b) does
not allow custom paper size and c) is not tied to available paper sizes
of selected printer.

Abut tutorial - I would be more eager to write it, if i'd know, that
everything does not change in near future ;) There is FAQ in
http://www.gnome.org/projects/gnome-print but it need some cleanup,
and also is dealing more with imaging/font issues.

Best wishes,
Lauris Kaplinski

On Tue, 2001-10-30 at 05:55, Bryan Buchanan wrote:
> 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
> 
> 
> 
> 
> 
> _______________________________________________
> Gnome-print maillist  -  Gnome-print@ximian.com
> http://lists.ximian.com/mailman/listinfo/gnome-print






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]