[gnome-sound-recorder] listview: Replace deprecated function
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] listview: Replace deprecated function
- Date: Tue, 3 Mar 2020 22:59:48 +0000 (UTC)
commit 605d344cb9a26f02e5ca64d848e94be80abe4e06
Author: sevagen <sevagenv gmail com>
Date: Sat Feb 29 22:02:27 2020 +0530
listview: Replace deprecated function
FileInfo.get_modification_time() are deprecated. Switch to
get_modification_date_time() instead.
src/listview.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/listview.js b/src/listview.js
index 1e44796..05d32f2 100644
--- a/src/listview.js
+++ b/src/listview.js
@@ -117,16 +117,17 @@ var Listview = class Listview {
let finalFileName = GLib.build_filenamev([this._saveDir.get_path(),
returnedName]);
let fileUri = GLib.filename_to_uri(finalFileName, null);
- let timeVal = file.get_modification_time();
- let date = GLib.DateTime.new_from_timeval_local(timeVal);
+ let timeVal = file.get_modification_date_time();
+ let timeModified = file.get_attribute_uint64("time::modified");
+ let date = GLib.DateTime.new_from_unix_local(timeModified);
let dateModifiedSortString = date.format("%Y%m%d%H%M%S");
- let dateTime = GLib.DateTime.new_from_timeval_local(timeVal);
+ let dateTime = GLib.DateTime.new_from_unix_local(timeModified);
let dateModifiedDisplayString = MainWindow.displayTime.getDisplayTime(dateTime);
let dateCreatedYes = file.has_attribute("time::created");
let dateCreatedString = null;
if (this.dateCreatedYes) {
let dateCreatedVal = file.get_attribute_uint64("time::created");
- let dateCreated = GLib.DateTime.new_from_timeval_local(dateCreatedVal);
+ let dateCreated = GLib.DateTime.new_from_unix_local(dateCreatedVal);
dateCreatedString = MainWindow.displayTime.getDisplayTime(dateCreated);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]