Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created July 19, 2010 13:18
Show Gist options
  • Save onlyshk/481391 to your computer and use it in GitHub Desktop.
Save onlyshk/481391 to your computer and use it in GitHub Desktop.
void print_pixbuf(GtkWidget* widget, MainWin* mw)
{
GtkPrintOperation *op;
GtkPrintOperationResult res;
GtkPrintSettings *settings;
op = gtk_print_operation_new ();
gtk_print_operation_set_n_pages (op, g_list_length (mw->img_list->list));
gtk_print_operation_set_unit (op, GTK_UNIT_MM);
g_signal_connect (op, "draw_page", G_CALLBACK (draw_page), mw);
res = gtk_print_operation_run (op, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, mw, NULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment