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:
parent
32332b3a03
commit
0eaa76a032
@ -539,12 +539,17 @@ colord_client_connect_cb (GObject *source_object,
|
|||||||
gboolean ret;
|
gboolean ret;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GtkPrinterCups *printer = GTK_PRINTER_CUPS (user_data);
|
GtkPrinterCups *printer = GTK_PRINTER_CUPS (user_data);
|
||||||
|
static gboolean colord_warned = FALSE;
|
||||||
|
|
||||||
ret = cd_client_connect_finish (CD_CLIENT (source_object),
|
ret = cd_client_connect_finish (CD_CLIENT (source_object),
|
||||||
res, &error);
|
res, &error);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
{
|
||||||
|
if (!colord_warned)
|
||||||
{
|
{
|
||||||
g_warning ("failed to contact colord: %s", error->message);
|
g_warning ("failed to contact colord: %s", error->message);
|
||||||
|
colord_warned = TRUE;
|
||||||
|
}
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user