Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error display #5

Open
SVGAnimate opened this issue Dec 20, 2024 · 1 comment
Open

Improve error display #5

SVGAnimate opened this issue Dec 20, 2024 · 1 comment

Comments

@SVGAnimate
Copy link

Hello,

The message "Printer not found is not displayed.

To get this :

svganimate@work:~$ ./wkgtkprinter -i ... -o ...
WebKitPrintError: Printer not found

Please, add :

  1. near line : https://github.com/gnudles/wkgtkprinter/blob/master/wkgtkprinter.c#L14
static void
print_failed (WebKitPrintOperation *print_operation,
               gpointer              error,
               gpointer              user_data)
{
    GError *e = error;
    g_print("%s: %s\n",
             g_quark_to_string(e->domain),
             (gchar*)e->message);
    gtk_main_quit();
}
  1. near line : https://github.com/gnudles/wkgtkprinter/blob/master/wkgtkprinter.c#L191
g_signal_connect (print_operation, "failled", G_CALLBACK (print_failed), &user_data);

Thanks

@SVGAnimate
Copy link
Author

This change can make a difference

    gtk_print_settings_set_printer (print_settings,
                                    "Imprimer dans un fichier");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant