summaryrefslogtreecommitdiff
path: root/src/data_imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/data_imports')
-rw-r--r--src/data_imports/DataImportJob.vala6
-rw-r--r--src/data_imports/DataImportSource.vala6
-rw-r--r--src/data_imports/DataImports.vala2
-rw-r--r--src/data_imports/DataImportsPluginHost.vala5
-rw-r--r--src/data_imports/DataImportsUI.vala10
5 files changed, 15 insertions, 14 deletions
diff --git a/src/data_imports/DataImportJob.vala b/src/data_imports/DataImportJob.vala
index 4035ae6..eeaec40 100644
--- a/src/data_imports/DataImportJob.vala
+++ b/src/data_imports/DataImportJob.vala
@@ -13,7 +13,7 @@ public class DataImportJob : BatchImportJob {
private DataImportSource import_source;
private File? src_file;
private uint64 filesize;
- private time_t exposure_time;
+ private DateTime? exposure_time;
private DataImportJob? associated = null;
private HierarchicalTagIndex? detected_htags = null;
@@ -48,7 +48,7 @@ public class DataImportJob : BatchImportJob {
return (detected_htags.size > 0) ? HierarchicalTagIndex.from_paths(detected_htags) : null;
}
- public time_t get_exposure_time() {
+ public DateTime get_exposure_time() {
return exposure_time;
}
@@ -158,7 +158,7 @@ public class DataImportJob : BatchImportJob {
if (title != null)
photo.set_title(title);
// exposure time
- time_t? date_time = src_photo.get_exposure_time();
+ var date_time = src_photo.get_exposure_time();
if (date_time != null)
photo.set_exposure_time(date_time);
// import ID
diff --git a/src/data_imports/DataImportSource.vala b/src/data_imports/DataImportSource.vala
index ba00be3..012abdc 100644
--- a/src/data_imports/DataImportSource.vala
+++ b/src/data_imports/DataImportSource.vala
@@ -20,7 +20,7 @@ public class DataImportSource {
private string? title = null;
private string? preview_md5 = null;
private uint64 file_size;
- private time_t modification_time;
+ private DateTime modification_time;
private MetadataDateTime? exposure_time;
public DataImportSource(ImportableMediaItem db_photo) {
@@ -52,7 +52,7 @@ public class DataImportSource {
if (title == null) {
title = (metadata != null) ? metadata.get_title() : null;
}
- time_t? date_time = db_photo.get_exposure_time();
+ var date_time = db_photo.get_exposure_time();
if (date_time != null) {
exposure_time = new MetadataDateTime(date_time);
} else {
@@ -110,7 +110,7 @@ public class DataImportSource {
return get_name();
}
- public time_t get_exposure_time() {
+ public DateTime get_exposure_time() {
return (exposure_time != null) ? exposure_time.get_timestamp() : modification_time;
}
diff --git a/src/data_imports/DataImports.vala b/src/data_imports/DataImports.vala
index a98c91b..258a653 100644
--- a/src/data_imports/DataImports.vala
+++ b/src/data_imports/DataImports.vala
@@ -17,7 +17,7 @@ namespace DataImports {
public void init() throws Error {
string[] core_ids = new string[0];
- core_ids += "org.yorba.shotwell.dataimports.fspot";
+ core_ids += "org.gnome.shotwell.dataimports.fspot";
Plugins.register_extension_point(typeof(Spit.DataImports.Service), _("Data Imports"),
Resources.IMPORT, core_ids);
diff --git a/src/data_imports/DataImportsPluginHost.vala b/src/data_imports/DataImportsPluginHost.vala
index 158b8f4..46cfa46 100644
--- a/src/data_imports/DataImportsPluginHost.vala
+++ b/src/data_imports/DataImportsPluginHost.vala
@@ -474,8 +474,9 @@ private void data_import_reporter(ImportManifest manifest, BatchImportRoll impor
}
private int64 import_job_comparator(void *a, void *b) {
- return ((DataImportJob *) a)->get_exposure_time()
- - ((DataImportJob *) b)->get_exposure_time();
+
+ return nullsafe_date_time_comperator(((DataImportJob *) a)->get_exposure_time(),
+ ((DataImportJob *) b)->get_exposure_time());
}
}
diff --git a/src/data_imports/DataImportsUI.vala b/src/data_imports/DataImportsUI.vala
index 29791a4..6fb7158 100644
--- a/src/data_imports/DataImportsUI.vala
+++ b/src/data_imports/DataImportsUI.vala
@@ -34,7 +34,7 @@ public class ConcreteDialogPane : Spit.DataImports.DialogPane, GLib.Object {
public class StaticMessagePane : ConcreteDialogPane {
public StaticMessagePane(string message_string) {
Gtk.Label message_label = new Gtk.Label(message_string);
- (get_widget() as Gtk.Box).pack_start(message_label, true, true, 0);
+ ((Gtk.Box) get_widget()).pack_start(message_label, true, true, 0);
}
public StaticMessagePane.with_pango(string msg) {
@@ -42,7 +42,7 @@ public class StaticMessagePane : ConcreteDialogPane {
label.set_markup(msg);
label.set_line_wrap(true);
- (get_widget() as Gtk.Box).pack_start(label, true, true, 0);
+ ((Gtk.Box) get_widget()).pack_start(label, true, true, 0);
}
}
@@ -123,7 +123,7 @@ public class LibrarySelectionPane : ConcreteDialogPane {
button_box.add(import_button);
content_box.pack_end(button_box, true, false, 6);
- (get_widget() as Gtk.Box).pack_start(content_box, true, true, 0);
+ ((Gtk.Box) get_widget()).pack_start(content_box, true, true, 0);
set_import_button_sensitivity();
}
@@ -177,7 +177,7 @@ public class ProgressPane : ConcreteDialogPane {
progress_label = new Gtk.Label("");
content_box.pack_start(progress_label, false, true, 6);
- (get_widget() as Gtk.Container).add(content_box);
+ ((Gtk.Container) get_widget()).add(content_box);
}
public void update_progress(double progress, string? progress_message) {
@@ -285,7 +285,7 @@ public class DataImportsDialog : Gtk.Dialog {
}
}
- // Intall the central area in all cases
+ // Install the central area in all cases
central_area_layouter = new Gtk.Box(Gtk.Orientation.VERTICAL, 0);
((Gtk.Box) get_content_area()).pack_start(central_area_layouter, true, true, 0);