[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Replace deprecated GTimeVal

noreply at xfce.org noreply at xfce.org
Sun Mar 22 11:57:33 CET 2020


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit 6f981a655a40a6888a934c2d15731bbdc8e2abbd
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Mar 22 06:57:27 2020 -0400

    Replace deprecated GTimeVal
---
 src/gs-listener-dbus.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index 4a51566..66b112a 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -103,13 +103,13 @@ struct GSListenerPrivate {
 };
 
 typedef struct {
-    int       entry_type;
-    char     *application;
-    char     *reason;
-    char     *connection;
-    guint32   cookie;
-    gint32    fd;
-    GTimeVal  since;
+    int        entry_type;
+    char      *application;
+    char      *reason;
+    char      *connection;
+    guint32    cookie;
+    gint32     fd;
+    GDateTime *since;
 } GSListenerRefEntry;
 
 enum {
@@ -161,6 +161,7 @@ gs_listener_ref_entry_free (GSListenerRefEntry *entry) {
     g_free (entry->connection);
     g_free (entry->application);
     g_free (entry->reason);
+    g_date_time_unref (entry->since);
     g_free (entry);
 }
 
@@ -709,7 +710,7 @@ accumulate_ref_entry (gpointer            key,
     char *description;
     char *time;
 
-    time = g_time_val_to_iso8601 (&entry->since);
+    time = g_date_time_format_iso8601 (entry->since);
 
     description = g_strdup_printf ("Application=\"%s\"; Since=\"%s\"; Reason=\"%s\";",
                                    entry->application,
@@ -777,7 +778,7 @@ listener_add_ck_ref_entry (GSListener     *listener,
     entry->cookie = listener_generate_unique_key (listener, entry_type);
     entry->application = g_strdup ("ConsoleKit");
     entry->reason = g_strdup ("Session is not active");
-    g_get_current_time (&entry->since);
+    entry->since = g_date_time_new_now_local ();
 
     /* takes ownership of entry */
     listener_add_ref_entry (listener, entry_type, entry);
@@ -834,7 +835,7 @@ listener_dbus_add_ref_entry (GSListener     *listener,
     entry->cookie = listener_generate_unique_key (listener, entry_type);
     entry->application = g_strdup (application);
     entry->reason = g_strdup (reason);
-    g_get_current_time (&entry->since);
+    entry->since = g_date_time_new_now_local ();
 
     listener_add_ref_entry (listener, entry_type, entry);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list