r10166 - in /desktop/experimental/nautilus/debian: changelog
patches/01_prompt_same_file.patch patches/series
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Thu Apr 19 20:37:03 UTC 2007
Author: joss
Date: Thu Apr 19 20:37:03 2007
New Revision: 10166
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=10166
Log:
* 10_location_titlebar.patch: patch from Adrien Delle Cave to display
* 01_prompt_same_file.patch: don't overwrite files when the source and
destination are strictly the same (closes: #419525).
Added:
desktop/experimental/nautilus/debian/patches/01_prompt_same_file.patch
Modified:
desktop/experimental/nautilus/debian/changelog
desktop/experimental/nautilus/debian/patches/series
Modified: desktop/experimental/nautilus/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/nautilus/debian/changelog?rev=10166&op=diff
==============================================================================
--- desktop/experimental/nautilus/debian/changelog (original)
+++ desktop/experimental/nautilus/debian/changelog Thu Apr 19 20:37:03 2007
@@ -1,10 +1,12 @@
nautilus (2.16.3-6) UNRELEASED; urgency=low
- * 10_location_titlebar.patch: patch from Adrien Delle Cave to display
+ * 10_location_titlebar.patch: patch from Adrien Delle Cave to display
the full location in the title bar when a setting is enabled
(closes: #413018).
-
- -- Josselin Mouette <joss at debian.org> Sat, 3 Mar 2007 23:21:04 +0100
+ * 01_prompt_same_file.patch: don't overwrite files when the source and
+ destination are strictly the same (closes: #419525).
+
+ -- Josselin Mouette <joss at debian.org> Thu, 19 Apr 2007 22:32:52 +0200
nautilus (2.16.3-5) experimental; urgency=low
Added: desktop/experimental/nautilus/debian/patches/01_prompt_same_file.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/nautilus/debian/patches/01_prompt_same_file.patch?rev=10166&op=file
==============================================================================
--- desktop/experimental/nautilus/debian/patches/01_prompt_same_file.patch (added)
+++ desktop/experimental/nautilus/debian/patches/01_prompt_same_file.patch Thu Apr 19 20:37:03 2007
@@ -1,0 +1,96 @@
+Index: nautilus-2.16.3/libnautilus-private/nautilus-file-operations.c
+===================================================================
+--- nautilus-2.16.3.orig/libnautilus-private/nautilus-file-operations.c 2007-04-19 21:48:30.868578500 +0200
++++ nautilus-2.16.3/libnautilus-private/nautilus-file-operations.c 2007-04-19 22:29:17.681494750 +0200
+@@ -1114,6 +1114,34 @@
+ return is_dir;
+ }
+
++static gboolean
++are_same_file (const char *first_uri, const char *second_uri)
++{
++ GnomeVFSFileInfo *info;
++ GnomeVFSResult result;
++ dev_t device;
++ GnomeVFSInodeNumber inode;
++ gboolean are_same = FALSE;
++
++ info = gnome_vfs_file_info_new ();
++ result = gnome_vfs_get_file_info (first_uri, info, GNOME_VFS_FILE_INFO_DEFAULT);
++ if (result == GNOME_VFS_OK &&
++ info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_DEVICE &&
++ info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_INODE) {
++ device = info->device;
++ inode = info->inode;
++ result = gnome_vfs_get_file_info (second_uri, info, GNOME_VFS_FILE_INFO_DEFAULT);
++ if (result == GNOME_VFS_OK &&
++ info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_DEVICE &&
++ info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_INODE &&
++ device == info->device && inode == info->inode) {
++ are_same = TRUE;
++ }
++ }
++ gnome_vfs_file_info_unref (info);
++
++ return are_same;
++}
+
+ static int
+ handle_transfer_overwrite (const GnomeVFSXferProgressInfo *progress_info,
+@@ -1122,12 +1150,14 @@
+ int result;
+ char *text, *primary_text, *secondary_text, *formatted_name, *base_name;
+ GnomeVFSURI *file_uri, *parent_uri;
+- gboolean is_merge, target_is_dir;
++ gboolean is_merge, target_is_dir, target_is_link;
+
+ nautilus_file_operations_progress_pause_timeout (transfer_info->progress_dialog);
+
+ /* Handle special case files such as Trash, mount links and home directory */
+- if (is_special_link (progress_info->target_name)) {
++ target_is_link = is_special_link (progress_info->target_name);
++ if (target_is_link ||
++ are_same_file (progress_info->source_name, progress_info->target_name)) {
+ formatted_name = extract_and_ellipsize_file_name_for_dialog
+ (parent_for_error_dialog (transfer_info),
+ progress_info->target_name);
+@@ -1135,19 +1165,30 @@
+ if (transfer_info->kind == TRANSFER_MOVE) {
+ primary_text = g_strdup_printf (_("Could not move \"%s\" to the new location."),
+ formatted_name);
+-
+- secondary_text = _("The name is already used for a special item that "
+- "cannot be removed or replaced. If you still want "
+- "to move the item, rename it and try again.");
+ } else {
+ primary_text = g_strdup_printf (_("Could not copy \"%s\" to the new location."),
+ formatted_name);
+-
+- secondary_text = _("The name is already used for a special item that "
+- "cannot be removed or replaced. If you still want "
+- "to copy the item, rename it and try again.");
+ }
+-
++ if (target_is_link) {
++ if (transfer_info->kind == TRANSFER_MOVE) {
++ secondary_text = _("The name is already used for a special item that "
++ "cannot be removed or replaced. If you still want "
++ "to move the item, rename it and try again.");
++ } else {
++ secondary_text = _("The name is already used for a special item that "
++ "cannot be removed or replaced. If you still want "
++ "to copy the item, rename it and try again.");
++ }
++ } else {
++ if (transfer_info->kind == TRANSFER_MOVE) {
++ secondary_text = _("The name is already used for an item which is the same "
++ "as the one you are trying to move.");
++ } else {
++ secondary_text = _("The name is already used for an item which is the same "
++ "as the one you are trying to copy.");
++ }
++ }
++
+ eel_run_simple_dialog (parent_for_error_dialog (transfer_info),
+ TRUE, GTK_MESSAGE_ERROR,
+ primary_text, secondary_text,
Modified: desktop/experimental/nautilus/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/nautilus/debian/patches/series?rev=10166&op=diff
==============================================================================
--- desktop/experimental/nautilus/debian/patches/series (original)
+++ desktop/experimental/nautilus/debian/patches/series Thu Apr 19 20:37:03 2007
@@ -1,3 +1,4 @@
+01_prompt_same_file.patch
02_umask.patch
03_sftp_connect.patch
04_show_backup_files.patch
More information about the pkg-gnome-commits
mailing list