[gthumb] Bug 585760 – importer: information about downloading not issued
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Bug 585760 – importer: information about downloading not issued
- Date: Sun, 14 Jun 2009 15:54:22 -0400 (EDT)
commit 5bd68a88524dd8eeb8cd4e0060032741ea71b76b
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Sun Jun 14 15:53:52 2009 -0400
Bug 585760 â?? importer: information about downloading not issued
libgthumb/gth-sort-utils.c | 17 +++++++++++++++++
libgthumb/gth-sort-utils.h | 2 ++
src/dlg-photo-importer.c | 18 +++++++++++++++++-
3 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/libgthumb/gth-sort-utils.c b/libgthumb/gth-sort-utils.c
index e2bb4b4..f7bd58e 100644
--- a/libgthumb/gth-sort-utils.c
+++ b/libgthumb/gth-sort-utils.c
@@ -179,6 +179,23 @@ gth_sort_by_filename_but_ignore_path (const char *name1,
}
+int gth_sort_by_gfile (GFile *file1,
+ GFile *file2)
+{
+ char *path1, *path2;
+ int result;
+
+ path1 = g_file_get_parse_name (file1);
+ path2 = g_file_get_parse_name (file2);
+ result = gth_sort_by_filename (path1, path2, FALSE);
+
+ g_free(path1);
+ g_free(path2);
+
+ return result;
+}
+
+
int gth_sort_by_full_path (const char *path1,
const char *path2)
{
diff --git a/libgthumb/gth-sort-utils.h b/libgthumb/gth-sort-utils.h
index f3216c7..8890d36 100644
--- a/libgthumb/gth-sort-utils.h
+++ b/libgthumb/gth-sort-utils.h
@@ -41,6 +41,8 @@ int gth_sort_by_filetime_then_name (time_t time1,
const char *name2);
int gth_sort_by_filename_but_ignore_path (const char *name1,
const char *name2);
+int gth_sort_by_gfile (GFile *file1,
+ GFile *file2);
int gth_sort_by_full_path (const char *path1,
const char *path2);
int gth_sort_by_exiftime_then_name (FileData *fd1,
diff --git a/src/dlg-photo-importer.c b/src/dlg-photo-importer.c
index 17b6a7e..f3b0b12 100644
--- a/src/dlg-photo-importer.c
+++ b/src/dlg-photo-importer.c
@@ -32,6 +32,7 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
+#include "gth-sort-utils.h"
#include "gth-utils.h"
#include "gtk-utils.h"
#include "gth-window.h"
@@ -598,6 +599,8 @@ get_all_files (DialogData *data)
file_list = gfile_import_file_list_recursive (gfile, file_list);
}
+ file_list = g_list_sort (file_list, (GCompareFunc) gth_sort_by_gfile);
+
return file_list;
}
@@ -711,7 +714,7 @@ gfile_get_preview (DialogData *data,
if (gfile == NULL)
return NULL;
- if (data->generate_previews) {
+ if (data->generate_previews && mime_type_is_image (mime_type)) {
uri = g_file_get_uri (gfile);
pixbuf = gnome_desktop_thumbnail_factory_generate_thumbnail (data->factory, uri, mime_type);
g_free (uri);
@@ -790,6 +793,10 @@ load_images_preview__step (AsyncOperationData *aodata,
fd = file_data_new_from_gfile ((GFile *) aodata->scan->data);
+ if (data->msg_text != NULL)
+ g_free (data->msg_text);
+ data->msg_text = g_strdup_printf (_("Getting preview of '%s\' from camera."), fd->utf8_name);
+
pixbuf = gfile_get_preview (data, (GFile *) aodata->scan->data, THUMB_SIZE, fd->mime_type);
gth_image_list_append_with_data (GTH_IMAGE_LIST (data->image_list),
@@ -1085,6 +1092,15 @@ save_images__step (AsyncOperationData *aodata,
GFile *gfile = aodata->scan->data;
char *path = g_file_get_parse_name (gfile);
+ char *name = g_file_get_basename (gfile);
+
+ if (data->msg_text != NULL)
+ g_free (data->msg_text);
+ if (data->delete_from_camera)
+ data->msg_text = g_strdup_printf (_("Moving '%s\' from camera."), name);
+ else
+ data->msg_text = g_strdup_printf (_("Copying '%s\' from camera."), name);
+ g_free (name);
subfolder_value = gtk_combo_box_get_active (GTK_COMBO_BOX (data->subfolder_combobox));
folder_fd = file_data_new_from_path (data->main_dest_folder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]