[gtk/glib-build-fix: 2/2] placesview: Keep up with GLib deprecations
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/glib-build-fix: 2/2] placesview: Keep up with GLib deprecations
- Date: Fri, 31 Jul 2020 16:19:21 +0000 (UTC)
commit 45c6b89e9f4ecab2269a73abb811c9d924586a65
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 31 12:18:54 2020 -0400
placesview: Keep up with GLib deprecations
We were using deprecated GBookmarkFile api here too.
gtk/gtkplacesview.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index cdf88ae974..e1fc1170be 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -278,6 +278,7 @@ server_list_add_server (GtkPlacesView *view,
GError *error;
char *title;
char *uri;
+ GDateTime *now;
error = NULL;
bookmarks = server_list_load (view);
@@ -295,7 +296,9 @@ server_list_add_server (GtkPlacesView *view,
title = g_file_info_get_attribute_as_string (info, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME);
g_bookmark_file_set_title (bookmarks, uri, title);
- g_bookmark_file_set_visited (bookmarks, uri, -1);
+ now = g_date_time_new_now_utc ();
+ g_bookmark_file_set_visited (bookmarks, uri, now);
+ g_date_time_unref (now);
g_bookmark_file_add_application (bookmarks, uri, NULL, NULL);
server_list_save (bookmarks);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]