openbsd-ports/x11/gnome/settings-daemon/patches/patch-plugins_print-notifications_gsd-printer_c
2012-08-04 14:48:18 +00:00

31 lines
1.3 KiB
Plaintext

$OpenBSD: patch-plugins_print-notifications_gsd-printer_c,v 1.4 2012/08/04 14:50:19 ajacoutot Exp $
https://bugzilla.gnome.org/show_bug.cgi?id=679761
--- plugins/print-notifications/gsd-printer.c.orig Mon Apr 16 14:34:43 2012
+++ plugins/print-notifications/gsd-printer.c Sat Jul 28 17:49:19 2012
@@ -63,6 +63,14 @@ static GDBusNodeInfo *pdi_introspection_data = NULL;
#define GNOME_SESSION_PRESENCE_DBUS_PATH "/org/gnome/SessionManager/Presence"
#define GNOME_SESSION_PRESENCE_DBUS_IFACE "org.gnome.SessionManager.Presence"
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
+#define HAVE_CUPS_1_6 1
+#endif
+
+#ifndef HAVE_CUPS_1_6
+#define ippGetState(ipp) ipp->state
+#endif
+
enum {
PRESENCE_STATUS_AVAILABLE = 0,
PRESENCE_STATUS_INVISIBLE,
@@ -725,7 +733,7 @@ printer_autoconfigure (gchar *printer_name)
"AutoConfigure",
("Automatic configuration"));
if (response) {
- if (response->state == IPP_ERROR)
+ if (ippGetState (response) == IPP_ERROR)
g_warning ("An error has occured during automatic configuration of new printer.");
ippDelete (response);
}