Commit 0919c257 authored by Gene Z. Ragan's avatar Gene Z. Ragan Committed by Gene Ragan

reviewed by: Pavel Cisler <pavel@eazel.com>

2001-01-29  Gene Z. Ragan  <gzr@eazel.com>

	reviewed by: Pavel Cisler <pavel@eazel.com>

	Fixed bug 5508, Nautilus crashes when pressing 'Esc' in
	copy/duplicate progress dialog

	* libnautilus-extensions/nautilus-file-operations.c:
	(handle_close_callback), (create_transfer_dialog):
	Set the cancel state to true if the user uses the Escape key
	or close box to dismiss the dialog.  This will cancel the
	transfer properly.
parent d38855b6
2001-01-29 Gene Z. Ragan <gzr@eazel.com>
reviewed by: Pavel Cisler <pavel@eazel.com>
Fixed bug 5508, Nautilus crashes when pressing 'Esc' in
copy/duplicate progress dialog
* libnautilus-extensions/nautilus-file-operations.c:
(handle_close_callback), (create_transfer_dialog):
Set the cancel state to true if the user uses the Escape key
or close box to dismiss the dialog. This will cancel the
transfer properly.
2001-01-29 Ramiro Estrugo <ramiro@eazel.com>
* libnautilus-extensions/nautilus-preferences-item.c:
......
......@@ -229,7 +229,6 @@ nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *di
dialog->details->total_bytes_copied = 0;
dialog->details->freeze_count = 0;
}
static void
......
......@@ -305,6 +305,15 @@ center_dialog_over_window (GtkWindow *window, GtkWindow *over)
}
static gboolean
handle_close_callback (GnomeDialog *dialog, TransferInfo *tranfer_info)
{
tranfer_info->cancelled = TRUE;
return FALSE;
}
static void
create_transfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
TransferInfo *transfer_info)
......@@ -323,6 +332,10 @@ create_transfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
GTK_SIGNAL_FUNC (transfer_dialog_clicked_callback),
transfer_info);
/* Capture clicking on the close box or use of the escape key */
gtk_signal_connect (GTK_OBJECT (transfer_info->progress_dialog), "close",
(GtkSignalFunc) handle_close_callback, transfer_info);
gtk_widget_show (transfer_info->progress_dialog);
/* Make the progress dialog show up over the window we are copying into */
......
......@@ -229,7 +229,6 @@ nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *di
dialog->details->total_bytes_copied = 0;
dialog->details->freeze_count = 0;
}
static void
......
......@@ -305,6 +305,15 @@ center_dialog_over_window (GtkWindow *window, GtkWindow *over)
}
static gboolean
handle_close_callback (GnomeDialog *dialog, TransferInfo *tranfer_info)
{
tranfer_info->cancelled = TRUE;
return FALSE;
}
static void
create_transfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
TransferInfo *transfer_info)
......@@ -323,6 +332,10 @@ create_transfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
GTK_SIGNAL_FUNC (transfer_dialog_clicked_callback),
transfer_info);
/* Capture clicking on the close box or use of the escape key */
gtk_signal_connect (GTK_OBJECT (transfer_info->progress_dialog), "close",
(GtkSignalFunc) handle_close_callback, transfer_info);
gtk_widget_show (transfer_info->progress_dialog);
/* Make the progress dialog show up over the window we are copying into */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment