[gitg/fix-warnings: 6/7] use datetime for visited




commit 24f383e32f2eb6f21887653fef567cdb600406f2
Author: Alberto Fanjul <albertofanjul gmail com>
Date:   Tue Feb 15 01:11:21 2022 +0100

    use datetime for visited

 libgitg/gitg-repository-list-box.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgitg/gitg-repository-list-box.vala b/libgitg/gitg-repository-list-box.vala
index 67cea89d..06fda8b8 100644
--- a/libgitg/gitg-repository-list-box.vala
+++ b/libgitg/gitg-repository-list-box.vala
@@ -318,7 +318,7 @@ namespace Gitg
 
                                d_bookmark_file.set_mime_type(uri, item.get_mime_type());
                                d_bookmark_file.set_groups(uri, item.get_groups());
-                               d_bookmark_file.set_visited(uri, (time_t)item.get_modified());
+                               d_bookmark_file.set_visited_date_time(uri, new 
GLib.DateTime.from_unix_utc(item.get_modified()));
 
                                var app_name = Environment.get_application_name();
                                var app_exec = string.join(" ", Environment.get_prgname(), "%f");
@@ -441,7 +441,7 @@ namespace Gitg
 
                                try
                                {
-                                       visited = new 
DateTime.from_unix_utc(d_bookmark_file.get_visited(uri));
+                                       visited = d_bookmark_file.get_visited_date_time(uri);
                                } catch {};
 
                                add_repository(repo, visited);
@@ -497,7 +497,7 @@ namespace Gitg
                {
                        d_bookmark_file.set_mime_type(uri, "inode/directory");
                        d_bookmark_file.set_groups(uri, new string[] { "gitg" });
-                       d_bookmark_file.set_visited(uri, visited == null ? -1 : (time_t)visited.to_unix());
+                       d_bookmark_file.set_visited_date_time(uri, visited == null ? new GLib.DateTime.now() 
: visited);
 
                        var app_name = Environment.get_application_name();
                        var app_exec = string.join(" ", Environment.get_prgname(), "%f");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]