[gthumb] Check attached cameras if the specified URI has no photos
- From: Michael J. Chudobiak <mjc src gnome org>
- To: svn-commits-list gnome org
- Subject: [gthumb] Check attached cameras if the specified URI has no photos
- Date: Mon, 8 Jun 2009 08:54:48 -0400 (EDT)
commit 49890f741f2cce9604836048ec285369f9fb0b56
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date: Mon Jun 8 08:54:13 2009 -0400
Check attached cameras if the specified URI has no photos
---
src/dlg-photo-importer.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/dlg-photo-importer.c b/src/dlg-photo-importer.c
index abfcfa3..d8f9ab9 100644
--- a/src/dlg-photo-importer.c
+++ b/src/dlg-photo-importer.c
@@ -559,7 +559,20 @@ get_all_files (DialogData *data)
data->uri = NULL;
}
- if (data->uri == NULL) {
+ if (data->uri) {
+ if (data->dcim_dirs_only) {
+ gfile = gfile_new (data->uri);
+ data->dcim_dirs = gfile_import_dir_list_recursive (gfile, data->dcim_dirs, NULL, 0);
+ g_object_unref (gfile);
+ } else {
+ data->dcim_dirs = g_list_prepend (data->dcim_dirs, gfile_new (data->uri));
+ }
+ if (!file_list) {
+ _gtk_info_dialog_run (GTK_WINDOW (data->dialog), _("No files found in %s, scanning for attached devices instead"), data->uri);
+ }
+ }
+
+ if (!file_list) {
char *gvfs_dir = g_strconcat (g_get_home_dir (), "/", ".gvfs", NULL);
GFile *gfile = gfile_new (gvfs_dir);
data->dcim_dirs = gfile_import_dir_list_recursive (gfile, data->dcim_dirs, "gphoto", 0);
@@ -569,15 +582,6 @@ get_all_files (DialogData *data)
gfile = gfile_new ("/media");
data->dcim_dirs = gfile_import_dir_list_recursive (gfile, data->dcim_dirs, NULL, 0);
g_object_unref (gfile);
- } else {
- if (data->dcim_dirs_only) {
- gfile = gfile_new (data->uri);
- data->dcim_dirs = gfile_import_dir_list_recursive (gfile, data->dcim_dirs, NULL, 0);
- g_object_unref (gfile);
- } else {
- data->dcim_dirs = g_list_prepend (data->dcim_dirs, gfile_new (data->uri));
- }
-
}
for (scan = data->dcim_dirs; scan; scan = scan->next) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]