diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-12-17 17:09:55 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-12-17 17:09:55 -0500 |
commit | 845f2657dbb0b353521fbd6a529ac7083bd65002 (patch) | |
tree | 6c81d4b0d50c4358f7ab28bf6daaace41b51adfe | |
parent | 08c699c745fab6f872390760b4ba8aa7b3e9da48 (diff) | |
download | gtk+-845f2657dbb0b353521fbd6a529ac7083bd65002.tar.gz |
cups: Warn only once if colord is not available
No need to keep complaining about this.
https://bugzilla.gnome.org/show_bug.cgi?id=791650
-rw-r--r-- | modules/printbackends/cups/gtkprintercups.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/printbackends/cups/gtkprintercups.c b/modules/printbackends/cups/gtkprintercups.c index 068aba74c5..525382aa8a 100644 --- a/modules/printbackends/cups/gtkprintercups.c +++ b/modules/printbackends/cups/gtkprintercups.c @@ -539,12 +539,17 @@ colord_client_connect_cb (GObject *source_object, gboolean ret; GError *error = NULL; GtkPrinterCups *printer = GTK_PRINTER_CUPS (user_data); + static gboolean colord_warned = FALSE; ret = cd_client_connect_finish (CD_CLIENT (source_object), res, &error); if (!ret) { - g_warning ("failed to contact colord: %s", error->message); + if (!colord_warned) + { + g_warning ("failed to contact colord: %s", error->message); + colord_warned = TRUE; + } g_error_free (error); } |