diff --git a/nautilus-2.12.1-format.patch b/nautilus-2.12.1-format.patch new file mode 100644 index 0000000..ba2c44e --- /dev/null +++ b/nautilus-2.12.1-format.patch @@ -0,0 +1,155 @@ +--- nautilus-2.12.1/src/file-manager/fm-actions.h.format 2005-07-01 06:22:19.000000000 -0400 ++++ nautilus-2.12.1/src/file-manager/fm-actions.h 2005-10-21 09:44:06.000000000 -0400 +@@ -57,6 +57,7 @@ + #define FM_ACTION_MOUNT_VOLUME "Mount Volume" + #define FM_ACTION_UNMOUNT_VOLUME "Unmount Volume" + #define FM_ACTION_EJECT_VOLUME "Eject Volume" ++#define FM_ACTION_FORMAT_VOLUME "Format Volume" + #define FM_ACTION_SCRIPTS "Scripts" + #define FM_ACTION_NEW_DOCUMENTS "New Documents" + #define FM_ACTION_NEW_EMPTY_FILE "New Empty File" +--- nautilus-2.12.1/src/file-manager/fm-directory-view.c.format 2005-09-27 04:31:43.000000000 -0400 ++++ nautilus-2.12.1/src/file-manager/fm-directory-view.c 2005-10-21 09:53:53.000000000 -0400 +@@ -377,6 +377,8 @@ + gpointer data); + static void action_unmount_volume_callback (GtkAction *action, + gpointer data); ++static void action_format_volume_callback (GtkAction *action, ++ gpointer data); + + /* location popup-related actions */ + +@@ -5796,6 +5798,31 @@ + nautilus_file_list_free (selection); + } + ++static void ++action_format_volume_callback (GtkAction *action, ++ gpointer data) ++{ ++ NautilusFile *file; ++ GList *selection, *l; ++ GnomeVFSDrive *drive; ++ FMDirectoryView *view; ++ ++ view = FM_DIRECTORY_VIEW (data); ++ ++ selection = fm_directory_view_get_selection (view); ++ for (l = selection; l != NULL; l = l->next) { ++ file = NAUTILUS_FILE (l->data); ++ ++ if (nautilus_file_has_drive (file)) { ++ drive = nautilus_file_get_drive (file); ++ if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) { ++ g_spawn_command_line_async ("gfloppy", NULL); ++ } ++ } ++ } ++ nautilus_file_list_free (selection); ++} ++ + static void + action_eject_volume_callback (GtkAction *action, + gpointer data) +@@ -6218,6 +6245,10 @@ + N_("_Eject"), NULL, /* label, accelerator */ + N_("Eject the selected volume"), /* tooltip */ + G_CALLBACK (action_eject_volume_callback) }, ++ { "Format Volume", NULL, /* name, stock id */ ++ N_("_Format"), NULL, /* label, accelerator */ ++ N_("Format the selected volume"), /* tooltip */ ++ G_CALLBACK (action_format_volume_callback) }, + { "OpenCloseParent", NULL, /* name, stock id */ + N_("Open File and Close window"), "Down", /* label, accelerator */ + NULL, /* tooltip */ +@@ -6457,7 +6488,8 @@ + gboolean *show_mount, + gboolean *show_unmount, + gboolean *show_eject, +- gboolean *show_connect) ++ gboolean *show_connect, ++ gboolean *show_format) + { + GnomeVFSVolume *volume; + GnomeVFSDrive *drive; +@@ -6467,6 +6499,7 @@ + *show_unmount = FALSE; + *show_eject = FALSE; + *show_connect = FALSE; ++ *show_format = FALSE; + + if (nautilus_file_has_volume (file)) { + *show_unmount = TRUE; +@@ -6481,6 +6514,10 @@ + } else { + *show_mount = TRUE; + } ++ ++ if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) { ++ *show_format = TRUE; ++ } + } else if (nautilus_file_is_nautilus_link (file)) { + uri = nautilus_file_get_activation_uri (file); + if (uri != NULL && +@@ -6507,32 +6544,38 @@ + gboolean show_unmount; + gboolean show_eject; + gboolean show_connect; ++ gboolean show_format; + GtkAction *action; + + show_mount = (selection != NULL); + show_unmount = (selection != NULL); + show_eject = (selection != NULL); + show_connect = (selection != NULL && selection_count == 1); ++ show_format = (selection != NULL && selection_count == 1); + + for (l = selection; l != NULL && (show_mount || show_unmount +- || show_eject || show_connect); ++ || show_eject || show_connect ++ || show_format); + l = l->next) { + gboolean show_mount_one; + gboolean show_unmount_one; + gboolean show_eject_one; + gboolean show_connect_one; ++ gboolean show_format_one; + + file = NAUTILUS_FILE (l->data); + file_should_show_foreach (file, + &show_mount_one, + &show_unmount_one, + &show_eject_one, +- &show_connect_one); ++ &show_connect_one, ++ &show_format_one); + + show_mount &= show_mount_one; + show_unmount &= show_unmount_one; + show_eject &= show_eject_one; + show_connect &= show_connect_one; ++ show_format &= show_format_one; + } + + /* We don't want both eject and unmount, since eject +@@ -6556,6 +6599,10 @@ + action = gtk_action_group_get_action (view->details->dir_action_group, + FM_ACTION_EJECT_VOLUME); + gtk_action_set_visible (action, show_eject); ++ ++ action = gtk_action_group_get_action (view->details->dir_action_group, ++ FM_ACTION_FORMAT_VOLUME); ++ gtk_action_set_visible (action, show_format); + } + + static void +--- nautilus-2.12.1/src/file-manager/nautilus-directory-view-ui.xml.format 2005-10-03 03:45:27.000000000 -0400 ++++ nautilus-2.12.1/src/file-manager/nautilus-directory-view-ui.xml 2005-10-21 09:44:06.000000000 -0400 +@@ -147,6 +147,7 @@ + + + ++ + + + diff --git a/nautilus.spec b/nautilus.spec index df747ea..edf4681 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -18,7 +18,7 @@ Name: nautilus Summary: Nautilus is a file manager for GNOME. Version: 2.12.1 -Release: 1 +Release: 2 License: GPL Group: User Interface/Desktops Source: ftp://ftp.gnome.org/pub/GNOME/sources/2.7/%{name}/%{name}-%{version}.tar.bz2 @@ -78,6 +78,8 @@ Obsoletes: nautilus-media # Some changes to default config Patch1: nautilus-2.5.7-rhconfig.patch +# Upstream in 2.13 +Patch2: nautilus-2.12.1-format.patch %description Nautilus integrates access to files, applications, media, @@ -90,6 +92,7 @@ GNOME desktop project. %setup -q -n %{name}-%{version} %patch1 -p1 -b .rhconfig +%patch2 -p1 -b .format %build @@ -166,6 +169,9 @@ scrollkeeper-update %{_includedir}/nautilus %changelog +* Fri Oct 21 2005 Matthias Clasen 2.12.1-2 +- Add a "Format" context menu item to the floppy in "Computer" + * Thu Oct 6 2005 Matthias Clasen 2.12.1-1 - Update to 2.12.1