summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-12-17 17:09:55 -0500
committerMatthias Clasen <mclasen@redhat.com>2017-12-17 17:09:55 -0500
commit845f2657dbb0b353521fbd6a529ac7083bd65002 (patch)
tree6c81d4b0d50c4358f7ab28bf6daaace41b51adfe
parent08c699c745fab6f872390760b4ba8aa7b3e9da48 (diff)
downloadgtk+-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.c7
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);
}