diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-03 13:14:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-04-03 13:14:53 +0200 |
commit | c43dfb815a4951b8248f4f0e98babe4f80204f03 (patch) | |
tree | 82745ed2353757c41ea1865bad9ac7a1b0a8a366 /src/data_imports | |
parent | 2785a691b958a79a1dd606c445188c71c3f58b3c (diff) |
Imported Upstream version 0.22.0upstream/0.22.0
Diffstat (limited to 'src/data_imports')
-rw-r--r-- | src/data_imports/DataImportJob.vala | 6 | ||||
-rw-r--r-- | src/data_imports/DataImportSource.vala | 15 | ||||
-rw-r--r-- | src/data_imports/DataImports.vala | 2 | ||||
-rw-r--r-- | src/data_imports/DataImportsPluginHost.vala | 2 | ||||
-rw-r--r-- | src/data_imports/DataImportsUI.vala | 37 |
5 files changed, 24 insertions, 38 deletions
diff --git a/src/data_imports/DataImportJob.vala b/src/data_imports/DataImportJob.vala index b27997c..df5aebe 100644 --- a/src/data_imports/DataImportJob.vala +++ b/src/data_imports/DataImportJob.vala @@ -1,4 +1,4 @@ -/* Copyright 2009-2014 Yorba Foundation +/* Copyright 2009-2015 Yorba Foundation * * This software is licensed under the GNU LGPL (version 2.1 or later). * See the COPYING file in this distribution. @@ -157,6 +157,10 @@ public class DataImportJob : BatchImportJob { string? title = src_photo.get_title(); if (title != null) photo.set_title(title); + // exposure time + time_t? date_time = src_photo.get_exposure_time(); + if (date_time != null) + photo.set_exposure_time(date_time); // import ID photo.set_import_id(import_roll.import_id); diff --git a/src/data_imports/DataImportSource.vala b/src/data_imports/DataImportSource.vala index d7e8ec8..f60c06d 100644 --- a/src/data_imports/DataImportSource.vala +++ b/src/data_imports/DataImportSource.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2014 Yorba Foundation +/* Copyright 2011-2015 Yorba Foundation * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. @@ -48,9 +48,16 @@ public class DataImportSource { warning("Could not get file metadata for %s: %s", get_filename(), e.message); metadata = null; } - - title = (metadata != null) ? metadata.get_title() : null; - exposure_time = (metadata != null) ? metadata.get_exposure_date_time() : null; + title = db_photo.get_title(); + if (title == null) { + title = (metadata != null) ? metadata.get_title() : null; + } + time_t? date_time = db_photo.get_exposure_time(); + if (date_time != null) { + exposure_time = new MetadataDateTime(date_time); + } else { + exposure_time = (metadata != null) ? metadata.get_exposure_date_time() : null; + } PhotoPreview? preview = metadata != null ? metadata.get_preview(0) : null; if (preview != null) { try { diff --git a/src/data_imports/DataImports.vala b/src/data_imports/DataImports.vala index 72c8b4d..1406d71 100644 --- a/src/data_imports/DataImports.vala +++ b/src/data_imports/DataImports.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2014 Yorba Foundation +/* Copyright 2011-2015 Yorba Foundation * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/data_imports/DataImportsPluginHost.vala b/src/data_imports/DataImportsPluginHost.vala index f92bc53..f783e1f 100644 --- a/src/data_imports/DataImportsPluginHost.vala +++ b/src/data_imports/DataImportsPluginHost.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2014 Yorba Foundation +/* Copyright 2011-2015 Yorba Foundation * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. diff --git a/src/data_imports/DataImportsUI.vala b/src/data_imports/DataImportsUI.vala index 9b171b1..7b975a7 100644 --- a/src/data_imports/DataImportsUI.vala +++ b/src/data_imports/DataImportsUI.vala @@ -1,4 +1,4 @@ -/* Copyright 2011-2014 Yorba Foundation +/* Copyright 2011-2015 Yorba Foundation * * This software is licensed under the GNU Lesser General Public License * (version 2.1 or later). See the COPYING file in this distribution. @@ -202,19 +202,19 @@ public class DataImportsDialog : Gtk.Dialog { public const int STANDARD_ACTION_BUTTON_WIDTH = 128; private Gtk.ComboBoxText service_selector_box; - private Gtk.Label service_selector_box_label; private Gtk.Box central_area_layouter; private Gtk.Button close_cancel_button; private Spit.DataImports.DialogPane active_pane; private Spit.DataImports.ConcreteDataImportsHost host; protected DataImportsDialog() { + Object(use_header_bar: 1); + ((Gtk.HeaderBar) get_header_bar()).set_show_close_button(false); resizable = false; delete_event.connect(on_window_close); string title = _("Import From Application"); - string label = _("Import media _from:"); set_title(title); @@ -225,9 +225,6 @@ public class DataImportsDialog : Gtk.Dialog { // service to select from service_selector_box = new Gtk.ComboBoxText(); service_selector_box.set_active(0); - service_selector_box_label = new Gtk.Label.with_mnemonic(label); - service_selector_box_label.set_mnemonic_widget(service_selector_box); - service_selector_box_label.set_alignment(0.0f, 0.5f); // get the name of the service the user last used string? last_used_service = Config.Facade.get_instance().get_last_used_dataimports_service(); @@ -248,30 +245,6 @@ public class DataImportsDialog : Gtk.Dialog { service_selector_box.set_active(0); service_selector_box.changed.connect(on_service_changed); - - /* the wrapper is not an extraneous widget -- it's necessary to prevent the service - selection box from growing and shrinking whenever its parent's size changes. - When wrapped inside a Gtk.Alignment, the Alignment grows and shrinks instead of - the service selection box. */ - Gtk.Alignment service_selector_box_wrapper = new Gtk.Alignment(1.0f, 0.5f, 0.0f, 0.0f); - service_selector_box_wrapper.add(service_selector_box); - - Gtk.Box service_selector_layouter = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 8); - service_selector_layouter.set_border_width(12); - service_selector_layouter.add(service_selector_box_label); - service_selector_layouter.pack_start(service_selector_box_wrapper, true, true, 0); - - /* 'service area' is the selector assembly plus the horizontal rule dividing it from the - rest of the dialog */ - Gtk.Box service_area_layouter = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); - service_area_layouter.pack_start(service_selector_layouter, true, true, 0); - Gtk.Separator service_central_separator = new Gtk.Separator(Gtk.Orientation.HORIZONTAL); - service_area_layouter.add(service_central_separator); - - Gtk.Alignment service_area_wrapper = new Gtk.Alignment(0.0f, 0.0f, 1.0f, 0.0f); - service_area_wrapper.add(service_area_layouter); - - ((Gtk.Box) get_content_area()).pack_start(service_area_wrapper, false, false, 0); } // Intall the central area in all cases @@ -281,7 +254,9 @@ public class DataImportsDialog : Gtk.Dialog { close_cancel_button = new Gtk.Button.with_mnemonic("_Cancel"); close_cancel_button.set_can_default(true); close_cancel_button.clicked.connect(on_close_cancel_clicked); - ((Gtk.Box) get_action_area()).add(close_cancel_button); + + ((Gtk.HeaderBar) get_header_bar()).pack_start(close_cancel_button); + ((Gtk.HeaderBar) get_header_bar()).pack_end(service_selector_box); set_standard_window_mode(); |