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
This commit is contained in:
Matthias Clasen 2017-12-17 17:09:55 -05:00
parent 32332b3a03
commit 0eaa76a032

View File

@ -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);
}