Commit 83ce94c5 authored by Pavel Cisler's avatar Pavel Cisler Committed by Pavel Cisler

Temporary workaround for an apparent codegen bug Carbamide was running

2000-04-29  Pavel Cisler  <pavel@eazel.com>

	* libnautilus-extensions/nautilus-file-changes-queue.c:
	(nautilus_file_changes_consume_changes):
	Temporary workaround for an apparent codegen bug Carbamide
	was running into. (I'll need to track this down some more,
	this change makes the crash go away.)

	* src/file-manager/dfos-xfer-progress-dialog.c:
	* src/file-manager/dfos-xfer-progress-dialog.h:
	* src/file-manager/dfos-xfer.c:
	(dfos_xfer_progress_dialog_get_type),
	(dfos_xfer_progress_dialog_new),
	(dfos_xfer_progress_dialog_new_file),
	(create_xfer_dialog),
	(fs_xfer), (handle_xfer_ok):
	Fix up the progress dialog so that it displays meaningfull
	information while emptying the trash and moving files to
	trash.
parent 2dcf15c7
2000-04-29 Pavel Cisler <pavel@eazel.com>
* libnautilus-extensions/nautilus-file-changes-queue.c:
(nautilus_file_changes_consume_changes):
Temporary workaround for an apparent codegen bug Carbamide
was running into. (I'll need to track this down some more,
this change makes the crash go away.)
* src/file-manager/dfos-xfer-progress-dialog.c:
* src/file-manager/dfos-xfer-progress-dialog.h:
* src/file-manager/dfos-xfer.c:
(dfos_xfer_progress_dialog_get_type),
(dfos_xfer_progress_dialog_new),
(dfos_xfer_progress_dialog_new_file),
(create_xfer_dialog),
(fs_xfer), (handle_xfer_ok):
Fix up the progress dialog so that it displays meaningfull
information while emptying the trash and moving files to
trash.
2000-04-29 Ramiro Estrugo <ramiro@eazel.com>
* src/nautilus-gconf.c,
......
......@@ -266,9 +266,8 @@ nautilus_file_changes_consume_changes (gboolean consume_all)
if (change == NULL) {
/* we are done */
break;
return;
}
kind = change->kind;
......@@ -293,8 +292,8 @@ nautilus_file_changes_consume_changes (gboolean consume_all)
g_assert_not_reached ();
break;
}
change->from_uri = NULL;
change->to_uri = NULL;
}
}
......@@ -45,14 +45,14 @@ update (DFOSXferProgressDialog *dialog)
/* This code by Jonathan Blandford (jrb@redhat.com) was shamelessly ripped from
`gnome/gdialog.c' in Midnight Commander with minor changes. */
static gchar *
trim_string (const gchar *string,
static char *
trim_string (const char *string,
GdkFont *font,
guint length,
guint cur_length)
{
static guint dotdotdot = 0;
gchar *string_copy = NULL;
char *string_copy = NULL;
gint len;
if (!dotdotdot)
......@@ -80,13 +80,13 @@ trim_string (const gchar *string,
static void
set_text_trimmed (GtkLabel *label,
const gchar *text,
const gchar *trimmable_text,
const char *text,
const char *trimmable_text,
guint max_width)
{
GdkFont *font;
gchar *trimmed_text;
gchar *s;
char *trimmed_text;
char *s;
guint text_width;
guint trimmable_text_width;
......@@ -242,8 +242,10 @@ dfos_xfer_progress_dialog_get_type (void)
}
GtkWidget *
dfos_xfer_progress_dialog_new (const gchar *title,
const gchar *operation_string,
dfos_xfer_progress_dialog_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong total_files,
gulong total_bytes)
{
......@@ -261,6 +263,9 @@ dfos_xfer_progress_dialog_new (const gchar *title,
gnome_dialog_append_button (GNOME_DIALOG (widget),
GNOME_STOCK_BUTTON_CANCEL);
DFOS_XFER_PROGRESS_DIALOG (widget)->from_prefix = from_prefix;
DFOS_XFER_PROGRESS_DIALOG (widget)->to_prefix = to_prefix;
return widget;
}
......@@ -279,7 +284,7 @@ dfos_xfer_progress_dialog_set_total (DFOSXferProgressDialog *dialog,
void
dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
const gchar *operation_string)
const char *operation_string)
{
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
......@@ -290,12 +295,14 @@ dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
void
dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
const gchar *source_uri,
const gchar *target_uri,
const char *source_uri,
const char *target_uri,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size)
{
gchar *s;
char *s;
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (GTK_WIDGET_REALIZED (dialog));
......@@ -304,6 +311,9 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
dialog->bytes_copied = 0;
dialog->file_size = size;
dialog->from_prefix = from_prefix;
dialog->to_prefix = to_prefix;
s = g_strdup_printf ("%s file %ld/%ld",
dialog->operation_string,
dialog->file_index, dialog->files_total);
......@@ -311,12 +321,14 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
g_free (s);
set_text_trimmed (GTK_LABEL (dialog->source_label),
_("From: "), source_uri,
dialog->from_prefix, source_uri,
DIALOG_WIDTH);
set_text_trimmed (GTK_LABEL (dialog->target_label),
_("To: "), target_uri,
DIALOG_WIDTH);
if (dialog->to_prefix != NULL && dialog->target_label != NULL)
set_text_trimmed (GTK_LABEL (dialog->target_label),
dialog->to_prefix, target_uri,
DIALOG_WIDTH);
update (dialog);
}
......
......@@ -43,7 +43,10 @@ struct _DFOSXferProgressDialog {
GtkWidget *target_label;
GtkWidget *progress_bar;
gchar *operation_string;
char *operation_string;
const char *from_prefix;
const char *to_prefix;
guint freeze_count;
......@@ -67,8 +70,10 @@ typedef struct _DFOSXferProgressDialogClass DFOSXferProgressDialogClass;
guint dfos_xfer_progress_dialog_get_type
(void);
GtkWidget *dfos_xfer_progress_dialog_new (const gchar *title,
const gchar *operation_string,
GtkWidget *dfos_xfer_progress_dialog_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong files_total,
gulong bytes_total);
......@@ -79,12 +84,14 @@ void dfos_xfer_progress_dialog_set_total
void dfos_xfer_progress_dialog_set_operation_string
(DFOSXferProgressDialog *dialog,
const gchar *operation_string);
const char *operation_string);
void dfos_xfer_progress_dialog_new_file
(DFOSXferProgressDialog *dialog,
const gchar *source_uri,
const gchar *target_uri,
const char *source_uri,
const char *target_uri,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size);
......
......@@ -33,6 +33,13 @@
#include "libnautilus-extensions/nautilus-glib-extensions.h"
#include "fm-directory-view.h"
typedef enum {
XFER_MOVE,
XFER_COPY,
XFER_MOVE_TO_TRASH,
XFER_EMPTY_TRASH
} XferKind;
typedef struct XferInfo {
GnomeVFSAsyncHandle *handle;
......@@ -42,9 +49,9 @@ typedef struct XferInfo {
GnomeVFSXferErrorMode error_mode;
GnomeVFSXferOverwriteMode overwrite_mode;
GtkWidget *parent_view;
XferKind kind;
} XferInfo;
static XferInfo *
xfer_info_new (GnomeVFSAsyncHandle *handle,
GnomeVFSXferOptions options,
......@@ -86,7 +93,8 @@ create_xfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
xfer_info->progress_dialog
= dfos_xfer_progress_dialog_new ("Transfer in progress",
"",
"",
"", "",
1,
1);
......@@ -140,6 +148,12 @@ handle_xfer_ok (const GnomeVFSXferProgressInfo *progress_info,
(xfer_info->progress_dialog),
progress_info->source_name,
progress_info->target_name,
xfer_info->kind != XFER_MOVE_TO_TRASH &&
xfer_info->kind != XFER_EMPTY_TRASH
? _("From:") : "",
xfer_info->kind != XFER_MOVE_TO_TRASH &&
xfer_info->kind != XFER_EMPTY_TRASH
? _("To:") : NULL,
progress_info->file_index,
progress_info->file_size);
} else {
......@@ -486,9 +500,11 @@ fs_xfer (const GList *item_uris,
if ((move_options & GNOME_VFS_XFER_REMOVESOURCE) != 0) {
xfer_info->operation_name = _("Moving");
xfer_info->preparation_name =_("Preparing To Move...");
xfer_info->kind = XFER_MOVE;
} else {
xfer_info->operation_name = _("Copying");
xfer_info->preparation_name =_("Preparing To Copy...");
xfer_info->kind = XFER_COPY;
}
xfer_info->error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
......@@ -550,6 +566,7 @@ fs_move_to_trash (const GList *item_uris, GtkWidget *parent_view)
xfer_info->preparation_name =_("Preparing to Move to Trash...");
xfer_info->error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
xfer_info->overwrite_mode = GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE;
xfer_info->kind = XFER_MOVE_TO_TRASH;
gnome_vfs_async_xfer (&xfer_info->handle, source_dir, item_names,
trash_dir_uri_text, NULL,
......@@ -594,9 +611,10 @@ fs_empty_trash (GtkWidget *parent_view)
xfer_info->progress_dialog = NULL;
xfer_info->operation_name = _("Emptying the Trash");
xfer_info->preparation_name =_("Preparing to Empty to Trash...");
xfer_info->preparation_name =_("Preparing to Empty the Trash...");
xfer_info->error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
xfer_info->overwrite_mode = GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE;
xfer_info->kind = XFER_EMPTY_TRASH;
trash_dir_name = gnome_vfs_uri_to_string (trash_dir_uri,
GNOME_VFS_URI_HIDE_NONE);
......
......@@ -266,9 +266,8 @@ nautilus_file_changes_consume_changes (gboolean consume_all)
if (change == NULL) {
/* we are done */
break;
return;
}
kind = change->kind;
......@@ -293,8 +292,8 @@ nautilus_file_changes_consume_changes (gboolean consume_all)
g_assert_not_reached ();
break;
}
change->from_uri = NULL;
change->to_uri = NULL;
}
}
......@@ -45,14 +45,14 @@ update (DFOSXferProgressDialog *dialog)
/* This code by Jonathan Blandford (jrb@redhat.com) was shamelessly ripped from
`gnome/gdialog.c' in Midnight Commander with minor changes. */
static gchar *
trim_string (const gchar *string,
static char *
trim_string (const char *string,
GdkFont *font,
guint length,
guint cur_length)
{
static guint dotdotdot = 0;
gchar *string_copy = NULL;
char *string_copy = NULL;
gint len;
if (!dotdotdot)
......@@ -80,13 +80,13 @@ trim_string (const gchar *string,
static void
set_text_trimmed (GtkLabel *label,
const gchar *text,
const gchar *trimmable_text,
const char *text,
const char *trimmable_text,
guint max_width)
{
GdkFont *font;
gchar *trimmed_text;
gchar *s;
char *trimmed_text;
char *s;
guint text_width;
guint trimmable_text_width;
......@@ -242,8 +242,10 @@ dfos_xfer_progress_dialog_get_type (void)
}
GtkWidget *
dfos_xfer_progress_dialog_new (const gchar *title,
const gchar *operation_string,
dfos_xfer_progress_dialog_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong total_files,
gulong total_bytes)
{
......@@ -261,6 +263,9 @@ dfos_xfer_progress_dialog_new (const gchar *title,
gnome_dialog_append_button (GNOME_DIALOG (widget),
GNOME_STOCK_BUTTON_CANCEL);
DFOS_XFER_PROGRESS_DIALOG (widget)->from_prefix = from_prefix;
DFOS_XFER_PROGRESS_DIALOG (widget)->to_prefix = to_prefix;
return widget;
}
......@@ -279,7 +284,7 @@ dfos_xfer_progress_dialog_set_total (DFOSXferProgressDialog *dialog,
void
dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
const gchar *operation_string)
const char *operation_string)
{
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
......@@ -290,12 +295,14 @@ dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
void
dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
const gchar *source_uri,
const gchar *target_uri,
const char *source_uri,
const char *target_uri,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size)
{
gchar *s;
char *s;
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (GTK_WIDGET_REALIZED (dialog));
......@@ -304,6 +311,9 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
dialog->bytes_copied = 0;
dialog->file_size = size;
dialog->from_prefix = from_prefix;
dialog->to_prefix = to_prefix;
s = g_strdup_printf ("%s file %ld/%ld",
dialog->operation_string,
dialog->file_index, dialog->files_total);
......@@ -311,12 +321,14 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
g_free (s);
set_text_trimmed (GTK_LABEL (dialog->source_label),
_("From: "), source_uri,
dialog->from_prefix, source_uri,
DIALOG_WIDTH);
set_text_trimmed (GTK_LABEL (dialog->target_label),
_("To: "), target_uri,
DIALOG_WIDTH);
if (dialog->to_prefix != NULL && dialog->target_label != NULL)
set_text_trimmed (GTK_LABEL (dialog->target_label),
dialog->to_prefix, target_uri,
DIALOG_WIDTH);
update (dialog);
}
......
......@@ -43,7 +43,10 @@ struct _DFOSXferProgressDialog {
GtkWidget *target_label;
GtkWidget *progress_bar;
gchar *operation_string;
char *operation_string;
const char *from_prefix;
const char *to_prefix;
guint freeze_count;
......@@ -67,8 +70,10 @@ typedef struct _DFOSXferProgressDialogClass DFOSXferProgressDialogClass;
guint dfos_xfer_progress_dialog_get_type
(void);
GtkWidget *dfos_xfer_progress_dialog_new (const gchar *title,
const gchar *operation_string,
GtkWidget *dfos_xfer_progress_dialog_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong files_total,
gulong bytes_total);
......@@ -79,12 +84,14 @@ void dfos_xfer_progress_dialog_set_total
void dfos_xfer_progress_dialog_set_operation_string
(DFOSXferProgressDialog *dialog,
const gchar *operation_string);
const char *operation_string);
void dfos_xfer_progress_dialog_new_file
(DFOSXferProgressDialog *dialog,
const gchar *source_uri,
const gchar *target_uri,
const char *source_uri,
const char *target_uri,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size);
......
......@@ -33,6 +33,13 @@
#include "libnautilus-extensions/nautilus-glib-extensions.h"
#include "fm-directory-view.h"
typedef enum {
XFER_MOVE,
XFER_COPY,
XFER_MOVE_TO_TRASH,
XFER_EMPTY_TRASH
} XferKind;
typedef struct XferInfo {
GnomeVFSAsyncHandle *handle;
......@@ -42,9 +49,9 @@ typedef struct XferInfo {
GnomeVFSXferErrorMode error_mode;
GnomeVFSXferOverwriteMode overwrite_mode;
GtkWidget *parent_view;
XferKind kind;
} XferInfo;
static XferInfo *
xfer_info_new (GnomeVFSAsyncHandle *handle,
GnomeVFSXferOptions options,
......@@ -86,7 +93,8 @@ create_xfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
xfer_info->progress_dialog
= dfos_xfer_progress_dialog_new ("Transfer in progress",
"",
"",
"", "",
1,
1);
......@@ -140,6 +148,12 @@ handle_xfer_ok (const GnomeVFSXferProgressInfo *progress_info,
(xfer_info->progress_dialog),
progress_info->source_name,
progress_info->target_name,
xfer_info->kind != XFER_MOVE_TO_TRASH &&
xfer_info->kind != XFER_EMPTY_TRASH
? _("From:") : "",
xfer_info->kind != XFER_MOVE_TO_TRASH &&
xfer_info->kind != XFER_EMPTY_TRASH
? _("To:") : NULL,
progress_info->file_index,
progress_info->file_size);
} else {
......@@ -486,9 +500,11 @@ fs_xfer (const GList *item_uris,
if ((move_options & GNOME_VFS_XFER_REMOVESOURCE) != 0) {
xfer_info->operation_name = _("Moving");
xfer_info->preparation_name =_("Preparing To Move...");
xfer_info->kind = XFER_MOVE;
} else {
xfer_info->operation_name = _("Copying");
xfer_info->preparation_name =_("Preparing To Copy...");
xfer_info->kind = XFER_COPY;
}
xfer_info->error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
......@@ -550,6 +566,7 @@ fs_move_to_trash (const GList *item_uris, GtkWidget *parent_view)
xfer_info->preparation_name =_("Preparing to Move to Trash...");
xfer_info->error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
xfer_info->overwrite_mode = GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE;
xfer_info->kind = XFER_MOVE_TO_TRASH;
gnome_vfs_async_xfer (&xfer_info->handle, source_dir, item_names,
trash_dir_uri_text, NULL,
......@@ -594,9 +611,10 @@ fs_empty_trash (GtkWidget *parent_view)
xfer_info->progress_dialog = NULL;
xfer_info->operation_name = _("Emptying the Trash");
xfer_info->preparation_name =_("Preparing to Empty to Trash...");
xfer_info->preparation_name =_("Preparing to Empty the Trash...");
xfer_info->error_mode = GNOME_VFS_XFER_ERROR_MODE_QUERY;
xfer_info->overwrite_mode = GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE;
xfer_info->kind = XFER_EMPTY_TRASH;
trash_dir_name = gnome_vfs_uri_to_string (trash_dir_uri,
GNOME_VFS_URI_HIDE_NONE);
......
......@@ -45,14 +45,14 @@ update (DFOSXferProgressDialog *dialog)
/* This code by Jonathan Blandford (jrb@redhat.com) was shamelessly ripped from
`gnome/gdialog.c' in Midnight Commander with minor changes. */
static gchar *
trim_string (const gchar *string,
static char *
trim_string (const char *string,
GdkFont *font,
guint length,
guint cur_length)
{
static guint dotdotdot = 0;
gchar *string_copy = NULL;
char *string_copy = NULL;
gint len;
if (!dotdotdot)
......@@ -80,13 +80,13 @@ trim_string (const gchar *string,
static void
set_text_trimmed (GtkLabel *label,
const gchar *text,
const gchar *trimmable_text,
const char *text,
const char *trimmable_text,
guint max_width)
{
GdkFont *font;
gchar *trimmed_text;
gchar *s;
char *trimmed_text;
char *s;
guint text_width;
guint trimmable_text_width;
......@@ -242,8 +242,10 @@ dfos_xfer_progress_dialog_get_type (void)
}
GtkWidget *
dfos_xfer_progress_dialog_new (const gchar *title,
const gchar *operation_string,
dfos_xfer_progress_dialog_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong total_files,
gulong total_bytes)
{
......@@ -261,6 +263,9 @@ dfos_xfer_progress_dialog_new (const gchar *title,
gnome_dialog_append_button (GNOME_DIALOG (widget),
GNOME_STOCK_BUTTON_CANCEL);
DFOS_XFER_PROGRESS_DIALOG (widget)->from_prefix = from_prefix;
DFOS_XFER_PROGRESS_DIALOG (widget)->to_prefix = to_prefix;
return widget;
}
......@@ -279,7 +284,7 @@ dfos_xfer_progress_dialog_set_total (DFOSXferProgressDialog *dialog,
void
dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
const gchar *operation_string)
const char *operation_string)
{
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
......@@ -290,12 +295,14 @@ dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
void
dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
const gchar *source_uri,
const gchar *target_uri,
const char *source_uri,
const char *target_uri,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size)
{
gchar *s;
char *s;
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (GTK_WIDGET_REALIZED (dialog));
......@@ -304,6 +311,9 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
dialog->bytes_copied = 0;
dialog->file_size = size;
dialog->from_prefix = from_prefix;
dialog->to_prefix = to_prefix;
s = g_strdup_printf ("%s file %ld/%ld",
dialog->operation_string,
dialog->file_index, dialog->files_total);
......@@ -311,12 +321,14 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
g_free (s);
set_text_trimmed (GTK_LABEL (dialog->source_label),
_("From: "), source_uri,
dialog->from_prefix, source_uri,
DIALOG_WIDTH);
set_text_trimmed (GTK_LABEL (dialog->target_label),
_("To: "), target_uri,
DIALOG_WIDTH);
if (dialog->to_prefix != NULL && dialog->target_label != NULL)
set_text_trimmed (GTK_LABEL (dialog->target_label),
dialog->to_prefix, target_uri,
DIALOG_WIDTH);
update (dialog);
}
......
......@@ -43,7 +43,10 @@ struct _DFOSXferProgressDialog {
GtkWidget *target_label;
GtkWidget *progress_bar;
gchar *operation_string;
char *operation_string;
const char *from_prefix;
const char *to_prefix;
guint freeze_count;
......@@ -67,8 +70,10 @@ typedef struct _DFOSXferProgressDialogClass DFOSXferProgressDialogClass;
guint dfos_xfer_progress_dialog_get_type
(void);
GtkWidget *dfos_xfer_progress_dialog_new (const gchar *title,
const gchar *operation_string,
GtkWidget *dfos_xfer_progress_dialog_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong files_total,
gulong bytes_total);
......@@ -79,12 +84,14 @@ void dfos_xfer_progress_dialog_set_total
void dfos_xfer_progress_dialog_set_operation_string
(DFOSXferProgressDialog *dialog,
const gchar *operation_string);
const char *operation_string);
void dfos_xfer_progress_dialog_new_file
(DFOSXferProgressDialog *dialog,
const gchar *source_uri,
const gchar *target_uri,
const char *source_uri,
const char *target_uri,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size);
......
......@@ -33,6 +33,13 @@
#include "libnautilus-extensions/nautilus-glib-extensions.h"
#include "fm-directory-view.h"
typedef enum {
XFER_MOVE,
XFER_COPY,
XFER_MOVE_TO_TRASH,
XFER_EMPTY_TRASH
} XferKind;
typedef struct XferInfo {
GnomeVFSAsyncHandle *handle;
......@@ -42,9 +49,9 @@ typedef struct XferInfo {
GnomeVFSXferErrorMode error_mode;
GnomeVFSXferOverwriteMode overwrite_mode;
GtkWidget *parent_view;
XferKind kind;
} XferInfo;
static XferInfo *
xfer_info_new (GnomeVFSAsyncHandle *handle,
GnomeVFSXferOptions options,
......@@ -86,7 +93,8 @@ create_xfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
xfer_info->progress_dialog
= dfos_xfer_progress_dialog_new ("Transfer in progress",
"",
"",
"", "",
1,
1);
......@@ -140,6 +148,12 @@ handle_xfer_ok (const GnomeVFSXferProgressInfo *progress_info,
(xfer_info->progress_dialog),
progress_info->source_name,
progress_info->target_name,
xfer_info->kind != XFER_MOVE_TO_TRASH &&
xfer_info->kind != XFER_EMPTY_TRASH
? _("From:") : "",
xfer_info->kind != XFER_MOVE_TO_TRASH &&
xfer_info->kind != XFER_EMPTY_TRASH
? _("To:") : NULL,
progress_info->file_index,
progress_info->file_size);
} else {
......@@ -486,9 +500,11 @@ fs_xfer (const GList *item_uris,
if ((move_options & GNOME_VFS_XFER_REMOVESOURCE) != 0) {
xfer_info->operation_name = _("Moving");