[gnome-todo] timer: Properly parse error
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] timer: Properly parse error
- Date: Mon, 5 Feb 2018 01:04:23 +0000 (UTC)
commit 338a408a183f7c27a136fe939c5be70acf990e5e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Feb 3 18:39:43 2018 -0200
timer: Properly parse error
src/gtd-timer.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/gtd-timer.c b/src/gtd-timer.c
index 093192e..0f55e5c 100644
--- a/src/gtd-timer.c
+++ b/src/gtd-timer.c
@@ -128,20 +128,25 @@ login_proxy_acquired_cb (GObject *source,
GAsyncResult *res,
gpointer user_data)
{
+ g_autoptr (GError) error = NULL;
GtdTimer *self;
- GError *error;
self = GTD_TIMER (user_data);
- error = NULL;
+
+ gtd_object_set_ready (GTD_OBJECT (self), TRUE);
self->logind = g_dbus_proxy_new_for_bus_finish (res, &error);
+ if (error)
+ {
+ g_warning ("Error acquiring org.freedesktop.login1: %s", error->message);
+ return;
+ }
+
g_signal_connect (self->logind,
"g-signal",
G_CALLBACK (logind_signal_received_cb),
self);
-
- gtd_object_set_ready (GTD_OBJECT (self), TRUE);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]