GnomePrintUnit Q
- From: "Robert Roebling" <robert roebling de>
- To: gnome-print <gnome-print-list gnome org>
- Subject: GnomePrintUnit Q
- Date: Mon, 22 Nov 2004 15:04:36 +0100
Hi,
somewhat in connection with the problem concerning
getting the correct values from the paper selector,
I still try to find out the right way to get those
values if the margins code would work. I need to
get the margins in mm (or I at least need to know
what unit is used). I am able to convert between
units if I know which units are used, like this:
<<<<<
double my_value = 1.0;
const GnomePrintUnit *mm_unit =
gnome_print_unit_get_by_abbreviation( (const guchar*) "mm" );
const GnomePrintUnit *pts_unit =
gnome_print_unit_get_by_abbreviation( (const guchar*) "Pts" );
gnome_print_convert_distance( &my_value, pts_unit, mm_unit );
>>>>>
Since the dialog itself is broken, I cannot test
if my code is working. This seems to compile
>>>>
const GnomePrintUnit *my_unit;
gnome_print_config_get_length (config,
(const guchar*) GNOME_PRINT_KEY_PAGE_MARGIN_LEFT,
&my_value, &my_unit);
gnome_print_convert_distance( &my_value, my_unit, mm_unit );
<<<<<
Thanks for any hint,
Robert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]