summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-03-19 12:33:22 +0000
committerAlexander Larsson <alexl@src.gnome.org>2009-03-19 12:33:22 +0000
commitb4539643611e059f2822ffa60258f87c792362d6 (patch)
tree4b5d1a12a8eaa7372a68c5379103533d7bf8a6c8
parent1923c99b8c6b704bc9b176e7e5a49bc0c590e8b3 (diff)
downloadnautilus-b4539643611e059f2822ffa60258f87c792362d6.tar.gz
Report error for failed mounts. c
2009-03-19 Alexander Larsson <alexl@redhat.com> * src/file-manager/fm-directory-view.c: Report error for failed mounts. c svn path=/trunk/; revision=15139
-rw-r--r--ChangeLog6
-rw-r--r--src/file-manager/fm-directory-view.c22
2 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 45da9d681..9f4f7e9f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-03-19 Alexander Larsson <alexl@redhat.com>
+
+ * src/file-manager/fm-directory-view.c:
+ Report error for failed mounts.
+
+2009-03-19 Alexander Larsson <alexl@redhat.com>
+
* src/file-manager/fm-ditem-page.c:
(item_entry_free):
(save_entry):
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 4a3ba7a29..59c8a71a5 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -5924,6 +5924,22 @@ action_rename_select_all_callback (GtkAction *action,
}
static void
+file_mount_callback (NautilusFile *file,
+ GFile *result_location,
+ GError *error,
+ gpointer callback_data)
+{
+ if (error != NULL &&
+ (error->domain != G_IO_ERROR ||
+ (error->code != G_IO_ERROR_CANCELLED &&
+ error->code != G_IO_ERROR_FAILED_HANDLED &&
+ error->code != G_IO_ERROR_ALREADY_MOUNTED))) {
+ eel_show_error_dialog (_("Unable to mount location"),
+ error->message, NULL);
+ }
+}
+
+static void
action_mount_volume_callback (GtkAction *action,
gpointer data)
{
@@ -5941,7 +5957,7 @@ action_mount_volume_callback (GtkAction *action,
if (nautilus_file_can_mount (file)) {
mount_op = gtk_mount_operation_new (fm_directory_view_get_containing_window (view));
nautilus_file_mount (file, mount_op, NULL,
- NULL, NULL);
+ file_mount_callback, NULL);
g_object_unref (mount_op);
}
}
@@ -6029,7 +6045,7 @@ action_self_mount_volume_callback (GtkAction *action,
}
mount_op = gtk_mount_operation_new (fm_directory_view_get_containing_window (view));
- nautilus_file_mount (file, mount_op, NULL, NULL, NULL);
+ nautilus_file_mount (file, mount_op, NULL, file_mount_callback, NULL);
g_object_unref (mount_op);
}
@@ -6104,7 +6120,7 @@ action_location_mount_volume_callback (GtkAction *action,
}
mount_op = gtk_mount_operation_new (fm_directory_view_get_containing_window (view));
- nautilus_file_mount (file, mount_op, NULL, NULL, NULL);
+ nautilus_file_mount (file, mount_op, NULL, file_mount_callback, NULL);
g_object_unref (mount_op);
}