Skip to content

Commit ec60df2

Browse files
author
Adrià Arrufat
committed
fix deprecated warnings
1 parent 3c1d224 commit ec60df2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,13 +318,13 @@ public class Pdftag : ApplicationWindow {
318318
this.format_label.label = "Format: " + this.document.get_pdf_version_string ();
319319
this.pages_label.label = "Pages: " + this.document.get_n_pages ().to_string ();
320320

321-
this.creation_date = new DateTime.from_unix_local ((int64) this.document.creation_date);
321+
this.creation_date = new DateTime.from_unix_local ((int64) this.document.creation_datetime);
322322
this.creation_date_btn.label = creation_date.format (this.date_format);
323323
this.creation_hour_btn.set_value (double.parse (creation_date.format ("%H")));
324324
this.creation_min_btn.set_value (double.parse (creation_date.format ("%M")));
325325
this.creation_sec_btn.set_value (double.parse (creation_date.format ("%S")));
326326

327-
this.mod_date = new DateTime.from_unix_local ((int64) this.document.mod_date);
327+
this.mod_date = new DateTime.from_unix_local ((int64) this.document.mod_datetime);
328328
this.mod_date_btn.label = mod_date.format (this.date_format);
329329
this.mod_hour_btn.set_value (double.parse (mod_date.format ("%H")));
330330
this.mod_min_btn.set_value (double.parse (mod_date.format ("%M")));
@@ -376,8 +376,8 @@ public class Pdftag : ApplicationWindow {
376376
this.mod_min_btn.get_value_as_int (),
377377
this.mod_sec_btn.get_value ()
378378
);
379-
this.document.creation_date = (int) creation_date.to_unix ();
380-
this.document.mod_date = (int) mod_date.to_unix ();
379+
this.document.creation_datetime = creation_date;
380+
this.document.mod_datetime = mod_date;
381381

382382
// save the modified document
383383
try {

0 commit comments

Comments
 (0)