diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-06-19 16:53:04 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-06-19 16:53:04 -0500 |
commit | ee30bb04d1ee4842fd20bec5c673215df5a878c5 (patch) | |
tree | b349945106975f082566128e1726392d5eb550ce /src/datetime-prefs.c | |
parent | 42cfd74dc245913286cfd2c3ac0cc6caf2d25bff (diff) | |
download | ayatana-indicator-datetime-ee30bb04d1ee4842fd20bec5c673215df5a878c5.tar.gz ayatana-indicator-datetime-ee30bb04d1ee4842fd20bec5c673215df5a878c5.tar.bz2 ayatana-indicator-datetime-ee30bb04d1ee4842fd20bec5c673215df5a878c5.zip |
in our async callbacks, don't call g_warning() when we get a G_IO_ERROR_CANCELLED
Diffstat (limited to 'src/datetime-prefs.c')
-rw-r--r-- | src/datetime-prefs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c index ef0a553..1eaaf1e 100644 --- a/src/datetime-prefs.c +++ b/src/datetime-prefs.c @@ -176,7 +176,8 @@ polkit_perm_ready (GObject *source_object, GAsyncResult *res, gpointer user_data GPermission * permission = polkit_permission_new_finish (res, &error); if (error != NULL) { - g_warning ("Could not get permission object: %s", error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning ("Could not get permission object: %s", error->message); g_error_free (error); return; } @@ -192,7 +193,8 @@ dbus_set_answered (GObject *object, GAsyncResult *res, gpointer command) GVariant * answers = g_dbus_proxy_call_finish (G_DBUS_PROXY (object), res, &error); if (error != NULL) { - g_warning("Could not set '%s' using timedated: %s", (gchar *)command, error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_warning("Could not set '%s' using timedated: %s", (gchar *)command, error->message); g_error_free(error); return; } @@ -247,7 +249,8 @@ proxy_ready (GObject *object, GAsyncResult *res, IndicatorDatetimePanel * self) self->priv->proxy = g_dbus_proxy_new_for_bus_finish (res, &error); if (error != NULL) { - g_critical("Could not grab DBus proxy for timedated: %s", error->message); + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) + g_critical("Could not grab DBus proxy for timedated: %s", error->message); g_error_free(error); return; } |