[Webkit-unassigned] [Bug 22898] [GTK] need proper API for printing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 2 23:33:45 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=22898
------- Comment #35 from zecke at selfish.org 2009-04-02 23:33 PDT -------
(From update of attachment 29122)
> +
> + g_assert_cmpint(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(webView), "signal-handled")), ==, TRUE);
great!!!
> +
> + // Does printing directly to a file?
> + GError *error = NULL;
> + gchar* temporaryFilename = NULL;
> + gint fd = g_file_open_tmp ("webkit-testwebframe-XXXXXX", &temporaryFilename, &error);
> + close(fd);
> +
> + // We delete the file, so that we can easily figure out that the
> + // file got printed;
> + if (error || (g_unlink(temporaryFilename) == -1)) {
> + g_critical("Failed to open a temporary file for writing: %s.", error->message);
> + g_error_free(error);
> + goto cleanup;
> + }
> + gtk_print_operation_set_export_filename(operation, temporaryFilename);
> + result = webkit_web_frame_print_full (webFrame, operation, action, error);
This looks like a race. Will GtkPrint just overwrite the export file?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list