Commit 62fdbe1f authored by Mathieu Lacage's avatar Mathieu Lacage Committed by Mathieu Lacage

add news from latest PR1 release. make dnd do real file operations from

2000-08-28  Mathieu Lacage  <mathieu@eazel.com>

	* NEWS: add news from latest PR1 release.
	* components/tree/nautilus-tree-view.c: make dnd do real file operations
	from tree view to other views. Dnd to tree view depends on the views code
	which needs to be fixed (related to bug 2353).
	* libnautilus-extensions/Makefile.am: add nautilus-fils-operations.
	* libnautilus-extensions/nautilus-file-operations-progress.c:
	(nautilus_file_operations_progress_update),
	(nautilus_file_operations_progress_close),
	(nautilus_file_operations_progress_destroy),
	(nautilus_file_operations_progress_initialize),
	(nautilus_file_operations_progress_initialize_class),
	(nautilus_file_operations_progress_new),
	(nautilus_file_operations_progress_set_total),
	(nautilus_file_operations_progress_set_operation_string),
	(nautilus_file_operations_progress_new_file),
	(nautilus_file_operations_progress_clear),
	(nautilus_file_operations_progress_update_sizes),
	(nautilus_file_operations_progress_freeze),
	(nautilus_file_operations_progress_thaw): modify API name.
	* libnautilus-extensions/nautilus-file-operations-progress.h: idem
	* libnautilus-extensions/nautilus-file-operations.c: idem
	(xfer_dialog_clicked_callback), (create_xfer_dialog),
	(progress_dialog_set_files_remaining_text),
	(progress_dialog_set_to_from_item_text), (handle_xfer_ok),
	(handle_xfer_vfs_error), (nautilus_file_operations_copy_move),
	(nautilus_file_operations_new_folder),
	(nautilus_file_operations_move_to_trash),
	(nautilus_file_operations_delete),
	(nautilus_file_operations_empty_trash):
	* libnautilus-extensions/nautilus-file-operations.h: idem.
	* src/file-manager/Makefile.am: remove dfos* from compilation.
	* src/file-manager/fm-directory-view.c:
	(bonobo_menu_empty_trash_callback),
	(fm_directory_view_create_links_for_files),
	(fm_directory_view_duplicate_selection),
	(fm_directory_view_trash_or_delete_selection),
	(fm_directory_view_new_folder),
	(fm_directory_view_move_copy_items): make it call nautilus-file-operations
	functions.
parent f1451cc1
2000-08-28 Mathieu Lacage <mathieu@eazel.com>
* NEWS: add news from latest PR1 release.
* components/tree/nautilus-tree-view.c: make dnd do real file operations
from tree view to other views. Dnd to tree view depends on the views code
which needs to be fixed (related to bug 2353).
* libnautilus-extensions/Makefile.am: add nautilus-fils-operations.
* libnautilus-extensions/nautilus-file-operations-progress.c:
(nautilus_file_operations_progress_update),
(nautilus_file_operations_progress_close),
(nautilus_file_operations_progress_destroy),
(nautilus_file_operations_progress_initialize),
(nautilus_file_operations_progress_initialize_class),
(nautilus_file_operations_progress_new),
(nautilus_file_operations_progress_set_total),
(nautilus_file_operations_progress_set_operation_string),
(nautilus_file_operations_progress_new_file),
(nautilus_file_operations_progress_clear),
(nautilus_file_operations_progress_update_sizes),
(nautilus_file_operations_progress_freeze),
(nautilus_file_operations_progress_thaw): modify API name.
* libnautilus-extensions/nautilus-file-operations-progress.h: idem
* libnautilus-extensions/nautilus-file-operations.c: idem
(xfer_dialog_clicked_callback), (create_xfer_dialog),
(progress_dialog_set_files_remaining_text),
(progress_dialog_set_to_from_item_text), (handle_xfer_ok),
(handle_xfer_vfs_error), (nautilus_file_operations_copy_move),
(nautilus_file_operations_new_folder),
(nautilus_file_operations_move_to_trash),
(nautilus_file_operations_delete),
(nautilus_file_operations_empty_trash):
* libnautilus-extensions/nautilus-file-operations.h: idem.
* src/file-manager/Makefile.am: remove dfos* from compilation.
* src/file-manager/fm-directory-view.c:
(bonobo_menu_empty_trash_callback),
(fm_directory_view_create_links_for_files),
(fm_directory_view_duplicate_selection),
(fm_directory_view_trash_or_delete_selection),
(fm_directory_view_new_folder),
(fm_directory_view_move_copy_items): make it call nautilus-file-operations
functions.
2000-08-28 Robey Pointer <robey@eazel.com>
* components/services/install/nautilus-view/nautilus-service-instal
......
-----------------------------------
- 0.1 -- PR1
-----------------------------------
Hi everybody.
The first preview source code release of Nautilus is here. Nautilus is a
graphical shell and file manager for GNOME. This preview release is a
snapshot of Nautilus development.
Nautilus is not yet ready for daily use. Intrepid hackers may want to get
and build this preview to get an idea of what Nautilus will be like.
You can get the Nautilus 0.1 tarball here:
<ftp://ftp.gnome.org/pub/GNOME/unstable/sources/nautilus>
(mirrored at <http://download.eazel.com/source>)
A number of other packages are needed too, including the
latest releases of libghttp, oaf, gconf, gnome-vfs, bonobo,
gtkhtml, and medusa. The README file inside the tarball
contains a complete list.
The Nautilus web site at <http://nautilus.eazel.com> contains
pointers to our mailing list, screen shots, and other information.
Thanks to the many people who have sent in suggestions and fixes and
contributed to Nautilus so far. Here's a partial list:
Ali Abdin
Anders Carlsson
Andreas Hyden
Andy Hertzfeld
Arlo Rose
Benedikt Roth
Chris Blizzard
Chris Lahey
Cody Russell
Elliot Lee
Eskil Heyn Olsen
Ettore Perazzoli
Fatih Demir
Gene Z. Ragan
George Lebl
Havoc Pennington
Ian McKellar
J Shane Culpepper
Jean-Michel Ardantz
Jesus Bravo Alvarez
Joe Shaw
John Sullivan
Jonathan Blandford
Josh Barrow
JP Rosevear
Kjartan Maraas
Maciej Stachowiak
Martin Baulig
Mathieu Lacage
Michael Meeks
Mike Engber
Mike Fleming
Morten Welinder
Nat Friedman
Pablo Saratxaga
Pavel Cisler
Ramiro Estrugo
Raph Levien
Rebecca Schulman
Robey Pointer
Robin Slomkowski
Seth Nickell
Shane Culpepper
Valek Filippov
Yukihiro Nakai
Thanks on behalf of the whole Nautilus team for checking out our preview.
-- Darin
......@@ -51,6 +51,7 @@
#include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-queue.h>
#include <libnautilus-extensions/nautilus-drag.h>
#include <libnautilus-extensions/nautilus-file-operations.h>
#include <libgnomevfs/gnome-vfs.h>
......@@ -226,12 +227,10 @@ static int nautilus_tree_view_motion_notify (GtkWidget *w
static char *nautilus_tree_view_item_at (NautilusTreeView *tree_view,
int x,
int y);
#if 0
static void nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view,
GList *selection_list,
GdkDragContext *context,
const char *target_uri);
#endif
static char *nautilus_tree_view_find_drop_target (NautilusTreeView *tree_view,
GList *selection_list,
GdkDragContext *context,
......@@ -1521,10 +1520,8 @@ static void nautilus_tree_view_drag_data_received (GtkWidget *widget,
action_string, drop_target_uri);
}
#endif /* DNDDEBUG */
#if !DND_DEBUG
nautilus_tree_view_move_copy_files (tree_view, selection_list,
context, drop_target_uri);
#endif /* !DNDDEBUG */
}
g_free (drop_target_uri);
}
......@@ -1743,8 +1740,7 @@ nautilus_tree_view_motion_notify (GtkWidget *widget, GdkEventButton *event)
helper functions
-----------------------------------------------------------------------
*/
#if 0
/* probably will disapear soon */
static void
nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view,
GList *selection_list,
......@@ -1761,16 +1757,15 @@ nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view,
source_uris = g_list_reverse (source_uris);
/* start the copy */
gtk_signal_emit_by_name (GTK_OBJECT (tree_view),
"move_copy_items",
source_uris,
NULL,
target_uri,
context->action,
0, 0);
nautilus_file_operations_copy_move (source_uris,
NULL,
target_uri,
context->action,
GTK_WIDGET (tree_view->details->tree));
g_list_free (source_uris);
}
#endif
static char *
......
......@@ -4,6 +4,7 @@ lib_LTLIBRARIES=libnautilus-extensions.la
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/src/file-manager \
-I$(top_builddir) \
-I$(top_builddir)/libnautilus \
-I$(top_srcdir)/cut-n-paste-code \
......@@ -21,11 +22,11 @@ INCLUDES = \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
$(NULL)
dependency_static_libs =\
$(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la \
$(top_builddir)/cut-n-paste-code/widgets/nautilus-druid/libnautilus-druid.la \
$(top_builddir)/librsvg/librsvg.la \
$(top_builddir)/cut-n-paste-code/freetype/libfreetype2.la \
dependency_static_libs = \
$(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la \
$(top_builddir)/cut-n-paste-code/widgets/nautilus-druid/libnautilus-druid.la \
$(top_builddir)/librsvg/librsvg.la \
$(top_builddir)/cut-n-paste-code/freetype/libfreetype2.la \
$(NULL)
libnautilus_extensions_la_LDFLAGS= \
......@@ -43,6 +44,8 @@ libnautilus_extensions_la_LDFLAGS= \
$(NULL)
libnautilus_extensions_la_SOURCES = \
nautilus-file-operations-progress.c \
nautilus-file-operations.c \
bonobo-stream-vfs.c \
nautilus-background-canvas-group.c \
nautilus-background.c \
......@@ -125,6 +128,8 @@ libnautilus_extensions_la_SOURCES = \
# Everything is private for now
noinst_HEADERS = \
nautilus-file-operations.h \
nautilus-file-operations-progress.h \
bonobo-stream-vfs.h \
nautilus-background-canvas-group.h \
nautilus-background.h \
......@@ -215,4 +220,5 @@ noinst_HEADERS = \
nautilus-xml-extensions.h \
$(NULL)
$(lib_LTLIBRARIES): $(dependency_static_libs)
......@@ -28,7 +28,7 @@
#include <config.h>
#include <gnome.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include "dfos-xfer-progress-dialog.h"
#include "nautilus-file-operations-progress.h"
#include "libnautilus-extensions/nautilus-gtk-extensions.h"
#include "libnautilus-extensions/nautilus-gtk-macros.h"
......@@ -37,12 +37,12 @@
#define OPERATION_LABEL_WIDTH 65
#define PATH_TRIM_WIDTH LABEL_BOX_WIDTH - OPERATION_LABEL_WIDTH - 2 * 20
static void dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass);
static void dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog);
static void nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass);
static void nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *dialog);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (DFOSXferProgressDialog, dfos_xfer_progress_dialog, GNOME_TYPE_DIALOG);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusFileOperationsProgress, nautilus_file_operations_progress, GNOME_TYPE_DIALOG);
struct DFOSXferProgressDialogDetails {
struct NautilusFileOperationsProgressDetails {
GtkWidget *progress_title_label;
GtkWidget *progress_count_label;
......@@ -73,7 +73,7 @@ struct DFOSXferProgressDialogDetails {
/* Private functions. */
static void
dfos_xfer_progress_dialog_update (DFOSXferProgressDialog *dialog)
nautilus_file_operations_progress_update (NautilusFileOperationsProgress *dialog)
{
gtk_progress_configure (GTK_PROGRESS (dialog->details->progress_bar),
dialog->details->total_bytes_copied,
......@@ -134,22 +134,22 @@ set_text_unescaped_trimmed (GtkLabel *label, const char *text, guint max_width)
/* This is just to make sure the dialog is not closed without explicit
intervention. */
static gboolean
dfos_xfer_progress_dialog_close (GnomeDialog *dialog)
nautilus_file_operations_progress_close (GnomeDialog *dialog)
{
DFOSXferProgressDialog *progress_dialog;
NautilusFileOperationsProgress *progress_dialog;
progress_dialog = DFOS_XFER_PROGRESS_DIALOG (dialog);
progress_dialog = NAUTILUS_FILE_OPERATIONS_PROGRESS (dialog);
return FALSE;
}
/* GtkObject methods. */
static void
dfos_xfer_progress_dialog_destroy (GtkObject *object)
nautilus_file_operations_progress_destroy (GtkObject *object)
{
DFOSXferProgressDialog *dialog;
NautilusFileOperationsProgress *dialog;
dialog = DFOS_XFER_PROGRESS_DIALOG (object);
dialog = NAUTILUS_FILE_OPERATIONS_PROGRESS (object);
g_free (dialog->details);
}
......@@ -185,13 +185,13 @@ create_titled_label (GtkBox *vbox, GtkWidget **title_widget, GtkWidget **label_t
}
static void
dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog)
nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *dialog)
{
GnomeDialog *gnome_dialog;
GtkBox *vbox;
GtkWidget *hbox;
dialog->details = g_new0 (DFOSXferProgressDialogDetails, 1);
dialog->details = g_new0 (NautilusFileOperationsProgressDetails, 1);
gnome_dialog = GNOME_DIALOG (dialog);
......@@ -251,7 +251,7 @@ dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog)
}
static void
dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass)
nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass)
{
GtkObjectClass *object_class;
GnomeDialogClass *dialog_class;
......@@ -259,26 +259,26 @@ dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass)
object_class = GTK_OBJECT_CLASS (klass);
dialog_class = GNOME_DIALOG_CLASS (klass);
object_class->destroy = dfos_xfer_progress_dialog_destroy;
dialog_class->close = dfos_xfer_progress_dialog_close;
object_class->destroy = nautilus_file_operations_progress_destroy;
dialog_class->close = nautilus_file_operations_progress_close;
}
GtkWidget *
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)
nautilus_file_operations_progress_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong total_files,
gulong total_bytes)
{
GtkWidget *widget;
DFOSXferProgressDialog *dialog;
NautilusFileOperationsProgress *dialog;
widget = gtk_type_new (dfos_xfer_progress_dialog_get_type ());
dialog = DFOS_XFER_PROGRESS_DIALOG (widget);
widget = gtk_type_new (nautilus_file_operations_progress_get_type ());
dialog = NAUTILUS_FILE_OPERATIONS_PROGRESS (widget);
dfos_xfer_progress_dialog_set_operation_string (dialog, operation_string);
dfos_xfer_progress_dialog_set_total (dialog, total_files, total_bytes);
nautilus_file_operations_progress_set_operation_string (dialog, operation_string);
nautilus_file_operations_progress_set_total (dialog, total_files, total_bytes);
gtk_window_set_title (GTK_WINDOW (widget), title);
......@@ -291,42 +291,42 @@ dfos_xfer_progress_dialog_new (const char *title,
}
void
dfos_xfer_progress_dialog_set_total (DFOSXferProgressDialog *dialog,
gulong files_total,
gulong bytes_total)
nautilus_file_operations_progress_set_total (NautilusFileOperationsProgress *dialog,
gulong files_total,
gulong bytes_total)
{
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (IS_NAUTILUS_FILE_OPERATIONS_PROGRESS (dialog));
dialog->details->files_total = files_total;
dialog->details->bytes_total = bytes_total;
dfos_xfer_progress_dialog_update (dialog);
nautilus_file_operations_progress_update (dialog);
}
void
dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog,
const char *operation_string)
nautilus_file_operations_progress_set_operation_string (NautilusFileOperationsProgress *dialog,
const char *operation_string)
{
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (IS_NAUTILUS_FILE_OPERATIONS_PROGRESS (dialog));
gtk_label_set_text (GTK_LABEL (dialog->details->progress_title_label),
operation_string);
}
void
dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
const char *progress_verb,
const char *item_name,
const char *from_path,
const char *to_path,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size)
nautilus_file_operations_progress_new_file (NautilusFileOperationsProgress *dialog,
const char *progress_verb,
const char *item_name,
const char *from_path,
const char *to_path,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size)
{
char *progress_count;
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (IS_NAUTILUS_FILE_OPERATIONS_PROGRESS (dialog));
g_return_if_fail (GTK_WIDGET_REALIZED (dialog));
dialog->details->file_index = file_index;
......@@ -356,11 +356,11 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
to_path, PATH_TRIM_WIDTH);
}
dfos_xfer_progress_dialog_update (dialog);
nautilus_file_operations_progress_update (dialog);
}
void
dfos_xfer_progress_dialog_clear (DFOSXferProgressDialog *dialog)
nautilus_file_operations_progress_clear (NautilusFileOperationsProgress *dialog)
{
gtk_label_set_text (GTK_LABEL (dialog->details->from_label), "");
gtk_label_set_text (GTK_LABEL (dialog->details->from_path_label), "");
......@@ -370,30 +370,30 @@ dfos_xfer_progress_dialog_clear (DFOSXferProgressDialog *dialog)
dialog->details->files_total = 0;
dialog->details->bytes_total = 0;
dfos_xfer_progress_dialog_update (dialog);
nautilus_file_operations_progress_update (dialog);
}
void
dfos_xfer_progress_dialog_update_sizes (DFOSXferProgressDialog *dialog,
gulong bytes_done_in_file,
gulong bytes_done)
nautilus_file_operations_progress_update_sizes (NautilusFileOperationsProgress *dialog,
gulong bytes_done_in_file,
gulong bytes_done)
{
g_return_if_fail (IS_DFOS_XFER_PROGRESS_DIALOG (dialog));
g_return_if_fail (IS_NAUTILUS_FILE_OPERATIONS_PROGRESS (dialog));
dialog->details->bytes_copied = bytes_done_in_file;
dialog->details->total_bytes_copied = bytes_done;
dfos_xfer_progress_dialog_update (dialog);
nautilus_file_operations_progress_update (dialog);
}
void
dfos_xfer_progress_dialog_freeze (DFOSXferProgressDialog *dialog)
nautilus_file_operations_progress_freeze (NautilusFileOperationsProgress *dialog)
{
dialog->details->freeze_count++;
}
void
dfos_xfer_progress_dialog_thaw (DFOSXferProgressDialog *dialog)
nautilus_file_operations_progress_thaw (NautilusFileOperationsProgress *dialog)
{
if (dialog->details->freeze_count > 0)
dialog->details->freeze_count--;
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* xfer-progress-dialog.h - Progress dialog for transfer operations in the
GNOME Desktop File Operation Service.
/* nautilus-file-operations-progress.h - Progress dialog for transfer
operations in the GNOME Desktop File Operation Service.
Copyright (C) 1999, 2000 Free Software Foundation
Copyright (C) 2000 Eazel Inc.
......@@ -25,79 +25,73 @@
Pavel Cisler <pavel@eazel.com>
*/
#ifndef _DFOS_XFER_PROGRESS_DIALOG_H
#define _DFOS_XFER_PROGRESS_DIALOG_H
#ifndef _NAUTILUS_FILE_OPERATIONS_PROGRESS_H
#define _NAUTILUS_FILE_OPERATIONS_PROGRESS_H
#include <libgnomeui/gnome-dialog.h>
typedef struct DFOSXferProgressDialog DFOSXferProgressDialog;
typedef struct DFOSXferProgressDialogClass DFOSXferProgressDialogClass;
typedef struct NautilusFileOperationsProgressDetails NautilusFileOperationsProgressDetails;
#define DFOS_XFER_PROGRESS_DIALOG(obj) \
GTK_CHECK_CAST (obj, dfos_xfer_progress_dialog_get_type (), DFOSXferProgressDialog)
#define DFOS_XFER_PROGRESS_DIALOG_CLASS(klass) \
GTK_CHECK_CLASS_CAST (klass, dfos_xfer_progress_dialog_get_type (), DFOSXferProgressDialogClass)
#define IS_DFOS_XFER_PROGRESS_DIALOG(obj) \
GTK_CHECK_TYPE (obj, dfos_xfer_progress_dialog_get_type ())
typedef struct NautilusFileOperationsProgress NautilusFileOperationsProgress;
struct NautilusFileOperationsProgress {
GnomeDialog dialog;
NautilusFileOperationsProgressDetails *details;
};
typedef struct NautilusFileOperationsProgressClass NautilusFileOperationsProgressClass;
struct NautilusFileOperationsProgressClass {
GnomeDialogClass parent_class;
};
guint dfos_xfer_progress_dialog_get_type
(void);
#define NAUTILUS_FILE_OPERATIONS_PROGRESS(obj) \
GTK_CHECK_CAST (obj, nautilus_file_operations_progress_get_type (), NautilusFileOperationsProgress)
#define NAUTILUS_FILE_OPERATIONS_PROGRESS_CLASS(klass) \
GTK_CHECK_CLASS_CAST (klass, nautilus_file_operations_progress_get_type (), NautilusFileOperationsProgressClass)
#define IS_NAUTILUS_FILE_OPERATIONS_PROGRESS(obj) \
GTK_CHECK_TYPE (obj, nautilus_file_operations_progress_get_type ())
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);
void dfos_xfer_progres_dialog_set_progress_title
(DFOSXferProgressDialog *dialog,
const char *progress_title);
guint nautilus_file_operations_progress_get_type (void);
void dfos_xfer_progress_dialog_set_total
(DFOSXferProgressDialog *dialog,
gulong files_total,
gulong bytes_total);
GtkWidget *nautilus_file_operations_progress_new (const char *title,
const char *operation_string,
const char *from_prefix,
const char *to_prefix,
gulong files_total,
gulong bytes_total);
void dfos_xfer_progress_dialog_set_operation_string
(DFOSXferProgressDialog *dialog,
const char *operation_string);
void nautilus_file_operations_progress_set_progress_title (NautilusFileOperationsProgress *dialog,
const char *progress_title);
void dfos_xfer_progress_dialog_clear
(DFOSXferProgressDialog *dialog);
void nautilus_file_operations_progress_set_total (NautilusFileOperationsProgress *dialog,
gulong files_total,
gulong bytes_total);
void dfos_xfer_progress_dialog_new_file
(DFOSXferProgressDialog *dialog,
const char *progress_verb,
const char *item_name,
const char *from_path,
const char *to_path,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size);
void nautilus_file_operations_progress_set_operation_string (NautilusFileOperationsProgress *dialog,
const char *operation_string);
void dfos_xfer_progress_dialog_update_sizes
(DFOSXferProgressDialog *dialog,
gulong bytes_done_in_file,
gulong bytes_done);
void nautilus_file_operations_progress_clear (NautilusFileOperationsProgress *dialog);
void dfos_xfer_progress_dialog_freeze
(DFOSXferProgressDialog *dialog);
void nautilus_file_operations_progress_new_file (NautilusFileOperationsProgress *dialog,
const char *progress_verb,
const char *item_name,
const char *from_path,
const char *to_path,
const char *from_prefix,
const char *to_prefix,
gulong file_index,
gulong size);
void dfos_xfer_progress_dialog_thaw (DFOSXferProgressDialog *dialog);
void nautilus_file_operations_progress_update_sizes (NautilusFileOperationsProgress *dialog,
gulong bytes_done_in_file,
gulong bytes_done);
void nautilus_file_operations_progress_freeze (NautilusFileOperationsProgress *dialog);
typedef struct DFOSXferProgressDialogDetails DFOSXferProgressDialogDetails;
void nautilus_file_operations_progress_thaw (NautilusFileOperationsProgress *dialog);
#endif /* _NAUTILUS_FILE_OPERATIONS_PROGRESS_H */
struct DFOSXferProgressDialog {
GnomeDialog dialog;
DFOSXferProgressDialogDetails *details;
};
struct DFOSXferProgressDialogClass {
GnomeDialogClass parent_class;
};
#endif /* _DFOS_XFER_PROGRESS_DIALOG_H */
......@@ -29,7 +29,8 @@
#include <libgnomevfs/gnome-vfs-find-directory.h>
#include <libgnomevfs/gnome-vfs-uri.h>
#include "dfos-xfer.h"
#include "nautilus-file-operations.h"
#include "nautilus-file-operations-progress.h"
#include <libnautilus-extensions/nautilus-file-changes-queue.h>
#include <libnautilus-extensions/nautilus-glib-extensions.h>
#include <libnautilus-extensions/nautilus-stock-dialogs.h>
......@@ -60,26 +61,6 @@ typedef struct XferInfo {
gboolean show_progress_dialog;
} XferInfo;
static XferInfo *
xfer_info_new (GnomeVFSAsyncHandle *handle,
GnomeVFSXferOptions options,
GnomeVFSXferErrorMode error_mode,
GnomeVFSXferOverwriteMode overwrite_mode)
{
XferInfo *info;
info = g_new (XferInfo, 1);
info->handle = handle;
info->error_mode = error_mode;
info->overwrite_mode = overwrite_mode;
info->progress_dialog = NULL;
info->parent_view = NULL;
return info;
}
char *
nautilus_convert_to_unescaped_string_for_display (char *escaped)
{
......@@ -94,7 +75,7 @@ nautilus_convert_to_unescaped_string_for_display (char *escaped)
static void
xfer_dialog_clicked_callback (DFOSXferProgressDialog *dialog,
xfer_dialog_clicked_callback (NautilusFileOperationsProgress *dialog,
int button_number,
gpointer data)
{
......@@ -115,7 +96,7 @@ create_xfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
g_return_if_fail (xfer_info->progress_dialog == NULL);
xfer_info->progress_dialog = dfos_xfer_progress_dialog_new
xfer_info->progress_dialog = nautilus_file_operations_progress_new
(xfer_info->operation_title, "", "", "", 1, 1);
gtk_signal_connect (GTK_OBJECT (xfer_info->progress_dialog),
......@@ -127,17 +108,17 @@ create_xfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
}
static void
progress_dialog_set_files_remaining_text (DFOSXferProgressDialog *dialog, const char *action_verb)
progress_dialog_set_files_remaining_text ( NautilusFileOperationsProgress *dialog, const char *action_verb)
{
char *text;
text = g_strdup_printf ("Files remaining to be %s:", action_verb);
dfos_xfer_progress_dialog_set_operation_string (dialog, text);
nautilus_file_operations_progress_set_operation_string (dialog, text);
g_free (text);
}
static void
progress_dialog_set_to_from_item_text (DFOSXferProgressDialog *dialog,
progress_dialog_set_to_from_item_text (NautilusFileOperationsProgress *dialog,
const char *progress_verb, const char *from_uri, const char *to_uri,
gulong index, gulong size)
{
......@@ -188,7 +169,7 @@ progress_dialog_set_to_from_item_text (DFOSXferProgressDialog *dialog,
to_prefix = _("To:");
}
dfos_xfer_progress_dialog_new_file (dialog,
nautilus_file_operations_progress_new_file (dialog,
progress_label_text ? progress_label_text : "",
item ? item : "",
from_path ? from_path : "",
......@@ -212,8 +193,8 @@ handle_xfer_ok (const GnomeVFSXferProgressInfo *progress_info,
case GNOME_VFS_XFER_PHASE_COLLECTING:
if (xfer_info->progress_dialog != NULL) {
dfos_xfer_progress_dialog_set_operation_string
(DFOS_XFER_PROGRESS_DIALOG
nautilus_file_operations_progress_set_operation_string
(NAUTILUS_FILE_OPERATIONS_PROGRESS
(xfer_info->progress_dialog),
xfer_info->preparation_name);
}
......@@ -222,10 +203,10 @@ handle_xfer_ok (const GnomeVFSXferProgressInfo *progress_info,
case GNOME_VFS_XFER_PHASE_READYTOGO:
if (xfer_info->progress_dialog != NULL) {
progress_dialog_set_files_remaining_text (
DFOS_XFER_PROGRESS_DIALOG (xfer_info->progress_dialog),
NAUTILUS_FILE_OPERATIONS_PROGRESS (xfer_info->progress_dialog),
xfer_info->action_verb);
dfos_xfer_progress_dialog_set_total
(DFOS_XFER_PROGRESS_DIALOG
nautilus_file_operations_progress_set_total
(NAUTILUS_FILE_OPERATIONS_PROGRESS
(xfer_info->progress_dialog),
progress_info->files_total,
progress_info->bytes_total);
......@@ -236,15 +217,15 @@ handle_xfer_ok (const GnomeVFSXferProgressInfo *progress_info,
nautilus_file_changes_consume_changes (FALSE);
if (xfer_info->progress_dialog != NULL) {
progress_dialog_set_to_from_item_text (
DFOS_XFER_PROGRESS_DIALOG (xfer_info->progress_dialog),
NAUTILUS_FILE_OPERATIONS_PROGRESS (xfer_info->progress_dialog),
xfer_info->progress_verb,
progress_info->source_name,
NULL,
progress_info->file_index,