[gthumb] removed the preferences button from the import dialogs
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] removed the preferences button from the import dialogs
- Date: Sat, 7 Aug 2010 14:26:04 +0000 (UTC)
commit eb8479b7abb224b5b41b8045bd6a6c70101549f7
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Aug 6 17:56:03 2010 +0200
removed the preferences button from the import dialogs
instead of the overwrite option just use the overwrite
dialog when a file is going to be overwritten; the rotate
option is used only when importing from a device and
is set in the general preferences dialog.
extensions/flicker/data/ui/import-from-flickr.ui | 19 +--
extensions/flicker/dlg-import-from-flickr.c | 22 +--
.../importer/data/gthumb-importer.schemas.in | 26 ---
extensions/importer/gth-import-task.c | 200 +++++++++++++++++---
.../photo_importer/data/ui/photo-importer.ui | 22 +--
extensions/photo_importer/dlg-photo-importer.c | 22 +--
.../picasaweb/data/ui/import-from-picasaweb.ui | 19 +--
extensions/picasaweb/dlg-import-from-picasaweb.c | 22 +--
8 files changed, 187 insertions(+), 165 deletions(-)
---
diff --git a/extensions/flicker/data/ui/import-from-flickr.ui b/extensions/flicker/data/ui/import-from-flickr.ui
index 42bcae0..b3bece2 100644
--- a/extensions/flicker/data/ui/import-from-flickr.ui
+++ b/extensions/flicker/data/ui/import-from-flickr.ui
@@ -209,20 +209,6 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="preferences_button">
- <property name="label">gtk-preferences</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="close_button">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
@@ -233,7 +219,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -248,7 +234,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -262,7 +248,6 @@
</child>
<action-widgets>
<action-widget response="-11">button1</action-widget>
- <action-widget response="0">preferences_button</action-widget>
<action-widget response="-6">close_button</action-widget>
<action-widget response="-5">download_button</action-widget>
</action-widgets>
diff --git a/extensions/flicker/dlg-import-from-flickr.c b/extensions/flicker/dlg-import-from-flickr.c
index 0316bb1..8270872 100644
--- a/extensions/flicker/dlg-import-from-flickr.c
+++ b/extensions/flicker/dlg-import-from-flickr.c
@@ -151,8 +151,6 @@ import_dialog_response_cb (GtkDialog *dialog,
GthSubfolderType subfolder_type;
GthSubfolderFormat subfolder_format;
char *custom_format;
- gboolean overwrite_files;
- gboolean adjust_orientation;
GthTask *task;
destination = gth_import_preferences_get_destination ();
@@ -160,8 +158,6 @@ import_dialog_response_cb (GtkDialog *dialog,
subfolder_format = eel_gconf_get_enum (PREF_IMPORT_SUBFOLDER_FORMAT, GTH_TYPE_SUBFOLDER_FORMAT, GTH_SUBFOLDER_FORMAT_YYYYMMDD);
single_subfolder = eel_gconf_get_boolean (PREF_IMPORT_SUBFOLDER_SINGLE, FALSE);
custom_format = eel_gconf_get_string (PREF_IMPORT_SUBFOLDER_CUSTOM_FORMAT, "");
- overwrite_files = eel_gconf_get_boolean (PREF_IMPORT_OVERWRITE, FALSE);
- adjust_orientation = eel_gconf_get_boolean (PREF_IMPORT_ADJUST_ORIENTATION, FALSE);
task = gth_import_task_new (data->browser,
file_list,
@@ -173,8 +169,8 @@ import_dialog_response_cb (GtkDialog *dialog,
(photoset->title != NULL ? photoset->title : ""),
NULL,
FALSE,
- overwrite_files,
- adjust_orientation);
+ FALSE,
+ FALSE);
gth_browser_exec_task (data->browser, task, FALSE);
gtk_widget_destroy (data->dialog);
@@ -517,16 +513,6 @@ file_list_selection_changed_cb (GtkIconView *iconview,
}
-static void
-preferences_button_clicked_cb (GtkWidget *widget,
- DialogData *data)
-{
- gth_import_preferences_dialog_set_event (GTH_IMPORT_PREFERENCES_DIALOG (data->preferences_dialog),
- (data->photoset != NULL) ? data->photoset->title : "");
- gtk_window_present (GTK_WINDOW (data->preferences_dialog));
-}
-
-
void
dlg_import_from_flickr (FlickrServer *server,
GthBrowser *browser)
@@ -629,10 +615,6 @@ dlg_import_from_flickr (FlickrServer *server,
"selection_changed",
G_CALLBACK (file_list_selection_changed_cb),
data);
- g_signal_connect (GET_WIDGET ("preferences_button"),
- "clicked",
- G_CALLBACK (preferences_button_clicked_cb),
- data);
update_selection_status (data);
gth_import_preferences_dialog_set_event (GTH_IMPORT_PREFERENCES_DIALOG (data->preferences_dialog), "");
diff --git a/extensions/importer/data/gthumb-importer.schemas.in b/extensions/importer/data/gthumb-importer.schemas.in
index 4a3f7ad..acd98a9 100644
--- a/extensions/importer/data/gthumb-importer.schemas.in
+++ b/extensions/importer/data/gthumb-importer.schemas.in
@@ -67,32 +67,6 @@
</schema>
<schema>
- <key>/schemas/apps/gthumb/ext/importer/overwrite_files</key>
- <applyto>/apps/gthumb/ext/importer/overwrite_files</applyto>
- <owner>gthumb</owner>
- <type>bool</type>
- <default>FALSE</default>
- <locale name="C">
- <short></short>
- <long>
- </long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/apps/gthumb/ext/importer/adjust_orientation</key>
- <applyto>/apps/gthumb/ext/importer/adjust_orientation</applyto>
- <owner>gthumb</owner>
- <type>bool</type>
- <default>FALSE</default>
- <locale name="C">
- <short></short>
- <long>
- </long>
- </locale>
- </schema>
-
- <schema>
<key>/schemas/apps/gthumb/ext/importer/warn_delete_unsupported</key>
<applyto>/apps/gthumb/ext/importer/warn_delete_unsupported</applyto>
<owner>gthumb</owner>
diff --git a/extensions/importer/gth-import-task.c b/extensions/importer/gth-import-task.c
index 7f2647a..944a0e4 100644
--- a/extensions/importer/gth-import-task.c
+++ b/extensions/importer/gth-import-task.c
@@ -57,6 +57,9 @@ struct _GthImportTaskPrivate {
GFile *imported_catalog;
gboolean delete_not_supported;
int n_imported;
+ GthOverwriteResponse default_response;
+ void *buffer;
+ gsize buffer_size;
};
@@ -73,6 +76,7 @@ gth_import_task_finalize (GObject *object)
if (ImportPhotos)
gtk_window_present (GTK_WINDOW (self->priv->browser));
+ g_free (self->priv->buffer);
g_hash_table_unref (self->priv->destinations);
_g_object_list_unref (self->priv->files);
g_object_unref (self->priv->destination);
@@ -229,21 +233,139 @@ transformation_ready_cb (GError *error,
static void
+write_file_to_destination (GthImportTask *self,
+ GFile *destination_file,
+ void *buffer,
+ gsize count,
+ gboolean overwrite);
+
+
+static void
+overwrite_dialog_response_cb (GtkDialog *dialog,
+ gint response_id,
+ gpointer user_data)
+{
+ GthImportTask *self = user_data;
+
+ if (response_id != GTK_RESPONSE_OK)
+ self->priv->default_response = GTH_OVERWRITE_RESPONSE_CANCEL;
+ else
+ self->priv->default_response = gth_overwrite_dialog_get_response (GTH_OVERWRITE_DIALOG (dialog));
+
+ gtk_widget_hide (GTK_WIDGET (dialog));
+ gth_task_dialog (GTH_TASK (self), FALSE, NULL);
+
+ switch (self->priv->default_response) {
+ case GTH_OVERWRITE_RESPONSE_NO:
+ case GTH_OVERWRITE_RESPONSE_ALWAYS_NO:
+ case GTH_OVERWRITE_RESPONSE_UNSPECIFIED:
+ import_next_file (self);
+ break;
+
+ case GTH_OVERWRITE_RESPONSE_YES:
+ case GTH_OVERWRITE_RESPONSE_ALWAYS_YES:
+ write_file_to_destination (self,
+ self->priv->destination,
+ self->priv->buffer,
+ self->priv->buffer_size,
+ TRUE);
+ break;
+
+ case GTH_OVERWRITE_RESPONSE_RENAME:
+ {
+ GthFileData *file_data;
+ GFile *destination_folder;
+ GFile *new_destination;
+
+ file_data = self->priv->current->data;
+ destination_folder = gth_import_utils_get_file_destination (file_data,
+ self->priv->destination,
+ self->priv->subfolder_type,
+ self->priv->subfolder_format,
+ self->priv->single_subfolder,
+ self->priv->custom_format,
+ self->priv->event_name,
+ self->priv->import_start_time);
+ new_destination = g_file_get_child_for_display_name (destination_folder, gth_overwrite_dialog_get_filename (GTH_OVERWRITE_DIALOG (dialog)), NULL);
+ write_file_to_destination (self,
+ new_destination,
+ self->priv->buffer,
+ self->priv->buffer_size,
+ FALSE);
+
+ g_object_unref (new_destination);
+ g_object_unref (destination_folder);
+ }
+ break;
+
+ case GTH_OVERWRITE_RESPONSE_CANCEL:
+ {
+ GError *error;
+
+ error = g_error_new_literal (GTH_TASK_ERROR, GTH_TASK_ERROR_CANCELLED, "");
+ gth_task_completed (GTH_TASK (self), error);
+ }
+ break;
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+
+static void
write_buffer_ready_cb (void **buffer,
gsize count,
GError *error,
gpointer user_data)
{
GthImportTask *self = user_data;
- GthFileData *file_data;
gboolean appling_tranformation = FALSE;
+ GthFileData *file_data;
+
+ file_data = self->priv->current->data;
if (error != NULL) {
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS)) {
+ if (self->priv->default_response != GTH_OVERWRITE_RESPONSE_ALWAYS_NO) {
+ GInputStream *stream;
+ GdkPixbuf *pixbuf;
+ GtkWidget *dialog;
+
+ /* take ownership of the buffer */
+
+ self->priv->buffer = *buffer;
+ self->priv->buffer_size = count;
+ *buffer = NULL;
+
+ /* show the overwrite dialog */
+
+ stream = g_memory_input_stream_new_from_data (self->priv->buffer, self->priv->buffer_size, NULL);
+ pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, NULL);
+ dialog = gth_overwrite_dialog_new (file_data->file,
+ pixbuf,
+ self->priv->destination_file->file,
+ self->priv->default_response,
+ self->priv->files->next == NULL);
+ g_signal_connect (dialog,
+ "response",
+ G_CALLBACK (overwrite_dialog_response_cb),
+ self);
+ gtk_widget_show (dialog);
+ gth_task_dialog (GTH_TASK (self), TRUE, dialog);
+
+ _g_object_unref (pixbuf);
+ g_object_unref (stream);
+ }
+ else
+ import_next_file (self);
+
+ return;
+ }
+
gth_task_completed (GTH_TASK (self), error);
return;
}
- file_data = self->priv->current->data;
if (self->priv->delete_imported) {
GError *local_error = NULL;
@@ -279,6 +401,39 @@ write_buffer_ready_cb (void **buffer,
static void
+write_file_to_destination (GthImportTask *self,
+ GFile *destination_file,
+ void *buffer,
+ gsize count,
+ gboolean replace)
+{
+ GthFileData *file_data;
+
+ file_data = self->priv->current->data;
+
+ _g_object_unref (self->priv->destination_file);
+ self->priv->destination_file = gth_file_data_new (destination_file, file_data->info);
+
+ gth_task_progress (GTH_TASK (self),
+ _("Importing files"),
+ g_file_info_get_display_name (file_data->info),
+ FALSE,
+ (self->priv->copied_size + ((double) self->priv->current_file_size / 3.0 * 2.0)) / self->priv->tot_size);
+
+ g_write_file_async (self->priv->destination_file->file,
+ buffer,
+ count,
+ replace,
+ G_PRIORITY_DEFAULT,
+ gth_task_get_cancellable (GTH_TASK (self)),
+ write_buffer_ready_cb,
+ self);
+
+ self->priv->buffer = NULL; /* the buffer will be deallocated in g_write_file_async */
+}
+
+
+static void
file_buffer_ready_cb (void **buffer,
gsize count,
GError *error,
@@ -295,6 +450,7 @@ file_buffer_ready_cb (void **buffer,
}
file_data = self->priv->current->data;
+
if (gth_main_extension_is_active ("exiv2_tools"))
exiv2_read_metadata_from_buffer (*buffer, count, file_data->info, NULL);
@@ -313,9 +469,10 @@ file_buffer_ready_cb (void **buffer,
}
}
- destination_file = _g_file_get_destination (file_data->file, NULL, destination);
+ /* Get the destination file avoiding to overwrite an already imported
+ * file. */
- /* avoid to overwrite an already imported file */
+ destination_file = _g_file_get_destination (file_data->file, NULL, destination);
while (g_hash_table_lookup (self->priv->destinations, destination_file) != NULL) {
GFile *tmp = destination_file;
destination_file = _g_file_get_duplicated (tmp);
@@ -323,28 +480,12 @@ file_buffer_ready_cb (void **buffer,
}
g_hash_table_insert (self->priv->destinations, g_object_ref (destination_file), GINT_TO_POINTER (1));
- if (self->priv->overwrite_files || ! g_file_query_exists (destination_file, NULL)) {
- _g_object_unref (self->priv->destination_file);
- self->priv->destination_file = gth_file_data_new (destination_file, file_data->info);
-
- gth_task_progress (GTH_TASK (self),
- _("Importing files"),
- g_file_info_get_display_name (file_data->info),
- FALSE,
- (self->priv->copied_size + ((double) self->priv->current_file_size / 3.0 * 2.0)) / self->priv->tot_size);
-
- g_write_file_async (self->priv->destination_file->file,
- *buffer,
- count,
- TRUE,
- G_PRIORITY_DEFAULT,
- gth_task_get_cancellable (GTH_TASK (self)),
- write_buffer_ready_cb,
- self);
- *buffer = NULL; /* g_write_file_async takes ownership of the buffer */
- }
- else
- call_when_idle ((DataFunc) import_next_file, self);
+ write_file_to_destination (self,
+ destination_file,
+ *buffer,
+ count,
+ self->priv->default_response == GTH_OVERWRITE_RESPONSE_ALWAYS_YES);
+ *buffer = NULL; /* g_write_file_async takes ownership of the buffer */
g_object_unref (destination_file);
g_object_unref (destination);
@@ -356,6 +497,9 @@ import_current_file (GthImportTask *self)
{
GthFileData *file_data;
+ g_free (self->priv->buffer);
+ self->priv->buffer = NULL;
+
if (self->priv->current == NULL) {
save_catalogs (self);
@@ -435,6 +579,7 @@ gth_import_task_exec (GthTask *base)
}
g_get_current_time (&timeval);
self->priv->import_start_time = timeval;
+ self->priv->default_response = GTH_OVERWRITE_RESPONSE_UNSPECIFIED;
/* create the imported files catalog */
@@ -471,6 +616,7 @@ gth_import_task_exec (GthTask *base)
gth_datetime_free (date_time);
}
+ self->priv->buffer = NULL;
self->priv->current = self->priv->files;
import_current_file (self);
}
@@ -503,6 +649,7 @@ gth_import_task_init (GthImportTask *self)
(GEqualFunc) g_file_equal,
g_object_unref,
NULL);
+ self->priv->buffer = NULL;
}
@@ -565,6 +712,7 @@ gth_import_task_new (GthBrowser *browser,
self->priv->tags = g_strdupv (tags);
self->priv->delete_imported = delete_imported;
self->priv->overwrite_files = overwrite_files;
+ self->priv->default_response = overwrite_files ? GTH_OVERWRITE_RESPONSE_ALWAYS_YES : GTH_OVERWRITE_RESPONSE_UNSPECIFIED;
self->priv->adjust_orientation = adjust_orientation;
return (GthTask *) self;
diff --git a/extensions/photo_importer/data/ui/photo-importer.ui b/extensions/photo_importer/data/ui/photo-importer.ui
index a6dbe34..acfc783 100644
--- a/extensions/photo_importer/data/ui/photo-importer.ui
+++ b/extensions/photo_importer/data/ui/photo-importer.ui
@@ -251,21 +251,6 @@
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="preferences_button">
- <property name="label">gtk-preferences</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="cancel_button">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
@@ -276,7 +261,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -291,7 +276,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -305,7 +290,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">2</property>
<property name="secondary">True</property>
</packing>
</child>
@@ -319,7 +304,6 @@
</object>
</child>
<action-widgets>
- <action-widget response="0">preferences_button</action-widget>
<action-widget response="0">cancel_button</action-widget>
<action-widget response="0">ok_button</action-widget>
<action-widget response="0">button2</action-widget>
diff --git a/extensions/photo_importer/dlg-photo-importer.c b/extensions/photo_importer/dlg-photo-importer.c
index 45cea28..6c5165c 100644
--- a/extensions/photo_importer/dlg-photo-importer.c
+++ b/extensions/photo_importer/dlg-photo-importer.c
@@ -79,8 +79,6 @@ destroy_dialog (gpointer user_data)
GthSubfolderType subfolder_type;
GthSubfolderFormat subfolder_format;
char *custom_format;
- gboolean overwrite_files;
- gboolean adjust_orientation;
GtkWidget *file_view;
GList *items;
GList *file_list;
@@ -90,8 +88,6 @@ destroy_dialog (gpointer user_data)
subfolder_type = eel_gconf_get_enum (PREF_IMPORT_SUBFOLDER_TYPE, GTH_TYPE_SUBFOLDER_TYPE, GTH_SUBFOLDER_TYPE_FILE_DATE);
subfolder_format = eel_gconf_get_enum (PREF_IMPORT_SUBFOLDER_FORMAT, GTH_TYPE_SUBFOLDER_FORMAT, GTH_SUBFOLDER_FORMAT_YYYYMMDD);
custom_format = eel_gconf_get_string (PREF_IMPORT_SUBFOLDER_CUSTOM_FORMAT, "");
- overwrite_files = eel_gconf_get_boolean (PREF_IMPORT_OVERWRITE, FALSE);
- adjust_orientation = eel_gconf_get_boolean (PREF_IMPORT_ADJUST_ORIENTATION, FALSE);
file_view = gth_file_list_get_view (GTH_FILE_LIST (data->file_list));
items = gth_file_selection_get_selected (GTH_FILE_SELECTION (file_view));
@@ -115,8 +111,8 @@ destroy_dialog (gpointer user_data)
gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("event_entry"))),
tags,
delete_imported,
- overwrite_files,
- adjust_orientation);
+ FALSE,
+ eel_gconf_get_boolean (PREF_PHOTO_IMPORT_ADJUST_ORIENTATION, FALSE));
gth_browser_exec_task (data->browser, task, FALSE);
g_strfreev (tags);
@@ -465,16 +461,6 @@ filter_combobox_changed_cb (GtkComboBox *widget,
static void
-preferences_button_clicked_cb (GtkWidget *widget,
- DialogData *data)
-{
- gth_import_preferences_dialog_set_event (GTH_IMPORT_PREFERENCES_DIALOG (data->preferences_dialog),
- gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("event_entry"))));
- gtk_window_present (GTK_WINDOW (data->preferences_dialog));
-}
-
-
-static void
event_entry_changed_cb (GtkEditable *editable,
DialogData *data)
{
@@ -631,10 +617,6 @@ dlg_photo_importer (GthBrowser *browser,
"selection_changed",
G_CALLBACK (file_view_selection_changed_cb),
data);
- g_signal_connect (GET_WIDGET ("preferences_button"),
- "clicked",
- G_CALLBACK (preferences_button_clicked_cb),
- data);
data->entry_points_changed_id = g_signal_connect (gth_main_get_default_monitor (),
"entry-points-changed",
G_CALLBACK (entry_points_changed_cb),
diff --git a/extensions/picasaweb/data/ui/import-from-picasaweb.ui b/extensions/picasaweb/data/ui/import-from-picasaweb.ui
index 3dd69ee..fab4986 100644
--- a/extensions/picasaweb/data/ui/import-from-picasaweb.ui
+++ b/extensions/picasaweb/data/ui/import-from-picasaweb.ui
@@ -221,20 +221,6 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="preferences_button">
- <property name="label">gtk-preferences</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="close_button">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
@@ -245,7 +231,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -260,7 +246,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -274,7 +260,6 @@
</child>
<action-widgets>
<action-widget response="-11">button1</action-widget>
- <action-widget response="0">preferences_button</action-widget>
<action-widget response="-6">close_button</action-widget>
<action-widget response="-5">download_button</action-widget>
</action-widgets>
diff --git a/extensions/picasaweb/dlg-import-from-picasaweb.c b/extensions/picasaweb/dlg-import-from-picasaweb.c
index 9563800..6f726cf 100644
--- a/extensions/picasaweb/dlg-import-from-picasaweb.c
+++ b/extensions/picasaweb/dlg-import-from-picasaweb.c
@@ -162,8 +162,6 @@ import_dialog_response_cb (GtkDialog *dialog,
GthSubfolderType subfolder_type;
GthSubfolderFormat subfolder_format;
char *custom_format;
- gboolean overwrite_files;
- gboolean adjust_orientation;
char **tags;
int i;
GthTask *task;
@@ -173,8 +171,6 @@ import_dialog_response_cb (GtkDialog *dialog,
subfolder_format = eel_gconf_get_enum (PREF_IMPORT_SUBFOLDER_FORMAT, GTH_TYPE_SUBFOLDER_FORMAT, GTH_SUBFOLDER_FORMAT_YYYYMMDD);
single_subfolder = eel_gconf_get_boolean (PREF_IMPORT_SUBFOLDER_SINGLE, FALSE);
custom_format = eel_gconf_get_string (PREF_IMPORT_SUBFOLDER_CUSTOM_FORMAT, "");
- overwrite_files = eel_gconf_get_boolean (PREF_IMPORT_OVERWRITE, FALSE);
- adjust_orientation = eel_gconf_get_boolean (PREF_IMPORT_ADJUST_ORIENTATION, FALSE);
tags = g_strsplit ((album->keywords != NULL ? album->keywords : ""), ",", -1);
for (i = 0; tags[i] != NULL; i++)
@@ -190,8 +186,8 @@ import_dialog_response_cb (GtkDialog *dialog,
(album->title != NULL ? album->title : ""),
tags,
FALSE,
- overwrite_files,
- adjust_orientation);
+ FALSE,
+ FALSE);
gth_browser_exec_task (data->browser, task, FALSE);
gtk_widget_destroy (data->dialog);
@@ -898,16 +894,6 @@ file_list_selection_changed_cb (GtkIconView *iconview,
}
-static void
-preferences_button_clicked_cb (GtkWidget *widget,
- DialogData *data)
-{
- gth_import_preferences_dialog_set_event (GTH_IMPORT_PREFERENCES_DIALOG (data->preferences_dialog),
- (data->album != NULL) ? data->album->title : "");
- gtk_window_present (GTK_WINDOW (data->preferences_dialog));
-}
-
-
void
dlg_import_from_picasaweb (GthBrowser *browser)
{
@@ -1003,10 +989,6 @@ dlg_import_from_picasaweb (GthBrowser *browser)
"selection_changed",
G_CALLBACK (file_list_selection_changed_cb),
data);
- g_signal_connect (GET_WIDGET ("preferences_button"),
- "clicked",
- G_CALLBACK (preferences_button_clicked_cb),
- data);
update_selection_status (data);
gth_import_preferences_dialog_set_event (GTH_IMPORT_PREFERENCES_DIALOG (data->preferences_dialog), "");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]