mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
printdialog: fix sporadic win32 build failures
Private function `gtk_print_setup_get_printer` unconditionally calls `gtk_printer_find()`, which does not exist on Win32. But `gtk_print_setup_get_printer()` is never called either, so usually that whole code gets optimized out. Some compilation environment however do not cleanup unused functions, leading to linker error as `gtk_printer_find()` is not found. This patch should solve the link issue.
This commit is contained in:
parent
86e735cd5c
commit
4fa661b450
@ -188,6 +188,7 @@ gtk_print_setup_set_page_setup (GtkPrintSetup *setup,
|
||||
static GtkPrinter *
|
||||
gtk_print_setup_get_printer (GtkPrintSetup *setup)
|
||||
{
|
||||
#ifdef HAVE_GIO_UNIX
|
||||
if (!setup->printer)
|
||||
{
|
||||
const char *name = NULL;
|
||||
@ -198,6 +199,7 @@ gtk_print_setup_get_printer (GtkPrintSetup *setup)
|
||||
if (name)
|
||||
setup->printer = gtk_printer_find (name);
|
||||
}
|
||||
#endif
|
||||
|
||||
return setup->printer;
|
||||
}
|
||||
@ -1674,8 +1676,8 @@ gtk_print_dialog_print_file (GtkPrintDialog *self,
|
||||
#ifdef HAVE_GIO_UNIX
|
||||
PrintTaskData *ptd;
|
||||
GFileInputStream *content;
|
||||
#endif
|
||||
GError *error = NULL;
|
||||
#endif
|
||||
|
||||
g_return_if_fail (GTK_IS_PRINT_DIALOG (self));
|
||||
g_return_if_fail (parent == NULL || GTK_IS_WINDOW (parent));
|
||||
|
Loading…
Reference in New Issue
Block a user