diff options
Diffstat (limited to 'src/dialogs/AdjustDateTimeDialog.c')
-rw-r--r-- | src/dialogs/AdjustDateTimeDialog.c | 2300 |
1 files changed, 2300 insertions, 0 deletions
diff --git a/src/dialogs/AdjustDateTimeDialog.c b/src/dialogs/AdjustDateTimeDialog.c new file mode 100644 index 0000000..fe412df --- /dev/null +++ b/src/dialogs/AdjustDateTimeDialog.c @@ -0,0 +1,2300 @@ +/* AdjustDateTimeDialog.c generated by valac 0.40.4, the Vala compiler + * generated from AdjustDateTimeDialog.vala, do not modify */ + +/* Copyright 2016 Software Freedom Conservancy Inc. + * Copyright 2017 Jens Georg <mail@jensge.org> + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + + +#include <glib.h> +#include <glib-object.h> +#include <gtk/gtk.h> +#include <time.h> +#include <stdlib.h> +#include <string.h> +#include <glib/gi18n-lib.h> +#include <float.h> +#include <math.h> +#include <gdk-pixbuf/gdk-pixbuf.h> + + +#define TYPE_ADJUST_DATE_TIME_DIALOG (adjust_date_time_dialog_get_type ()) +#define ADJUST_DATE_TIME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialog)) +#define ADJUST_DATE_TIME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogClass)) +#define IS_ADJUST_DATE_TIME_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ADJUST_DATE_TIME_DIALOG)) +#define IS_ADJUST_DATE_TIME_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ADJUST_DATE_TIME_DIALOG)) +#define ADJUST_DATE_TIME_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogClass)) + +typedef struct _AdjustDateTimeDialog AdjustDateTimeDialog; +typedef struct _AdjustDateTimeDialogClass AdjustDateTimeDialogClass; +typedef struct _AdjustDateTimeDialogPrivate AdjustDateTimeDialogPrivate; + +#define ADJUST_DATE_TIME_DIALOG_TYPE_TIME_SYSTEM (adjust_date_time_dialog_time_system_get_type ()) +enum { + ADJUST_DATE_TIME_DIALOG_0_PROPERTY, + ADJUST_DATE_TIME_DIALOG_NUM_PROPERTIES +}; +static GParamSpec* adjust_date_time_dialog_properties[ADJUST_DATE_TIME_DIALOG_NUM_PROPERTIES]; +#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) + +#define TYPE_DATA_OBJECT (data_object_get_type ()) +#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject)) +#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass)) +#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT)) +#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT)) +#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass)) + +typedef struct _DataObject DataObject; +typedef struct _DataObjectClass DataObjectClass; + +#define TYPE_DATA_SOURCE (data_source_get_type ()) +#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource)) +#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass)) +#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE)) +#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE)) +#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass)) + +typedef struct _DataSource DataSource; +typedef struct _DataSourceClass DataSourceClass; + +#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ()) +#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource)) +#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) +#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE)) +#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE)) +#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass)) + +typedef struct _ThumbnailSource ThumbnailSource; +typedef struct _ThumbnailSourceClass ThumbnailSourceClass; + +#define TYPE_MEDIA_SOURCE (media_source_get_type ()) +#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource)) +#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass)) +#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE)) +#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE)) +#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass)) + +typedef struct _MediaSource MediaSource; +typedef struct _MediaSourceClass MediaSourceClass; + +#define TYPE_DATEABLE (dateable_get_type ()) +#define DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATEABLE, Dateable)) +#define IS_DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATEABLE)) +#define DATEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DATEABLE, DateableIface)) + +typedef struct _Dateable Dateable; +typedef struct _DateableIface DateableIface; + +#define TYPE_PAGE_WINDOW (page_window_get_type ()) +#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow)) +#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass)) +#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW)) +#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW)) +#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass)) + +typedef struct _PageWindow PageWindow; +typedef struct _PageWindowClass PageWindowClass; + +#define TYPE_APP_WINDOW (app_window_get_type ()) +#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow)) +#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass)) +#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW)) +#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW)) +#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass)) + +typedef struct _AppWindow AppWindow; +typedef struct _AppWindowClass AppWindowClass; + +#define TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ()) +#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade)) +#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) +#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE)) +#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE)) +#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass)) + +typedef struct _ConfigurationFacade ConfigurationFacade; +typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass; + +#define CONFIG_TYPE_FACADE (config_facade_get_type ()) +#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade)) +#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass)) +#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE)) +#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE)) +#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass)) + +typedef struct _ConfigFacade ConfigFacade; +typedef struct _ConfigFacadeClass ConfigFacadeClass; +#define _g_free0(var) (var = (g_free (var), NULL)) +#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) +#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); +#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; } +#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; } +#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg); + +struct _AdjustDateTimeDialog { + GtkDialog parent_instance; + AdjustDateTimeDialogPrivate * priv; +}; + +struct _AdjustDateTimeDialogClass { + GtkDialogClass parent_class; +}; + +typedef enum { + ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_AM, + ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_PM, + ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR +} AdjustDateTimeDialogTimeSystem; + +struct _AdjustDateTimeDialogPrivate { + gboolean no_original_time; + time_t original_time; + GtkLabel* original_time_label; + GtkCalendar* calendar; + GtkSpinButton* hour; + GtkSpinButton* minute; + GtkSpinButton* second; + GtkComboBoxText* system; + GtkRadioButton* relativity_radio_button; + GtkRadioButton* batch_radio_button; + GtkCheckButton* modify_originals_check_button; + GtkLabel* notification; + AdjustDateTimeDialogTimeSystem previous_time_system; +}; + +struct _DateableIface { + GTypeInterface parent_iface; + void (*set_exposure_time) (Dateable* self, time_t target_time); + time_t (*get_exposure_time) (Dateable* self); +}; + + +static gpointer adjust_date_time_dialog_parent_class = NULL; + +GType adjust_date_time_dialog_get_type (void) G_GNUC_CONST; +static GType adjust_date_time_dialog_time_system_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; +#define ADJUST_DATE_TIME_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialogPrivate)) +#define ADJUST_DATE_TIME_DIALOG_SECONDS_IN_DAY ((gint64) ((60 * 60) * 24)) +#define ADJUST_DATE_TIME_DIALOG_SECONDS_IN_HOUR ((gint64) (60 * 60)) +#define ADJUST_DATE_TIME_DIALOG_SECONDS_IN_MINUTE ((gint64) 60) +#define ADJUST_DATE_TIME_DIALOG_YEAR_OFFSET 1900 +#define ADJUST_DATE_TIME_DIALOG_CALENDAR_THUMBNAIL_SCALE 1 +GType data_object_get_type (void) G_GNUC_CONST; +GType data_source_get_type (void) G_GNUC_CONST; +GType thumbnail_source_get_type (void) G_GNUC_CONST; +GType media_source_get_type (void) G_GNUC_CONST; +GType dateable_get_type (void) G_GNUC_CONST; +AdjustDateTimeDialog* adjust_date_time_dialog_new (Dateable* source, + gint photo_count, + gboolean display_options, + gboolean contains_video, + gboolean only_video); +AdjustDateTimeDialog* adjust_date_time_dialog_construct (GType object_type, + Dateable* source, + gint photo_count, + gboolean display_options, + gboolean contains_video, + gboolean only_video); +gint resources_use_header_bar (void); +GType page_window_get_type (void) G_GNUC_CONST; +GType app_window_get_type (void) G_GNUC_CONST; +AppWindow* app_window_get_instance (void); +#define RESOURCES_CANCEL_LABEL _ ("_Cancel") +#define RESOURCES_OK_LABEL _ ("_OK") +#define RESOURCES_ADJUST_DATE_TIME_LABEL _ ("Adjust Date and Time") +static void adjust_date_time_dialog_on_time_changed (AdjustDateTimeDialog* self); +static void _adjust_date_time_dialog_on_time_changed_gtk_calendar_day_selected (GtkCalendar* _sender, + gpointer self); +static void _adjust_date_time_dialog_on_time_changed_gtk_calendar_month_changed (GtkCalendar* _sender, + gpointer self); +static void _adjust_date_time_dialog_on_time_changed_gtk_calendar_next_year (GtkCalendar* _sender, + gpointer self); +static void _adjust_date_time_dialog_on_time_changed_gtk_calendar_prev_year (GtkCalendar* _sender, + gpointer self); +GType configuration_facade_get_type (void) G_GNUC_CONST; +GType config_facade_get_type (void) G_GNUC_CONST; +ConfigFacade* config_facade_get_instance (void); +gboolean configuration_facade_get_use_24_hour_time (ConfigurationFacade* self); +static gboolean adjust_date_time_dialog_on_spin_button_output (AdjustDateTimeDialog* self, + GtkSpinButton* button); +static gboolean _adjust_date_time_dialog_on_spin_button_output_gtk_spin_button_output (GtkSpinButton* _sender, + gpointer self); +static void adjust_date_time_dialog_on_time_system_changed (AdjustDateTimeDialog* self); +static void _adjust_date_time_dialog_on_time_system_changed_gtk_combo_box_changed (GtkComboBox* _sender, + gpointer self); +gboolean configuration_facade_get_keep_relativity (ConfigurationFacade* self); +static void _adjust_date_time_dialog_on_time_changed_gtk_toggle_button_toggled (GtkToggleButton* _sender, + gpointer self); +gboolean configuration_facade_get_commit_metadata_to_masters (ConfigurationFacade* self); +GdkPixbuf* thumbnail_source_get_thumbnail (ThumbnailSource* self, + gint scale, + GError** error); +gchar* data_object_to_string (DataObject* self); +time_t dateable_get_exposure_time (Dateable* self); +static void adjust_date_time_dialog_set_time (AdjustDateTimeDialog* self, + struct tm* time); +static void adjust_date_time_dialog_set_original_time_label (AdjustDateTimeDialog* self, + gboolean use_24_hr_format); +static time_t adjust_date_time_dialog_get_time (AdjustDateTimeDialog* self); +gboolean adjust_date_time_dialog_execute (AdjustDateTimeDialog* self, + gint64* time_shift, + gboolean* keep_relativity, + gboolean* modify_originals); +void configuration_facade_set_keep_relativity (ConfigurationFacade* self, + gboolean keep_relativity); +void configuration_facade_set_modify_originals (ConfigurationFacade* self, + gboolean modify_originals); +void configuration_facade_set_use_24_hour_time (ConfigurationFacade* self, + gboolean use_24_hour_time); +static void adjust_date_time_dialog_finalize (GObject * obj); + + +static GType +adjust_date_time_dialog_time_system_get_type (void) +{ + static volatile gsize adjust_date_time_dialog_time_system_type_id__volatile = 0; + if (g_once_init_enter (&adjust_date_time_dialog_time_system_type_id__volatile)) { + static const GEnumValue values[] = {{ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_AM, "ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_AM", "am"}, {ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_PM, "ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_PM", "pm"}, {ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR, "ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR", "24hr"}, {0, NULL, NULL}}; + GType adjust_date_time_dialog_time_system_type_id; + adjust_date_time_dialog_time_system_type_id = g_enum_register_static ("AdjustDateTimeDialogTimeSystem", values); + g_once_init_leave (&adjust_date_time_dialog_time_system_type_id__volatile, adjust_date_time_dialog_time_system_type_id); + } + return adjust_date_time_dialog_time_system_type_id__volatile; +} + + +static void +_adjust_date_time_dialog_on_time_changed_gtk_calendar_day_selected (GtkCalendar* _sender, + gpointer self) +{ +#line 53 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed ((AdjustDateTimeDialog*) self); +#line 276 "AdjustDateTimeDialog.c" +} + + +static void +_adjust_date_time_dialog_on_time_changed_gtk_calendar_month_changed (GtkCalendar* _sender, + gpointer self) +{ +#line 54 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed ((AdjustDateTimeDialog*) self); +#line 286 "AdjustDateTimeDialog.c" +} + + +static void +_adjust_date_time_dialog_on_time_changed_gtk_calendar_next_year (GtkCalendar* _sender, + gpointer self) +{ +#line 55 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed ((AdjustDateTimeDialog*) self); +#line 296 "AdjustDateTimeDialog.c" +} + + +static void +_adjust_date_time_dialog_on_time_changed_gtk_calendar_prev_year (GtkCalendar* _sender, + gpointer self) +{ +#line 56 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed ((AdjustDateTimeDialog*) self); +#line 306 "AdjustDateTimeDialog.c" +} + + +static gboolean +_adjust_date_time_dialog_on_spin_button_output_gtk_spin_button_output (GtkSpinButton* _sender, + gpointer self) +{ + gboolean result; + result = adjust_date_time_dialog_on_spin_button_output ((AdjustDateTimeDialog*) self, _sender); +#line 63 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return result; +#line 318 "AdjustDateTimeDialog.c" +} + + +static void +_adjust_date_time_dialog_on_time_system_changed_gtk_combo_box_changed (GtkComboBox* _sender, + gpointer self) +{ +#line 81 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_system_changed ((AdjustDateTimeDialog*) self); +#line 328 "AdjustDateTimeDialog.c" +} + + +static void +_adjust_date_time_dialog_on_time_changed_gtk_toggle_button_toggled (GtkToggleButton* _sender, + gpointer self) +{ +#line 103 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed ((AdjustDateTimeDialog*) self); +#line 338 "AdjustDateTimeDialog.c" +} + + +static void +g_time_gm (time_t time, + struct tm* result) +{ + struct tm _result_ = {0}; + struct tm _tmp0_ = {0}; +#line 2861 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + gmtime_r (&time, &_tmp0_); +#line 2861 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 2862 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + *result = _result_; +#line 2862 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + return; +#line 356 "AdjustDateTimeDialog.c" +} + + +static gchar* +g_time_format (struct tm *self, + const gchar* format) +{ + gchar* result = NULL; + gchar* buffer = NULL; + gchar* _tmp0_; + gint buffer_length1; + gint _buffer_size_; + gchar* _tmp1_; + gint _tmp1__length1; + gchar* _tmp2_; + gint _tmp2__length1; + gchar* _tmp3_; +#line 2874 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + g_return_val_if_fail (format != NULL, NULL); +#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = g_new0 (gchar, 64); +#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + buffer = _tmp0_; +#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + buffer_length1 = 64; +#line 2875 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _buffer_size_ = buffer_length1; +#line 2876 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = buffer; +#line 2876 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1__length1 = buffer_length1; +#line 2876 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + strftime (_tmp1_, _tmp1__length1, format, &(*self)); +#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = buffer; +#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2__length1 = buffer_length1; +#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3_ = g_strdup ((const gchar*) _tmp2_); +#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp3_; +#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + buffer = (g_free (buffer), NULL); +#line 2877 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + return result; +#line 402 "AdjustDateTimeDialog.c" +} + + +static gpointer +_g_object_ref0 (gpointer self) +{ +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return self ? g_object_ref (self) : NULL; +#line 411 "AdjustDateTimeDialog.c" +} + + +static void +g_time_local (time_t time, + struct tm* result) +{ + struct tm _result_ = {0}; + struct tm _tmp0_ = {0}; +#line 2866 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + localtime_r (&time, &_tmp0_); +#line 2866 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _result_ = _tmp0_; +#line 2867 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + *result = _result_; +#line 2867 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + return; +#line 429 "AdjustDateTimeDialog.c" +} + + +AdjustDateTimeDialog* +adjust_date_time_dialog_construct (GType object_type, + Dateable* source, + gint photo_count, + gboolean display_options, + gboolean contains_video, + gboolean only_video) +{ + AdjustDateTimeDialog * self = NULL; + AppWindow* _tmp0_; + AppWindow* _tmp1_; + GtkCalendar* _tmp2_; + GtkCalendar* _tmp3_; + GtkCalendar* _tmp4_; + GtkCalendar* _tmp5_; + GtkCalendar* _tmp6_; + GtkCalendar* _tmp7_; + ConfigFacade* _tmp8_; + ConfigFacade* _tmp9_; + gboolean _tmp10_; + GtkSpinButton* _tmp13_; + GtkSpinButton* _tmp14_; + GtkSpinButton* _tmp15_; + GtkSpinButton* _tmp16_; + GtkSpinButton* _tmp17_; + GtkSpinButton* _tmp18_; + GtkSpinButton* _tmp19_; + GtkSpinButton* _tmp20_; + GtkSpinButton* _tmp21_; + GtkSpinButton* _tmp22_; + GtkSpinButton* _tmp23_; + GtkComboBoxText* _tmp24_; + GtkComboBoxText* _tmp25_; + GtkComboBoxText* _tmp26_; + GtkComboBoxText* _tmp27_; + GtkComboBoxText* _tmp28_; + GtkBox* clock = NULL; + GtkBox* _tmp29_; + GtkBox* _tmp30_; + GtkSpinButton* _tmp31_; + GtkBox* _tmp32_; + GtkLabel* _tmp33_; + GtkLabel* _tmp34_; + GtkBox* _tmp35_; + GtkSpinButton* _tmp36_; + GtkBox* _tmp37_; + GtkLabel* _tmp38_; + GtkLabel* _tmp39_; + GtkBox* _tmp40_; + GtkSpinButton* _tmp41_; + GtkBox* _tmp42_; + GtkComboBoxText* _tmp43_; + GtkRadioButton* _tmp44_; + GtkRadioButton* _tmp45_; + ConfigFacade* _tmp46_; + ConfigFacade* _tmp47_; + gboolean _tmp48_ = FALSE; + GtkRadioButton* _tmp49_; + GtkRadioButton* _tmp50_; + GSList* _tmp51_; + GtkRadioButton* _tmp52_; + GtkRadioButton* _tmp53_; + ConfigFacade* _tmp54_; + ConfigFacade* _tmp55_; + gboolean _tmp56_ = FALSE; + GtkRadioButton* _tmp57_; + GtkRadioButton* _tmp58_; + gboolean _tmp65_ = FALSE; + ConfigFacade* _tmp66_; + ConfigFacade* _tmp67_; + gboolean _tmp68_; + GtkCheckButton* _tmp69_; + gboolean _tmp70_ = FALSE; + GtkCheckButton* _tmp75_; + GtkBox* time_content = NULL; + GtkBox* _tmp76_; + GtkBox* picker = NULL; + GtkBox* _tmp77_; + GtkComboBoxText* combo = NULL; + GtkComboBoxText* _tmp78_; + GtkBox* _tmp87_; + GtkComboBoxText* _tmp88_; + GtkSpinButton* spin = NULL; + GtkSpinButton* _tmp89_; + GtkBox* _tmp90_; + GtkSpinButton* _tmp91_; + GtkSpinButton* _tmp92_; + GtkCalendar* _tmp93_; + GtkComboBoxText* _tmp94_; + GtkCalendar* _tmp95_; + GtkBox* _tmp96_; + GtkBox* _tmp97_; + GtkBox* _tmp98_; + GtkCalendar* _tmp99_; + GtkBox* _tmp100_; + GtkBox* _tmp101_; + GdkPixbuf* preview = NULL; + GtkBox* image_content = NULL; + GtkBox* _tmp113_; + GtkBox* _tmp114_; + GtkBox* _tmp115_; + GtkImage* _tmp116_ = NULL; + GdkPixbuf* _tmp117_; + GtkImage* image = NULL; + GtkImage* _tmp121_; + GtkLabel* _tmp122_; + GtkBox* _tmp123_; + GtkImage* _tmp124_; + GtkBox* _tmp125_; + GtkLabel* _tmp126_; + GtkBox* hbox = NULL; + GtkBox* _tmp127_; + GtkBox* _tmp128_; + GtkBox* _tmp129_; + GtkBox* _tmp130_; + GtkBox* _tmp131_; + GtkBox* _tmp132_; + GtkBox* _tmp133_; + GtkBox* _tmp134_; + GtkBox* _tmp135_; + GtkBox* _tmp136_; + GtkBox* _tmp137_; + GtkBox* _tmp138_; + GtkLabel* _tmp139_; + GtkLabel* _tmp140_; + GtkLabel* _tmp141_; + GtkBox* _tmp142_; + GtkLabel* _tmp143_; + time_t _tmp144_; + time_t _tmp146_; + struct tm _tmp147_ = {0}; + ConfigFacade* _tmp148_; + ConfigFacade* _tmp149_; + GError * _inner_error_ = NULL; +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_val_if_fail (IS_DATEABLE (source), NULL); +#line 39 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_assert (source != NULL, "source != null"); +#line 41 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self = (AdjustDateTimeDialog*) g_object_new (object_type, "use-header-bar", resources_use_header_bar (), NULL); +#line 43 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_window_set_modal (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), TRUE); +#line 44 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_window_set_resizable (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), FALSE); +#line 45 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = app_window_get_instance (); +#line 45 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = _tmp0_; +#line 45 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_window_set_transient_for (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow)); +#line 45 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp1_); +#line 47 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_dialog_add_buttons (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), RESOURCES_CANCEL_LABEL, GTK_RESPONSE_CANCEL, RESOURCES_OK_LABEL, GTK_RESPONSE_OK, NULL); +#line 49 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_window_set_title (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), RESOURCES_ADJUST_DATE_TIME_LABEL); +#line 51 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = (GtkCalendar*) gtk_calendar_new (); +#line 51 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp2_); +#line 51 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->calendar); +#line 51 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->calendar = _tmp2_; +#line 52 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = self->priv->calendar; +#line 52 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_set (_tmp3_, "show-heading", FALSE, NULL); +#line 53 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = self->priv->calendar; +#line 53 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp4_, "day-selected", (GCallback) _adjust_date_time_dialog_on_time_changed_gtk_calendar_day_selected, self, 0); +#line 54 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = self->priv->calendar; +#line 54 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp5_, "month-changed", (GCallback) _adjust_date_time_dialog_on_time_changed_gtk_calendar_month_changed, self, 0); +#line 55 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = self->priv->calendar; +#line 55 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp6_, "next-year", (GCallback) _adjust_date_time_dialog_on_time_changed_gtk_calendar_next_year, self, 0); +#line 56 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = self->priv->calendar; +#line 56 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp7_, "prev-year", (GCallback) _adjust_date_time_dialog_on_time_changed_gtk_calendar_prev_year, self, 0); +#line 58 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = config_facade_get_instance (); +#line 58 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = _tmp8_; +#line 58 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp10_ = configuration_facade_get_use_24_hour_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 58 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp9_); +#line 58 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp10_) { +#line 627 "AdjustDateTimeDialog.c" + GtkSpinButton* _tmp11_; +#line 59 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp11_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) 23, (gdouble) 1); +#line 59 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp11_); +#line 59 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->hour); +#line 59 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->hour = _tmp11_; +#line 637 "AdjustDateTimeDialog.c" + } else { + GtkSpinButton* _tmp12_; +#line 61 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp12_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 1, (gdouble) 12, (gdouble) 1); +#line 61 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp12_); +#line 61 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->hour); +#line 61 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->hour = _tmp12_; +#line 648 "AdjustDateTimeDialog.c" + } +#line 63 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp13_ = self->priv->hour; +#line 63 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp13_, "output", (GCallback) _adjust_date_time_dialog_on_spin_button_output_gtk_spin_button_output, self, 0); +#line 64 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp14_ = self->priv->hour; +#line 64 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_width_chars (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, gtk_entry_get_type (), GtkEntry), 2); +#line 65 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp15_ = self->priv->hour; +#line 65 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_max_width_chars (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gtk_entry_get_type (), GtkEntry), 2); +#line 67 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp16_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) 59, (gdouble) 1); +#line 67 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp16_); +#line 67 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->minute); +#line 67 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->minute = _tmp16_; +#line 68 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp17_ = self->priv->minute; +#line 68 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_width_chars (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, gtk_entry_get_type (), GtkEntry), 2); +#line 69 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp18_ = self->priv->minute; +#line 69 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_max_width_chars (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_entry_get_type (), GtkEntry), 2); +#line 70 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp19_ = self->priv->minute; +#line 70 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp19_, "output", (GCallback) _adjust_date_time_dialog_on_spin_button_output_gtk_spin_button_output, self, 0); +#line 72 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp20_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) 59, (gdouble) 1); +#line 72 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp20_); +#line 72 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->second); +#line 72 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->second = _tmp20_; +#line 73 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp21_ = self->priv->second; +#line 73 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_width_chars (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_entry_get_type (), GtkEntry), 2); +#line 74 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp22_ = self->priv->second; +#line 74 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_max_width_chars (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_entry_get_type (), GtkEntry), 2); +#line 75 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp23_ = self->priv->second; +#line 75 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (_tmp23_, "output", (GCallback) _adjust_date_time_dialog_on_spin_button_output_gtk_spin_button_output, self, 0); +#line 77 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp24_ = (GtkComboBoxText*) gtk_combo_box_text_new (); +#line 77 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp24_); +#line 77 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->system); +#line 77 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->system = _tmp24_; +#line 78 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp25_ = self->priv->system; +#line 78 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_combo_box_text_append_text (_tmp25_, _ ("AM")); +#line 79 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp26_ = self->priv->system; +#line 79 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_combo_box_text_append_text (_tmp26_, _ ("PM")); +#line 80 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp27_ = self->priv->system; +#line 80 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_combo_box_text_append_text (_tmp27_, _ ("24 Hr")); +#line 81 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp28_ = self->priv->system; +#line 81 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_combo_box_get_type (), GtkComboBox), "changed", (GCallback) _adjust_date_time_dialog_on_time_system_changed_gtk_combo_box_changed, self, 0); +#line 83 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp29_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); +#line 83 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp29_); +#line 83 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + clock = _tmp29_; +#line 85 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp30_ = clock; +#line 85 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp31_ = self->priv->hour; +#line 85 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp30_, G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 86 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp32_ = clock; +#line 86 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp33_ = (GtkLabel*) gtk_label_new (":"); +#line 86 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp33_); +#line 86 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp34_ = _tmp33_; +#line 86 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp32_, G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 86 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp34_); +#line 87 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp35_ = clock; +#line 87 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp36_ = self->priv->minute; +#line 87 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp35_, G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 88 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp37_ = clock; +#line 88 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp38_ = (GtkLabel*) gtk_label_new (":"); +#line 88 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp38_); +#line 88 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp39_ = _tmp38_; +#line 88 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp37_, G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 88 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp39_); +#line 89 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp40_ = clock; +#line 89 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp41_ = self->priv->second; +#line 89 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp40_, G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 90 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp42_ = clock; +#line 90 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp43_ = self->priv->system; +#line 90 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp42_, G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 92 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_dialog_set_default_response (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog), (gint) GTK_RESPONSE_OK); +#line 94 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp44_ = (GtkRadioButton*) gtk_radio_button_new_with_mnemonic (NULL, _ ("_Shift photos/videos by the same amount")); +#line 94 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp44_); +#line 94 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->relativity_radio_button); +#line 94 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->relativity_radio_button = _tmp44_; +#line 96 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp45_ = self->priv->relativity_radio_button; +#line 96 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp46_ = config_facade_get_instance (); +#line 96 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp47_ = _tmp46_; +#line 96 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, gtk_toggle_button_get_type (), GtkToggleButton), configuration_facade_get_keep_relativity (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade))); +#line 96 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp47_); +#line 97 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (display_options) { +#line 97 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp48_ = photo_count > 1; +#line 804 "AdjustDateTimeDialog.c" + } else { +#line 97 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp48_ = FALSE; +#line 808 "AdjustDateTimeDialog.c" + } +#line 97 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp49_ = self->priv->relativity_radio_button; +#line 97 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_widget_get_type (), GtkWidget), _tmp48_); +#line 99 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp50_ = self->priv->relativity_radio_button; +#line 99 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp51_ = gtk_radio_button_get_group (_tmp50_); +#line 99 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp52_ = (GtkRadioButton*) gtk_radio_button_new_with_mnemonic (_tmp51_, _ ("Set _all photos/videos to this time")); +#line 99 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp52_); +#line 99 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->batch_radio_button); +#line 99 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->batch_radio_button = _tmp52_; +#line 101 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp53_ = self->priv->batch_radio_button; +#line 101 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp54_ = config_facade_get_instance (); +#line 101 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp55_ = _tmp54_; +#line 101 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, gtk_toggle_button_get_type (), GtkToggleButton), !configuration_facade_get_keep_relativity (G_TYPE_CHECK_INSTANCE_CAST (_tmp55_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade))); +#line 101 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp55_); +#line 102 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (display_options) { +#line 102 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp56_ = photo_count > 1; +#line 840 "AdjustDateTimeDialog.c" + } else { +#line 102 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp56_ = FALSE; +#line 844 "AdjustDateTimeDialog.c" + } +#line 102 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp57_ = self->priv->batch_radio_button; +#line 102 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp57_, gtk_widget_get_type (), GtkWidget), _tmp56_); +#line 103 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp58_ = self->priv->batch_radio_button; +#line 103 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp58_, gtk_toggle_button_get_type (), GtkToggleButton), "toggled", (GCallback) _adjust_date_time_dialog_on_time_changed_gtk_toggle_button_toggled, self, 0); +#line 105 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (contains_video) { +#line 856 "AdjustDateTimeDialog.c" + gchar* text = NULL; + gchar* _tmp59_; + const gchar* _tmp60_; + GtkCheckButton* _tmp61_; +#line 106 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp59_ = g_strdup (ngettext ("_Modify original photo file", "_Modify original photo files", (gulong) photo_count)); +#line 106 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + text = _tmp59_; +#line 108 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp60_ = text; +#line 108 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp61_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp60_); +#line 108 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp61_); +#line 108 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->modify_originals_check_button); +#line 108 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->modify_originals_check_button = _tmp61_; +#line 105 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (text); +#line 877 "AdjustDateTimeDialog.c" + } else { + gchar* text = NULL; + gchar* _tmp62_; + const gchar* _tmp63_; + GtkCheckButton* _tmp64_; +#line 110 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp62_ = g_strdup (ngettext ("_Modify original file", "_Modify original files", (gulong) photo_count)); +#line 110 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + text = _tmp62_; +#line 111 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp63_ = text; +#line 111 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp64_ = (GtkCheckButton*) gtk_check_button_new_with_mnemonic (_tmp63_); +#line 111 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp64_); +#line 111 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->modify_originals_check_button); +#line 111 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->modify_originals_check_button = _tmp64_; +#line 105 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (text); +#line 899 "AdjustDateTimeDialog.c" + } +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp66_ = config_facade_get_instance (); +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp67_ = _tmp66_; +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp68_ = configuration_facade_get_commit_metadata_to_masters (G_TYPE_CHECK_INSTANCE_CAST (_tmp67_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp67_); +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp68_) { +#line 115 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp65_ = display_options; +#line 913 "AdjustDateTimeDialog.c" + } else { +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp65_ = FALSE; +#line 917 "AdjustDateTimeDialog.c" + } +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp69_ = self->priv->modify_originals_check_button; +#line 114 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_toggle_button_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, gtk_toggle_button_get_type (), GtkToggleButton), _tmp65_); +#line 116 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (!only_video) { +#line 925 "AdjustDateTimeDialog.c" + gboolean _tmp71_ = FALSE; + ConfigFacade* _tmp72_; + ConfigFacade* _tmp73_; + gboolean _tmp74_; +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp72_ = config_facade_get_instance (); +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp73_ = _tmp72_; +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp74_ = !configuration_facade_get_commit_metadata_to_masters (G_TYPE_CHECK_INSTANCE_CAST (_tmp73_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp73_); +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp74_) { +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp71_ = display_options; +#line 942 "AdjustDateTimeDialog.c" + } else { +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp71_ = FALSE; +#line 946 "AdjustDateTimeDialog.c" + } +#line 117 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp70_ = _tmp71_; +#line 950 "AdjustDateTimeDialog.c" + } else { +#line 116 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp70_ = FALSE; +#line 954 "AdjustDateTimeDialog.c" + } +#line 116 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp75_ = self->priv->modify_originals_check_button; +#line 116 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp75_, gtk_widget_get_type (), GtkWidget), _tmp70_); +#line 119 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp76_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); +#line 119 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp76_); +#line 119 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time_content = _tmp76_; +#line 121 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp77_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); +#line 121 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp77_); +#line 121 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + picker = _tmp77_; +#line 122 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp78_ = (GtkComboBoxText*) gtk_combo_box_text_new (); +#line 122 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp78_); +#line 122 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + combo = _tmp78_; +#line 978 "AdjustDateTimeDialog.c" + { + gint i = 0; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + i = 0; +#line 983 "AdjustDateTimeDialog.c" + { + gboolean _tmp79_ = FALSE; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp79_ = TRUE; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + while (TRUE) { +#line 990 "AdjustDateTimeDialog.c" + gint _tmp81_; + GtkComboBoxText* _tmp82_; + gint _tmp83_; + struct tm _tmp84_ = {0}; + gchar* _tmp85_; + gchar* _tmp86_; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (!_tmp79_) { +#line 999 "AdjustDateTimeDialog.c" + gint _tmp80_; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp80_ = i; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + i = _tmp80_ + 1; +#line 1005 "AdjustDateTimeDialog.c" + } +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp79_ = FALSE; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp81_ = i; +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (!(_tmp81_ < 12)) { +#line 123 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + break; +#line 1015 "AdjustDateTimeDialog.c" + } +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp82_ = combo; +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp83_ = i; +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_time_gm ((time_t) (_tmp83_ * 2764800), &_tmp84_); +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp85_ = g_time_format (&_tmp84_, "%B"); +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp86_ = _tmp85_; +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_combo_box_text_append_text (_tmp82_, _tmp86_); +#line 124 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (_tmp86_); +#line 1031 "AdjustDateTimeDialog.c" + } + } + } +#line 126 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp87_ = picker; +#line 126 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp88_ = combo; +#line 126 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp87_, G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 128 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp89_ = (GtkSpinButton*) gtk_spin_button_new_with_range ((gdouble) 0, (gdouble) (G_MAXINT >> 9), (gdouble) 1); +#line 128 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp89_); +#line 128 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + spin = _tmp89_; +#line 129 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp90_ = picker; +#line 129 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp91_ = spin; +#line 129 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_end (_tmp90_, G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 130 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp92_ = spin; +#line 130 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp93_ = self->priv->calendar; +#line 130 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_bind_property_with_closures (G_TYPE_CHECK_INSTANCE_CAST (_tmp92_, G_TYPE_OBJECT, GObject), "value", G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, G_TYPE_OBJECT, GObject), "year", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL))); +#line 131 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp94_ = combo; +#line 131 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp95_ = self->priv->calendar; +#line 131 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_bind_property_with_closures (G_TYPE_CHECK_INSTANCE_CAST (_tmp94_, G_TYPE_OBJECT, GObject), "active", G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, G_TYPE_OBJECT, GObject), "month", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL))); +#line 133 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp96_ = time_content; +#line 133 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp97_ = picker; +#line 133 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp96_, G_TYPE_CHECK_INSTANCE_CAST (_tmp97_, gtk_widget_get_type (), GtkWidget), FALSE, FALSE, (guint) 0); +#line 134 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp98_ = time_content; +#line 134 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp99_ = self->priv->calendar; +#line 134 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp98_, G_TYPE_CHECK_INSTANCE_CAST (_tmp99_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 135 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp100_ = time_content; +#line 135 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp101_ = clock; +#line 135 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp100_, G_TYPE_CHECK_INSTANCE_CAST (_tmp101_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 137 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (display_options) { +#line 1085 "AdjustDateTimeDialog.c" + GtkBox* _tmp102_; + GtkRadioButton* _tmp103_; + GtkBox* _tmp104_; + GtkRadioButton* _tmp105_; + GtkBox* _tmp106_; + GtkCheckButton* _tmp107_; +#line 138 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp102_ = time_content; +#line 138 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp103_ = self->priv->relativity_radio_button; +#line 138 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp102_, G_TYPE_CHECK_INSTANCE_CAST (_tmp103_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 139 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp104_ = time_content; +#line 139 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp105_ = self->priv->batch_radio_button; +#line 139 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp104_, G_TYPE_CHECK_INSTANCE_CAST (_tmp105_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 140 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp106_ = time_content; +#line 140 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp107_ = self->priv->modify_originals_check_button; +#line 140 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp106_, G_TYPE_CHECK_INSTANCE_CAST (_tmp107_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 1110 "AdjustDateTimeDialog.c" + } +#line 143 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + preview = NULL; +#line 1114 "AdjustDateTimeDialog.c" + { + GdkPixbuf* _tmp108_ = NULL; + GdkPixbuf* _tmp109_; + GdkPixbuf* _tmp110_; +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp109_ = thumbnail_source_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), ADJUST_DATE_TIME_DIALOG_CALENDAR_THUMBNAIL_SCALE, &_inner_error_); +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp108_ = _tmp109_; +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 1125 "AdjustDateTimeDialog.c" + goto __catch25_g_error; + } +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp110_ = _tmp108_; +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp108_ = NULL; +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (preview); +#line 147 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + preview = _tmp110_; +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp108_); +#line 1138 "AdjustDateTimeDialog.c" + } + goto __finally25; + __catch25_g_error: + { + GError* err = NULL; + gchar* _tmp111_; + gchar* _tmp112_; +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + err = _inner_error_; +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _inner_error_ = NULL; +#line 149 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp111_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_OBJECT, DataObject)); +#line 149 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp112_ = _tmp111_; +#line 149 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_warning ("AdjustDateTimeDialog.vala:149: Unable to fetch preview for %s", _tmp112_); +#line 149 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (_tmp112_); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_error_free0 (err); +#line 1160 "AdjustDateTimeDialog.c" + } + __finally25: +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (preview); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (spin); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (combo); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (picker); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (time_content); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (clock); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_clear_error (&_inner_error_); +#line 144 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return NULL; +#line 1183 "AdjustDateTimeDialog.c" + } +#line 152 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp113_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); +#line 152 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp113_); +#line 152 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + image_content = _tmp113_; +#line 153 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp114_ = image_content; +#line 153 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp114_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START); +#line 154 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp115_ = image_content; +#line 154 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_set_homogeneous (_tmp115_, TRUE); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp117_ = preview; +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp117_ != NULL) { +#line 1203 "AdjustDateTimeDialog.c" + GdkPixbuf* _tmp118_; + GtkImage* _tmp119_; +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp118_ = preview; +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp119_ = (GtkImage*) gtk_image_new_from_pixbuf (_tmp118_); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp119_); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp116_); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp116_ = _tmp119_; +#line 1216 "AdjustDateTimeDialog.c" + } else { + GtkImage* _tmp120_; +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp120_ = (GtkImage*) gtk_image_new (); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp120_); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp116_); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp116_ = _tmp120_; +#line 1227 "AdjustDateTimeDialog.c" + } +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp121_ = _g_object_ref0 (_tmp116_); +#line 155 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + image = _tmp121_; +#line 156 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp122_ = (GtkLabel*) gtk_label_new (NULL); +#line 156 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp122_); +#line 156 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->original_time_label); +#line 156 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->original_time_label = _tmp122_; +#line 157 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp123_ = image_content; +#line 157 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp124_ = image; +#line 157 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp123_, G_TYPE_CHECK_INSTANCE_CAST (_tmp124_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 158 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp125_ = image_content; +#line 158 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp126_ = self->priv->original_time_label; +#line 158 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp125_, G_TYPE_CHECK_INSTANCE_CAST (_tmp126_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 160 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp127_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10); +#line 160 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp127_); +#line 160 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + hbox = _tmp127_; +#line 161 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp128_ = hbox; +#line 161 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_container_set_border_width (G_TYPE_CHECK_INSTANCE_CAST (_tmp128_, gtk_container_get_type (), GtkContainer), (guint) 3); +#line 162 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp129_ = hbox; +#line 162 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp130_ = image_content; +#line 162 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp129_, G_TYPE_CHECK_INSTANCE_CAST (_tmp130_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 163 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp131_ = hbox; +#line 163 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp132_ = time_content; +#line 163 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (_tmp131_, G_TYPE_CHECK_INSTANCE_CAST (_tmp132_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 164 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp133_ = hbox; +#line 164 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp133_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER); +#line 165 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp134_ = hbox; +#line 165 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp134_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER); +#line 166 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp135_ = hbox; +#line 166 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp135_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 167 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp136_ = hbox; +#line 167 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_set_vexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp136_, gtk_widget_get_type (), GtkWidget), FALSE); +#line 169 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp137_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog)); +#line 169 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp138_ = hbox; +#line 169 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp137_, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp138_, gtk_widget_get_type (), GtkWidget), TRUE, FALSE, (guint) 0); +#line 171 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp139_ = (GtkLabel*) gtk_label_new (""); +#line 171 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_ref_sink (_tmp139_); +#line 171 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->notification); +#line 171 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->notification = _tmp139_; +#line 172 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp140_ = self->priv->notification; +#line 172 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_label_set_line_wrap (_tmp140_, TRUE); +#line 173 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp141_ = self->priv->notification; +#line 173 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_label_set_justify (_tmp141_, GTK_JUSTIFY_CENTER); +#line 175 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp142_ = gtk_dialog_get_content_area (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog)); +#line 175 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp143_ = self->priv->notification; +#line 175 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_box_pack_start (G_TYPE_CHECK_INSTANCE_CAST (_tmp142_, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp143_, gtk_widget_get_type (), GtkWidget), TRUE, TRUE, (guint) 0); +#line 177 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->original_time = dateable_get_exposure_time (source); +#line 179 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp144_ = self->priv->original_time; +#line 179 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp144_ == ((time_t) 0)) { +#line 1325 "AdjustDateTimeDialog.c" + time_t _tmp145_; +#line 180 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp145_ = time (NULL); +#line 180 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->original_time = _tmp145_; +#line 181 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->no_original_time = TRUE; +#line 1333 "AdjustDateTimeDialog.c" + } +#line 184 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp146_ = self->priv->original_time; +#line 184 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_time_local (_tmp146_, &_tmp147_); +#line 184 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_set_time (self, &_tmp147_); +#line 185 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp148_ = config_facade_get_instance (); +#line 185 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp149_ = _tmp148_; +#line 185 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_set_original_time_label (self, configuration_facade_get_use_24_hour_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp149_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade))); +#line 185 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp149_); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (hbox); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (image); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp116_); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (image_content); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (preview); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (spin); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (combo); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (picker); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (time_content); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (clock); +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return self; +#line 1371 "AdjustDateTimeDialog.c" +} + + +AdjustDateTimeDialog* +adjust_date_time_dialog_new (Dateable* source, + gint photo_count, + gboolean display_options, + gboolean contains_video, + gboolean only_video) +{ +#line 37 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return adjust_date_time_dialog_construct (TYPE_ADJUST_DATE_TIME_DIALOG, source, photo_count, display_options, contains_video, only_video); +#line 1384 "AdjustDateTimeDialog.c" +} + + +static void +adjust_date_time_dialog_set_time (AdjustDateTimeDialog* self, + struct tm* time) +{ + GtkCalendar* _tmp0_; + struct tm _tmp1_; + gint _tmp2_; + struct tm _tmp3_; + gint _tmp4_; + GtkCalendar* _tmp5_; + struct tm _tmp6_; + gint _tmp7_; + GtkCalendar* _tmp8_; + GtkCalendar* _tmp9_; + ConfigFacade* _tmp10_; + ConfigFacade* _tmp11_; + gboolean _tmp12_; + GtkSpinButton* _tmp27_; + struct tm _tmp28_; + gint _tmp29_; + GtkSpinButton* _tmp30_; + struct tm _tmp31_; + gint _tmp32_; + GtkComboBoxText* _tmp33_; +#line 188 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self)); +#line 188 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_if_fail (time != NULL); +#line 189 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = self->priv->calendar; +#line 189 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = *time; +#line 189 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = _tmp1_.tm_mon; +#line 189 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = *time; +#line 189 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = _tmp3_.tm_year; +#line 189 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_calendar_select_month (_tmp0_, (guint) _tmp2_, (guint) (_tmp4_ + ADJUST_DATE_TIME_DIALOG_YEAR_OFFSET)); +#line 190 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = self->priv->calendar; +#line 190 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = *time; +#line 190 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = _tmp6_.tm_mday; +#line 190 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_calendar_select_day (_tmp5_, (guint) _tmp7_); +#line 191 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = self->priv->calendar; +#line 191 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, G_TYPE_OBJECT, GObject), "year"); +#line 192 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = self->priv->calendar; +#line 192 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, G_TYPE_OBJECT, GObject), "month"); +#line 194 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp10_ = config_facade_get_instance (); +#line 194 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp11_ = _tmp10_; +#line 194 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp12_ = configuration_facade_get_use_24_hour_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade)); +#line 194 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp11_); +#line 194 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp12_) { +#line 1454 "AdjustDateTimeDialog.c" + GtkComboBoxText* _tmp13_; + GtkSpinButton* _tmp14_; + struct tm _tmp15_; + gint _tmp16_; +#line 195 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp13_ = self->priv->system; +#line 195 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_combo_box_get_type (), GtkComboBox), (gint) ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR); +#line 196 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp14_ = self->priv->hour; +#line 196 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp15_ = *time; +#line 196 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp16_ = _tmp15_.tm_hour; +#line 196 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_value (_tmp14_, (gdouble) _tmp16_); +#line 1471 "AdjustDateTimeDialog.c" + } else { + gint AMPM_hour = 0; + struct tm _tmp17_; + gint _tmp18_; + gint _tmp19_ = 0; + gint _tmp20_; + GtkSpinButton* _tmp22_; + AdjustDateTimeDialogTimeSystem _tmp23_ = 0; + struct tm _tmp24_; + gint _tmp25_; + GtkComboBoxText* _tmp26_; +#line 198 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp17_ = *time; +#line 198 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp18_ = _tmp17_.tm_hour; +#line 198 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + AMPM_hour = _tmp18_ % 12; +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp20_ = AMPM_hour; +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp20_ == 0) { +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp19_ = 12; +#line 1495 "AdjustDateTimeDialog.c" + } else { + gint _tmp21_; +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp21_ = AMPM_hour; +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp19_ = _tmp21_; +#line 1502 "AdjustDateTimeDialog.c" + } +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp22_ = self->priv->hour; +#line 199 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_value (_tmp22_, (gdouble) _tmp19_); +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp24_ = *time; +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp25_ = _tmp24_.tm_hour; +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp25_ >= 12) { +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp23_ = ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_PM; +#line 1516 "AdjustDateTimeDialog.c" + } else { +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp23_ = ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_AM; +#line 1520 "AdjustDateTimeDialog.c" + } +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp26_ = self->priv->system; +#line 200 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_combo_box_set_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, gtk_combo_box_get_type (), GtkComboBox), (gint) _tmp23_); +#line 1526 "AdjustDateTimeDialog.c" + } +#line 203 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp27_ = self->priv->minute; +#line 203 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp28_ = *time; +#line 203 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp29_ = _tmp28_.tm_min; +#line 203 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_value (_tmp27_, (gdouble) _tmp29_); +#line 204 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp30_ = self->priv->second; +#line 204 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp31_ = *time; +#line 204 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp32_ = _tmp31_.tm_sec; +#line 204 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_value (_tmp30_, (gdouble) _tmp32_); +#line 206 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp33_ = self->priv->system; +#line 206 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->previous_time_system = (AdjustDateTimeDialogTimeSystem) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_combo_box_get_type (), GtkComboBox)); +#line 1548 "AdjustDateTimeDialog.c" +} + + +static void +adjust_date_time_dialog_set_original_time_label (AdjustDateTimeDialog* self, + gboolean use_24_hr_format) +{ + gboolean _tmp0_; + const gchar* _tmp1_ = NULL; + GtkLabel* _tmp2_; + time_t _tmp3_; + struct tm _tmp4_ = {0}; + gchar* _tmp5_; + gchar* _tmp6_; + gchar* _tmp7_; + gchar* _tmp8_; +#line 209 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self)); +#line 210 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = self->priv->no_original_time; +#line 210 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp0_) { +#line 211 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return; +#line 1573 "AdjustDateTimeDialog.c" + } +#line 214 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (use_24_hr_format) { +#line 214 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = _ ("%m/%d/%Y, %H:%M:%S"); +#line 1579 "AdjustDateTimeDialog.c" + } else { +#line 215 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = _ ("%m/%d/%Y, %I:%M:%S %p"); +#line 1583 "AdjustDateTimeDialog.c" + } +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = self->priv->original_time_label; +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = self->priv->original_time; +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_time_local (_tmp3_, &_tmp4_); +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = g_time_format (&_tmp4_, _tmp1_); +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = _tmp5_; +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = g_strconcat (_ ("Original: "), _tmp6_, NULL); +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = _tmp7_; +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_label_set_text (_tmp2_, _tmp8_); +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (_tmp8_); +#line 213 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (_tmp6_); +#line 1605 "AdjustDateTimeDialog.c" +} + + +static time_t +adjust_date_time_dialog_get_time (AdjustDateTimeDialog* self) +{ + time_t result = 0; + struct tm time = {0}; + GtkSpinButton* _tmp0_; + GtkSpinButton* _tmp1_; + gint hour = 0; + GtkSpinButton* _tmp2_; + gint _tmp3_ = 0; + gboolean _tmp4_ = FALSE; + gint _tmp5_; + gint _tmp8_ = 0; + GtkComboBoxText* _tmp9_; + gint _tmp10_; + guint year = 0U; + guint month = 0U; + guint day = 0U; + GtkCalendar* _tmp11_; + guint _tmp12_ = 0U; + guint _tmp13_ = 0U; + guint _tmp14_ = 0U; +#line 218 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_val_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self), 0); +#line 219 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + memset (&time, 0, sizeof (struct tm)); +#line 221 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = self->priv->second; +#line 221 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_sec = (gint) gtk_spin_button_get_value (_tmp0_); +#line 222 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = self->priv->minute; +#line 222 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_min = (gint) gtk_spin_button_get_value (_tmp1_); +#line 225 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = self->priv->hour; +#line 225 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + hour = (gint) gtk_spin_button_get_value (_tmp2_); +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = hour; +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp5_ == 12) { +#line 1651 "AdjustDateTimeDialog.c" + GtkComboBoxText* _tmp6_; +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = self->priv->system; +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_combo_box_get_type (), GtkComboBox)) != ((gint) ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR); +#line 1657 "AdjustDateTimeDialog.c" + } else { +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = FALSE; +#line 1661 "AdjustDateTimeDialog.c" + } +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp4_) { +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = 0; +#line 1667 "AdjustDateTimeDialog.c" + } else { + gint _tmp7_; +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = hour; +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = _tmp7_; +#line 1674 "AdjustDateTimeDialog.c" + } +#line 226 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_hour = _tmp3_; +#line 227 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = self->priv->system; +#line 227 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_combo_box_get_type (), GtkComboBox)) == ((gint) ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_PM)) { +#line 227 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = 12; +#line 1684 "AdjustDateTimeDialog.c" + } else { +#line 227 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = 0; +#line 1688 "AdjustDateTimeDialog.c" + } +#line 227 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp10_ = time.tm_hour; +#line 227 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_hour = _tmp10_ + _tmp8_; +#line 230 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp11_ = self->priv->calendar; +#line 230 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_calendar_get_date (_tmp11_, &_tmp12_, &_tmp13_, &_tmp14_); +#line 230 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + year = _tmp12_; +#line 230 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + month = _tmp13_; +#line 230 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + day = _tmp14_; +#line 231 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_year = ((gint) year) - ADJUST_DATE_TIME_DIALOG_YEAR_OFFSET; +#line 232 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_mon = (gint) month; +#line 233 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_mday = (gint) day; +#line 235 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time.tm_isdst = -1; +#line 237 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + result = mktime (&time); +#line 237 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return result; +#line 1716 "AdjustDateTimeDialog.c" +} + + +gboolean +adjust_date_time_dialog_execute (AdjustDateTimeDialog* self, + gint64* time_shift, + gboolean* keep_relativity, + gboolean* modify_originals) +{ + gint64 _vala_time_shift = 0LL; + gboolean _vala_keep_relativity = FALSE; + gboolean _vala_modify_originals = FALSE; + gboolean result = FALSE; + gboolean response = FALSE; +#line 240 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_val_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self), FALSE); +#line 242 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_show_all (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)); +#line 244 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + response = FALSE; +#line 246 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (gtk_dialog_run (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_dialog_get_type (), GtkDialog)) == ((gint) GTK_RESPONSE_OK)) { +#line 1739 "AdjustDateTimeDialog.c" + gboolean _tmp0_; + GtkRadioButton* _tmp2_; + GtkRadioButton* _tmp3_; + gboolean _tmp4_; + gboolean _tmp5_; + GtkCheckButton* _tmp9_; + GtkCheckButton* _tmp10_; + gboolean _tmp11_; + gboolean _tmp12_; +#line 247 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = self->priv->no_original_time; +#line 247 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp0_) { +#line 248 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_time_shift = (gint64) adjust_date_time_dialog_get_time (self); +#line 1755 "AdjustDateTimeDialog.c" + } else { + time_t _tmp1_; +#line 250 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = self->priv->original_time; +#line 250 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_time_shift = (gint64) (adjust_date_time_dialog_get_time (self) - _tmp1_); +#line 1762 "AdjustDateTimeDialog.c" + } +#line 252 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = self->priv->relativity_radio_button; +#line 252 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_keep_relativity = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 254 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = self->priv->relativity_radio_button; +#line 254 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)); +#line 254 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = _tmp4_; +#line 254 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp5_) { +#line 1776 "AdjustDateTimeDialog.c" + ConfigFacade* _tmp6_; + ConfigFacade* _tmp7_; + gboolean _tmp8_; +#line 255 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = config_facade_get_instance (); +#line 255 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = _tmp6_; +#line 255 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = _vala_keep_relativity; +#line 255 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + configuration_facade_set_keep_relativity (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp8_); +#line 255 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp7_); +#line 1790 "AdjustDateTimeDialog.c" + } +#line 257 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = self->priv->modify_originals_check_button; +#line 257 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_modify_originals = gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_toggle_button_get_type (), GtkToggleButton)); +#line 259 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp10_ = self->priv->modify_originals_check_button; +#line 259 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp11_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget)); +#line 259 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp12_ = _tmp11_; +#line 259 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp12_) { +#line 1804 "AdjustDateTimeDialog.c" + ConfigFacade* _tmp13_; + ConfigFacade* _tmp14_; + gboolean _tmp15_; +#line 260 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp13_ = config_facade_get_instance (); +#line 260 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp14_ = _tmp13_; +#line 260 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp15_ = _vala_modify_originals; +#line 260 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + configuration_facade_set_modify_originals (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp15_); +#line 260 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp14_); +#line 1818 "AdjustDateTimeDialog.c" + } +#line 262 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + response = TRUE; +#line 1822 "AdjustDateTimeDialog.c" + } else { +#line 264 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_time_shift = (gint64) 0; +#line 265 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_keep_relativity = TRUE; +#line 266 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _vala_modify_originals = FALSE; +#line 1830 "AdjustDateTimeDialog.c" + } +#line 269 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_destroy (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)); +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + result = response; +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (time_shift) { +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + *time_shift = _vala_time_shift; +#line 1840 "AdjustDateTimeDialog.c" + } +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (keep_relativity) { +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + *keep_relativity = _vala_keep_relativity; +#line 1846 "AdjustDateTimeDialog.c" + } +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (modify_originals) { +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + *modify_originals = _vala_modify_originals; +#line 1852 "AdjustDateTimeDialog.c" + } +#line 271 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return result; +#line 1856 "AdjustDateTimeDialog.c" +} + + +static gboolean +adjust_date_time_dialog_on_spin_button_output (AdjustDateTimeDialog* self, + GtkSpinButton* button) +{ + gboolean result = FALSE; + gchar* _tmp0_; + gchar* _tmp1_; +#line 274 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_val_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self), FALSE); +#line 274 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_val_if_fail (GTK_IS_SPIN_BUTTON (button), FALSE); +#line 275 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = g_strdup_printf ("%02d", (gint) gtk_spin_button_get_value (button)); +#line 275 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = _tmp0_; +#line 275 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_entry_set_text (G_TYPE_CHECK_INSTANCE_CAST (button, gtk_entry_get_type (), GtkEntry), _tmp1_); +#line 275 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (_tmp1_); +#line 277 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed (self); +#line 279 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + result = TRUE; +#line 279 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return result; +#line 1885 "AdjustDateTimeDialog.c" +} + + +static void +adjust_date_time_dialog_on_time_changed (AdjustDateTimeDialog* self) +{ + gint64 time_shift = 0LL; + time_t _tmp0_; + GtkCalendar* _tmp1_; + GtkCalendar* _tmp2_; + GtkComboBoxText* _tmp3_; + gboolean _tmp4_ = FALSE; + gboolean _tmp5_ = FALSE; + gint64 _tmp6_; +#line 282 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self)); +#line 283 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = self->priv->original_time; +#line 283 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time_shift = ((gint64) adjust_date_time_dialog_get_time (self)) - ((gint64) _tmp0_); +#line 284 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = self->priv->calendar; +#line 284 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, G_TYPE_OBJECT, GObject), "year"); +#line 285 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = self->priv->calendar; +#line 285 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_object_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, G_TYPE_OBJECT, GObject), "month"); +#line 287 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = self->priv->system; +#line 287 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->previous_time_system = (AdjustDateTimeDialogTimeSystem) gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_combo_box_get_type (), GtkComboBox)); +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = time_shift; +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp6_ == ((gint64) 0)) { +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = TRUE; +#line 1924 "AdjustDateTimeDialog.c" + } else { + gboolean _tmp7_; +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = self->priv->no_original_time; +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = _tmp7_; +#line 1931 "AdjustDateTimeDialog.c" + } +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp5_) { +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = TRUE; +#line 1937 "AdjustDateTimeDialog.c" + } else { + gboolean _tmp8_ = FALSE; + GtkRadioButton* _tmp9_; +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = self->priv->batch_radio_button; +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (gtk_toggle_button_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_toggle_button_get_type (), GtkToggleButton))) { +#line 1945 "AdjustDateTimeDialog.c" + GtkRadioButton* _tmp10_; + gboolean _tmp11_; + gboolean _tmp12_; +#line 290 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp10_ = self->priv->batch_radio_button; +#line 290 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp11_ = gtk_widget_get_sensitive (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_widget_get_type (), GtkWidget)); +#line 290 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp12_ = _tmp11_; +#line 290 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = _tmp12_; +#line 1957 "AdjustDateTimeDialog.c" + } else { +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = FALSE; +#line 1961 "AdjustDateTimeDialog.c" + } +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = _tmp8_; +#line 1965 "AdjustDateTimeDialog.c" + } +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp4_) { +#line 1969 "AdjustDateTimeDialog.c" + GtkLabel* _tmp13_; +#line 291 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp13_ = self->priv->notification; +#line 291 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_widget_get_type (), GtkWidget)); +#line 1975 "AdjustDateTimeDialog.c" + } else { + gboolean forward = FALSE; + gint64 _tmp14_; + gint days = 0; + gint hours = 0; + gint minutes = 0; + gint seconds = 0; + gint64 _tmp15_; + gint64 _tmp16_; + gint64 _tmp17_; + gint64 _tmp18_; + gint64 _tmp19_; + gint64 _tmp20_; + gint64 _tmp21_; + const gchar* _tmp22_ = NULL; + gboolean _tmp23_; + gchar* shift_status = NULL; + gchar* _tmp24_; + GtkLabel* _tmp25_; + const gchar* _tmp26_; + gint _tmp27_; + gint _tmp28_; + gint _tmp29_; + gint _tmp30_; + gint _tmp31_; + gint _tmp32_; + gint _tmp33_; + gint _tmp34_; + gchar* _tmp35_; + gchar* _tmp36_; + GtkLabel* _tmp37_; +#line 293 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp14_ = time_shift; +#line 293 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + forward = _tmp14_ > ((gint64) 0); +#line 296 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp15_ = time_shift; +#line 296 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time_shift = llabs (_tmp15_); +#line 298 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp16_ = time_shift; +#line 298 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + days = (gint) (_tmp16_ / ADJUST_DATE_TIME_DIALOG_SECONDS_IN_DAY); +#line 299 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp17_ = time_shift; +#line 299 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time_shift = _tmp17_ % ADJUST_DATE_TIME_DIALOG_SECONDS_IN_DAY; +#line 300 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp18_ = time_shift; +#line 300 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + hours = (gint) (_tmp18_ / ADJUST_DATE_TIME_DIALOG_SECONDS_IN_HOUR); +#line 301 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp19_ = time_shift; +#line 301 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time_shift = _tmp19_ % ADJUST_DATE_TIME_DIALOG_SECONDS_IN_HOUR; +#line 302 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp20_ = time_shift; +#line 302 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + minutes = (gint) (_tmp20_ / ADJUST_DATE_TIME_DIALOG_SECONDS_IN_MINUTE); +#line 303 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp21_ = time_shift; +#line 303 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + seconds = (gint) (_tmp21_ % ADJUST_DATE_TIME_DIALOG_SECONDS_IN_MINUTE); +#line 305 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp23_ = forward; +#line 305 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp23_) { +#line 306 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp22_ = _ ("Exposure time will be shifted forward by\n" \ +"%d %s, %d %s, %d %s, and %d %s."); +#line 2045 "AdjustDateTimeDialog.c" + } else { +#line 307 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp22_ = _ ("Exposure time will be shifted backward by\n" \ +"%d %s, %d %s, %d %s, and %d %s."); +#line 2049 "AdjustDateTimeDialog.c" + } +#line 305 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp24_ = g_strdup (_tmp22_); +#line 305 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + shift_status = _tmp24_; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp25_ = self->priv->notification; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp26_ = shift_status; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp27_ = days; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp28_ = days; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp29_ = hours; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp30_ = hours; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp31_ = minutes; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp32_ = minutes; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp33_ = seconds; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp34_ = seconds; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp35_ = g_strdup_printf (_tmp26_, _tmp27_, ngettext ("day", "days", (gulong) _tmp28_), _tmp29_, ngettext ("hour", "hours", (gulong) _tmp30_), _tmp31_, ngettext ("minute", "minutes", (gulong) _tmp32_), _tmp33_, ngettext ("second", "seconds", (gulong) _tmp34_)); +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp36_ = _tmp35_; +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_label_set_text (_tmp25_, _tmp36_); +#line 309 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (_tmp36_); +#line 314 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp37_ = self->priv->notification; +#line 314 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, gtk_widget_get_type (), GtkWidget)); +#line 289 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_free0 (shift_status); +#line 2089 "AdjustDateTimeDialog.c" + } +} + + +static void +adjust_date_time_dialog_on_time_system_changed (AdjustDateTimeDialog* self) +{ + AdjustDateTimeDialogTimeSystem _tmp0_; + GtkComboBoxText* _tmp1_; + ConfigFacade* _tmp2_; + ConfigFacade* _tmp3_; + GtkComboBoxText* _tmp4_; + GtkComboBoxText* _tmp5_; +#line 318 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_return_if_fail (IS_ADJUST_DATE_TIME_DIALOG (self)); +#line 319 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp0_ = self->priv->previous_time_system; +#line 319 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp1_ = self->priv->system; +#line 319 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp0_ == gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_combo_box_get_type (), GtkComboBox))) { +#line 320 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + return; +#line 2113 "AdjustDateTimeDialog.c" + } +#line 322 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp2_ = config_facade_get_instance (); +#line 322 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp3_ = _tmp2_; +#line 322 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp4_ = self->priv->system; +#line 322 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + configuration_facade_set_use_24_hour_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_combo_box_get_type (), GtkComboBox)) == ((gint) ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR)); +#line 322 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (_tmp3_); +#line 324 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp5_ = self->priv->system; +#line 324 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (gtk_combo_box_get_active (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_combo_box_get_type (), GtkComboBox)) == ((gint) ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_24HR)) { +#line 2129 "AdjustDateTimeDialog.c" + gint _tmp6_ = 0; + GtkSpinButton* _tmp7_; + gint time = 0; + gint _tmp9_ = 0; + AdjustDateTimeDialogTimeSystem _tmp10_; + gint _tmp11_; + GtkSpinButton* _tmp12_; + GtkSpinButton* _tmp13_; + gint _tmp14_; +#line 325 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp7_ = self->priv->hour; +#line 325 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (gtk_spin_button_get_value (_tmp7_) == 12.0) { +#line 325 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = 0; +#line 2145 "AdjustDateTimeDialog.c" + } else { + GtkSpinButton* _tmp8_; +#line 325 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp8_ = self->priv->hour; +#line 325 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp6_ = (gint) gtk_spin_button_get_value (_tmp8_); +#line 2152 "AdjustDateTimeDialog.c" + } +#line 325 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time = _tmp6_; +#line 326 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp10_ = self->priv->previous_time_system; +#line 326 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp10_ == ADJUST_DATE_TIME_DIALOG_TIME_SYSTEM_PM) { +#line 326 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = 12; +#line 2162 "AdjustDateTimeDialog.c" + } else { +#line 326 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp9_ = 0; +#line 2166 "AdjustDateTimeDialog.c" + } +#line 326 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp11_ = time; +#line 326 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + time = _tmp11_ + _tmp9_; +#line 328 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp12_ = self->priv->hour; +#line 328 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_range (_tmp12_, (gdouble) 0, (gdouble) 23); +#line 329 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_set_original_time_label (self, TRUE); +#line 331 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp13_ = self->priv->hour; +#line 331 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp14_ = time; +#line 331 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_value (_tmp13_, (gdouble) _tmp14_); +#line 2184 "AdjustDateTimeDialog.c" + } else { + gint AMPM_hour = 0; + GtkSpinButton* _tmp15_; + GtkSpinButton* _tmp16_; + gint _tmp17_ = 0; + gint _tmp18_; + GtkSpinButton* _tmp20_; +#line 333 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp15_ = self->priv->hour; +#line 333 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + AMPM_hour = ((gint) gtk_spin_button_get_value (_tmp15_)) % 12; +#line 335 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp16_ = self->priv->hour; +#line 335 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_range (_tmp16_, (gdouble) 1, (gdouble) 12); +#line 336 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_set_original_time_label (self, FALSE); +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp18_ = AMPM_hour; +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + if (_tmp18_ == 0) { +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp17_ = 12; +#line 2208 "AdjustDateTimeDialog.c" + } else { + gint _tmp19_; +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp19_ = AMPM_hour; +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp17_ = _tmp19_; +#line 2215 "AdjustDateTimeDialog.c" + } +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _tmp20_ = self->priv->hour; +#line 338 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + gtk_spin_button_set_value (_tmp20_, (gdouble) _tmp17_); +#line 2221 "AdjustDateTimeDialog.c" + } +#line 341 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_on_time_changed (self); +#line 2225 "AdjustDateTimeDialog.c" +} + + +static void +adjust_date_time_dialog_class_init (AdjustDateTimeDialogClass * klass) +{ +#line 8 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + adjust_date_time_dialog_parent_class = g_type_class_peek_parent (klass); +#line 8 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + g_type_class_add_private (klass, sizeof (AdjustDateTimeDialogPrivate)); +#line 8 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + G_OBJECT_CLASS (klass)->finalize = adjust_date_time_dialog_finalize; +#line 2238 "AdjustDateTimeDialog.c" +} + + +static void +adjust_date_time_dialog_instance_init (AdjustDateTimeDialog * self) +{ +#line 8 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv = ADJUST_DATE_TIME_DIALOG_GET_PRIVATE (self); +#line 13 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self->priv->no_original_time = FALSE; +#line 2249 "AdjustDateTimeDialog.c" +} + + +static void +adjust_date_time_dialog_finalize (GObject * obj) +{ + AdjustDateTimeDialog * self; +#line 8 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ADJUST_DATE_TIME_DIALOG, AdjustDateTimeDialog); +#line 18 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->original_time_label); +#line 19 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->calendar); +#line 20 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->hour); +#line 21 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->minute); +#line 22 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->second); +#line 23 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->system); +#line 24 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->relativity_radio_button); +#line 25 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->batch_radio_button); +#line 26 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->modify_originals_check_button); +#line 27 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + _g_object_unref0 (self->priv->notification); +#line 8 "/home/jens/Source/shotwell/src/dialogs/AdjustDateTimeDialog.vala" + G_OBJECT_CLASS (adjust_date_time_dialog_parent_class)->finalize (obj); +#line 2281 "AdjustDateTimeDialog.c" +} + + +GType +adjust_date_time_dialog_get_type (void) +{ + static volatile gsize adjust_date_time_dialog_type_id__volatile = 0; + if (g_once_init_enter (&adjust_date_time_dialog_type_id__volatile)) { + static const GTypeInfo g_define_type_info = { sizeof (AdjustDateTimeDialogClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) adjust_date_time_dialog_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AdjustDateTimeDialog), 0, (GInstanceInitFunc) adjust_date_time_dialog_instance_init, NULL }; + GType adjust_date_time_dialog_type_id; + adjust_date_time_dialog_type_id = g_type_register_static (gtk_dialog_get_type (), "AdjustDateTimeDialog", &g_define_type_info, 0); + g_once_init_leave (&adjust_date_time_dialog_type_id__volatile, adjust_date_time_dialog_type_id); + } + return adjust_date_time_dialog_type_id__volatile; +} + + + |