Saving printer selection in Windows


Is anyone by any chance using a GtkPrintOperation in Windows and managing to
save the printer selection between print operations? If so how?

I want to do this so that the user does not have to keep choosing the
printer each time if they choose something other than the default one. After
a print operation I call gtk_print_operation_get_print_settings(), then
gtk_print_settings_get_printer() and save a copy of the returned printer
name. Then before the next print operation I call gtk_print_settings_new(),
gtk_print_settings_set_printer() with the saved printer name and then
gtk_print_operation_set_print_settings(). But the printer dialog opens with
the default printer selected every time.

It works OK in Linux, and I also use gtk_print_settings_get_paper_size() /
gtk_print_settings_set_paper_size() at the same time and that works OK in
both Linux and Windows. It's just the printer setting that seems to fail to
override the Windows default printer.


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