|
|
20decb9 |
--- nautilus-2.13.92/src/file-manager/fm-directory-view.c.format 2006-03-06 10:19:21.000000000 -0500
|
|
|
20decb9 |
+++ nautilus-2.13.92/src/file-manager/fm-directory-view.c 2006-03-06 10:24:40.000000000 -0500
|
|
|
20decb9 |
@@ -6269,6 +6269,8 @@
|
|
|
20decb9 |
GList *selection, *l;
|
|
|
20decb9 |
GnomeVFSDrive *drive;
|
|
|
20decb9 |
FMDirectoryView *view;
|
|
|
20decb9 |
+ char *device_path;
|
|
|
20decb9 |
+ char *cmdline;
|
|
|
20decb9 |
|
|
|
20decb9 |
view = FM_DIRECTORY_VIEW (data);
|
|
|
20decb9 |
|
|
|
20decb9 |
@@ -6278,9 +6280,18 @@
|
|
|
20decb9 |
|
|
|
20decb9 |
if (nautilus_file_has_drive (file)) {
|
|
|
20decb9 |
drive = nautilus_file_get_drive (file);
|
|
|
20decb9 |
+ device_path = gnome_vfs_drive_get_device_path (drive);
|
|
|
20decb9 |
+
|
|
|
20decb9 |
if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) {
|
|
|
20decb9 |
- g_spawn_command_line_async ("gfloppy", NULL);
|
|
|
20decb9 |
+ cmdline = g_strconcat ("gfloppy ", device_path, NULL);
|
|
|
20decb9 |
+
|
|
|
20decb9 |
}
|
|
|
20decb9 |
+ else {
|
|
|
20decb9 |
+ cmdline = g_strconcat ("userformat ", device_path, NULL);
|
|
|
20decb9 |
+ }
|
|
|
20decb9 |
+ g_spawn_command_line_async (cmdline, NULL);
|
|
|
20decb9 |
+ g_free (cmdline);
|
|
|
20decb9 |
+ g_free (device_path);
|
|
|
20decb9 |
}
|
|
|
20decb9 |
}
|
|
|
20decb9 |
nautilus_file_list_free (selection);
|
|
|
20decb9 |
@@ -7021,16 +7032,18 @@
|
|
|
20decb9 |
} else if (nautilus_file_has_drive (file)) {
|
|
|
20decb9 |
drive = nautilus_file_get_drive (file);
|
|
|
20decb9 |
*show_eject = eject_for_type (gnome_vfs_drive_get_device_type (drive));
|
|
|
20decb9 |
+ if ((gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY &&
|
|
|
20decb9 |
+ g_find_program_in_path ("gfloppy")) ||
|
|
|
20decb9 |
+ g_find_program_in_path ("userformat")) {
|
|
|
20decb9 |
+ *show_format = TRUE;
|
|
|
20decb9 |
+ }
|
|
|
20decb9 |
+
|
|
|
20decb9 |
if (gnome_vfs_drive_is_mounted (drive)) {
|
|
|
20decb9 |
*show_unmount = TRUE;
|
|
|
20decb9 |
+ *show_format = FALSE;
|
|
|
20decb9 |
} else {
|
|
|
20decb9 |
*show_mount = TRUE;
|
|
|
20decb9 |
}
|
|
|
20decb9 |
-
|
|
|
20decb9 |
- if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY &&
|
|
|
20decb9 |
- g_find_program_in_path ("gfloppy")) {
|
|
|
20decb9 |
- *show_format = TRUE;
|
|
|
20decb9 |
- }
|
|
|
20decb9 |
} else if (nautilus_file_is_nautilus_link (file)) {
|
|
|
20decb9 |
uri = nautilus_file_get_activation_uri (file);
|
|
|
20decb9 |
if (uri != NULL &&
|