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> 2000-08-28 Robey Pointer <robey@eazel.com>
* components/services/install/nautilus-view/nautilus-service-instal * 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 @@ ...@@ -51,6 +51,7 @@
#include <libnautilus-extensions/nautilus-icon-factory.h> #include <libnautilus-extensions/nautilus-icon-factory.h>
#include <libnautilus-extensions/nautilus-queue.h> #include <libnautilus-extensions/nautilus-queue.h>
#include <libnautilus-extensions/nautilus-drag.h> #include <libnautilus-extensions/nautilus-drag.h>
#include <libnautilus-extensions/nautilus-file-operations.h>
#include <libgnomevfs/gnome-vfs.h> #include <libgnomevfs/gnome-vfs.h>
...@@ -226,12 +227,10 @@ static int nautilus_tree_view_motion_notify (GtkWidget *w ...@@ -226,12 +227,10 @@ static int nautilus_tree_view_motion_notify (GtkWidget *w
static char *nautilus_tree_view_item_at (NautilusTreeView *tree_view, static char *nautilus_tree_view_item_at (NautilusTreeView *tree_view,
int x, int x,
int y); int y);
#if 0
static void nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view, static void nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view,
GList *selection_list, GList *selection_list,
GdkDragContext *context, GdkDragContext *context,
const char *target_uri); const char *target_uri);
#endif
static char *nautilus_tree_view_find_drop_target (NautilusTreeView *tree_view, static char *nautilus_tree_view_find_drop_target (NautilusTreeView *tree_view,
GList *selection_list, GList *selection_list,
GdkDragContext *context, GdkDragContext *context,
...@@ -1521,10 +1520,8 @@ static void nautilus_tree_view_drag_data_received (GtkWidget *widget, ...@@ -1521,10 +1520,8 @@ static void nautilus_tree_view_drag_data_received (GtkWidget *widget,
action_string, drop_target_uri); action_string, drop_target_uri);
} }
#endif /* DNDDEBUG */ #endif /* DNDDEBUG */
#if !DND_DEBUG
nautilus_tree_view_move_copy_files (tree_view, selection_list, nautilus_tree_view_move_copy_files (tree_view, selection_list,
context, drop_target_uri); context, drop_target_uri);
#endif /* !DNDDEBUG */
} }
g_free (drop_target_uri); g_free (drop_target_uri);
} }
...@@ -1743,8 +1740,7 @@ nautilus_tree_view_motion_notify (GtkWidget *widget, GdkEventButton *event) ...@@ -1743,8 +1740,7 @@ nautilus_tree_view_motion_notify (GtkWidget *widget, GdkEventButton *event)
helper functions helper functions
----------------------------------------------------------------------- -----------------------------------------------------------------------
*/ */
#if 0
/* probably will disapear soon */
static void static void
nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view, nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view,
GList *selection_list, GList *selection_list,
...@@ -1761,16 +1757,15 @@ nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view, ...@@ -1761,16 +1757,15 @@ nautilus_tree_view_move_copy_files (NautilusTreeView *tree_view,
source_uris = g_list_reverse (source_uris); source_uris = g_list_reverse (source_uris);
/* start the copy */ /* start the copy */
gtk_signal_emit_by_name (GTK_OBJECT (tree_view), nautilus_file_operations_copy_move (source_uris,
"move_copy_items", NULL,
source_uris, target_uri,
NULL, context->action,
target_uri, GTK_WIDGET (tree_view->details->tree));
context->action,
0, 0);
g_list_free (source_uris); g_list_free (source_uris);
} }
#endif
static char * static char *
......
...@@ -4,6 +4,7 @@ lib_LTLIBRARIES=libnautilus-extensions.la ...@@ -4,6 +4,7 @@ lib_LTLIBRARIES=libnautilus-extensions.la
INCLUDES = \ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_srcdir)/src/file-manager \
-I$(top_builddir) \ -I$(top_builddir) \
-I$(top_builddir)/libnautilus \ -I$(top_builddir)/libnautilus \
-I$(top_srcdir)/cut-n-paste-code \ -I$(top_srcdir)/cut-n-paste-code \
...@@ -21,11 +22,11 @@ INCLUDES = \ ...@@ -21,11 +22,11 @@ INCLUDES = \
-DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \ -DNAUTILUS_DATADIR=\""$(datadir)/nautilus"\" \
$(NULL) $(NULL)
dependency_static_libs =\ dependency_static_libs = \
$(top_builddir)/cut-n-paste-code/widgets/e-paned/libe-paned.la \ $(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)/cut-n-paste-code/widgets/nautilus-druid/libnautilus-druid.la \
$(top_builddir)/librsvg/librsvg.la \ $(top_builddir)/librsvg/librsvg.la \
$(top_builddir)/cut-n-paste-code/freetype/libfreetype2.la \ $(top_builddir)/cut-n-paste-code/freetype/libfreetype2.la \
$(NULL) $(NULL)
libnautilus_extensions_la_LDFLAGS= \ libnautilus_extensions_la_LDFLAGS= \
...@@ -43,6 +44,8 @@ libnautilus_extensions_la_LDFLAGS= \ ...@@ -43,6 +44,8 @@ libnautilus_extensions_la_LDFLAGS= \
$(NULL) $(NULL)
libnautilus_extensions_la_SOURCES = \ libnautilus_extensions_la_SOURCES = \
nautilus-file-operations-progress.c \
nautilus-file-operations.c \
bonobo-stream-vfs.c \ bonobo-stream-vfs.c \
nautilus-background-canvas-group.c \ nautilus-background-canvas-group.c \
nautilus-background.c \ nautilus-background.c \
...@@ -125,6 +128,8 @@ libnautilus_extensions_la_SOURCES = \ ...@@ -125,6 +128,8 @@ libnautilus_extensions_la_SOURCES = \
# Everything is private for now # Everything is private for now
noinst_HEADERS = \ noinst_HEADERS = \
nautilus-file-operations.h \
nautilus-file-operations-progress.h \
bonobo-stream-vfs.h \ bonobo-stream-vfs.h \
nautilus-background-canvas-group.h \ nautilus-background-canvas-group.h \
nautilus-background.h \ nautilus-background.h \
...@@ -215,4 +220,5 @@ noinst_HEADERS = \ ...@@ -215,4 +220,5 @@ noinst_HEADERS = \
nautilus-xml-extensions.h \ nautilus-xml-extensions.h \
$(NULL) $(NULL)
$(lib_LTLIBRARIES): $(dependency_static_libs) $(lib_LTLIBRARIES): $(dependency_static_libs)
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <config.h> #include <config.h>
#include <gnome.h> #include <gnome.h>
#include <libgnomevfs/gnome-vfs-utils.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-extensions.h"
#include "libnautilus-extensions/nautilus-gtk-macros.h" #include "libnautilus-extensions/nautilus-gtk-macros.h"
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
#define OPERATION_LABEL_WIDTH 65 #define OPERATION_LABEL_WIDTH 65
#define PATH_TRIM_WIDTH LABEL_BOX_WIDTH - OPERATION_LABEL_WIDTH - 2 * 20 #define PATH_TRIM_WIDTH LABEL_BOX_WIDTH - OPERATION_LABEL_WIDTH - 2 * 20
static void dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass); static void nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass);
static void dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog); 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_title_label;
GtkWidget *progress_count_label; GtkWidget *progress_count_label;
...@@ -73,7 +73,7 @@ struct DFOSXferProgressDialogDetails { ...@@ -73,7 +73,7 @@ struct DFOSXferProgressDialogDetails {
/* Private functions. */ /* Private functions. */
static void 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), gtk_progress_configure (GTK_PROGRESS (dialog->details->progress_bar),
dialog->details->total_bytes_copied, dialog->details->total_bytes_copied,
...@@ -134,22 +134,22 @@ set_text_unescaped_trimmed (GtkLabel *label, const char *text, guint max_width) ...@@ -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 /* This is just to make sure the dialog is not closed without explicit
intervention. */ intervention. */
static gboolean 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; return FALSE;
} }
/* GtkObject methods. */ /* GtkObject methods. */
static void 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); g_free (dialog->details);
} }
...@@ -185,13 +185,13 @@ create_titled_label (GtkBox *vbox, GtkWidget **title_widget, GtkWidget **label_t ...@@ -185,13 +185,13 @@ create_titled_label (GtkBox *vbox, GtkWidget **title_widget, GtkWidget **label_t
} }
static void static void
dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog) nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *dialog)
{ {
GnomeDialog *gnome_dialog; GnomeDialog *gnome_dialog;
GtkBox *vbox; GtkBox *vbox;
GtkWidget *hbox; GtkWidget *hbox;
dialog->details = g_new0 (DFOSXferProgressDialogDetails, 1); dialog->details = g_new0 (NautilusFileOperationsProgressDetails, 1);
gnome_dialog = GNOME_DIALOG (dialog); gnome_dialog = GNOME_DIALOG (dialog);
...@@ -251,7 +251,7 @@ dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog) ...@@ -251,7 +251,7 @@ dfos_xfer_progress_dialog_initialize (DFOSXferProgressDialog *dialog)
} }
static void static void
dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass) nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass)
{ {
GtkObjectClass *object_class; GtkObjectClass *object_class;
GnomeDialogClass *dialog_class; GnomeDialogClass *dialog_class;
...@@ -259,26 +259,26 @@ dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass) ...@@ -259,26 +259,26 @@ dfos_xfer_progress_dialog_initialize_class (DFOSXferProgressDialogClass *klass)
object_class = GTK_OBJECT_CLASS (klass); object_class = GTK_OBJECT_CLASS (klass);
dialog_class = GNOME_DIALOG_CLASS (klass); dialog_class = GNOME_DIALOG_CLASS (klass);
object_class->destroy = dfos_xfer_progress_dialog_destroy; object_class->destroy = nautilus_file_operations_progress_destroy;
dialog_class->close = dfos_xfer_progress_dialog_close; dialog_class->close = nautilus_file_operations_progress_close;
} }
GtkWidget * GtkWidget *
dfos_xfer_progress_dialog_new (const char *title, nautilus_file_operations_progress_new (const char *title,
const char *operation_string, const char *operation_string,
const char *from_prefix, const char *from_prefix,
const char *to_prefix, const char *to_prefix,
gulong total_files, gulong total_files,
gulong total_bytes) gulong total_bytes)
{ {
GtkWidget *widget; GtkWidget *widget;
DFOSXferProgressDialog *dialog; NautilusFileOperationsProgress *dialog;
widget = gtk_type_new (dfos_xfer_progress_dialog_get_type ()); widget = gtk_type_new (nautilus_file_operations_progress_get_type ());
dialog = DFOS_XFER_PROGRESS_DIALOG (widget); dialog = NAUTILUS_FILE_OPERATIONS_PROGRESS (widget);
dfos_xfer_progress_dialog_set_operation_string (dialog, operation_string); nautilus_file_operations_progress_set_operation_string (dialog, operation_string);
dfos_xfer_progress_dialog_set_total (dialog, total_files, total_bytes); nautilus_file_operations_progress_set_total (dialog, total_files, total_bytes);
gtk_window_set_title (GTK_WINDOW (widget), title); gtk_window_set_title (GTK_WINDOW (widget), title);
...@@ -291,42 +291,42 @@ dfos_xfer_progress_dialog_new (const char *title, ...@@ -291,42 +291,42 @@ dfos_xfer_progress_dialog_new (const char *title,
} }
void void
dfos_xfer_progress_dialog_set_total (DFOSXferProgressDialog *dialog, nautilus_file_operations_progress_set_total (NautilusFileOperationsProgress *dialog,
gulong files_total, gulong files_total,
gulong bytes_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->files_total = files_total;
dialog->details->bytes_total = bytes_total; dialog->details->bytes_total = bytes_total;
dfos_xfer_progress_dialog_update (dialog); nautilus_file_operations_progress_update (dialog);
} }
void void
dfos_xfer_progress_dialog_set_operation_string (DFOSXferProgressDialog *dialog, nautilus_file_operations_progress_set_operation_string (NautilusFileOperationsProgress *dialog,
const char *operation_string) 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), gtk_label_set_text (GTK_LABEL (dialog->details->progress_title_label),
operation_string); operation_string);
} }
void void
dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog, nautilus_file_operations_progress_new_file (NautilusFileOperationsProgress *dialog,
const char *progress_verb, const char *progress_verb,
const char *item_name, const char *item_name,
const char *from_path, const char *from_path,
const char *to_path, const char *to_path,
const char *from_prefix, const char *from_prefix,
const char *to_prefix, const char *to_prefix,
gulong file_index, gulong file_index,
gulong size) gulong size)
{ {
char *progress_count; 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)); g_return_if_fail (GTK_WIDGET_REALIZED (dialog));
dialog->details->file_index = file_index; dialog->details->file_index = file_index;
...@@ -356,11 +356,11 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog, ...@@ -356,11 +356,11 @@ dfos_xfer_progress_dialog_new_file (DFOSXferProgressDialog *dialog,
to_path, PATH_TRIM_WIDTH); to_path, PATH_TRIM_WIDTH);
} }
dfos_xfer_progress_dialog_update (dialog); nautilus_file_operations_progress_update (dialog);
} }
void 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_label), "");
gtk_label_set_text (GTK_LABEL (dialog->details->from_path_label), ""); gtk_label_set_text (GTK_LABEL (dialog->details->from_path_label), "");
...@@ -370,30 +370,30 @@ dfos_xfer_progress_dialog_clear (DFOSXferProgressDialog *dialog) ...@@ -370,30 +370,30 @@ dfos_xfer_progress_dialog_clear (DFOSXferProgressDialog *dialog)
dialog->details->files_total = 0; dialog->details->files_total = 0;
dialog->details->bytes_total = 0; dialog->details->bytes_total = 0;
dfos_xfer_progress_dialog_update (dialog); nautilus_file_operations_progress_update (dialog);
} }
void void
dfos_xfer_progress_dialog_update_sizes (DFOSXferProgressDialog *dialog, nautilus_file_operations_progress_update_sizes (NautilusFileOperationsProgress *dialog,
gulong bytes_done_in_file, gulong bytes_done_in_file,
gulong bytes_done) 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->bytes_copied = bytes_done_in_file;
dialog->details->total_bytes_copied = bytes_done; dialog->details->total_bytes_copied = bytes_done;
dfos_xfer_progress_dialog_update (dialog); nautilus_file_operations_progress_update (dialog);
} }
void void
dfos_xfer_progress_dialog_freeze (DFOSXferProgressDialog *dialog) nautilus_file_operations_progress_freeze (NautilusFileOperationsProgress *dialog)
{ {
dialog->details->freeze_count++; dialog->details->freeze_count++;
} }
void void
dfos_xfer_progress_dialog_thaw (DFOSXferProgressDialog *dialog) nautilus_file_operations_progress_thaw (NautilusFileOperationsProgress *dialog)
{ {
if (dialog->details->freeze_count > 0) if (dialog->details->freeze_count > 0)
dialog->details->freeze_count--; dialog->details->freeze_count--;
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* xfer-progress-dialog.h - Progress dialog for transfer operations in the /* nautilus-file-operations-progress.h - Progress dialog for transfer
GNOME Desktop File Operation Service. operations in the GNOME Desktop File Operation Service.
Copyright (C) 1999, 2000 Free Software Foundation Copyright (C) 1999, 2000 Free Software Foundation
Copyright (C) 2000 Eazel Inc. Copyright (C) 2000 Eazel Inc.
...@@ -25,79 +25,73 @@ ...@@ -25,79 +25,73 @@
Pavel Cisler <pavel@eazel.com> Pavel Cisler <pavel@eazel.com>
*/ */
#ifndef _DFOS_XFER_PROGRESS_DIALOG_H #ifndef _NAUTILUS_FILE_OPERATIONS_PROGRESS_H
#define _DFOS_XFER_PROGRESS_DIALOG_H #define _NAUTILUS_FILE_OPERATIONS_PROGRESS_H
#include <libgnomeui/gnome-dialog.h> #include <libgnomeui/gnome-dialog.h>
typedef struct DFOSXferProgressDialog DFOSXferProgressDialog; typedef struct NautilusFileOperationsProgressDetails NautilusFileOperationsProgressDetails;
typedef struct DFOSXferProgressDialogClass DFOSXferProgressDialogClass;
#define DFOS_XFER_PROGRESS_DIALOG(obj) \ typedef struct NautilusFileOperationsProgress NautilusFileOperationsProgress;
GTK_CHECK_CAST (obj, dfos_xfer_progress_dialog_get_type (), DFOSXferProgressDialog) struct NautilusFileOperationsProgress {
#define DFOS_XFER_PROGRESS_DIALOG_CLASS(klass) \ GnomeDialog dialog;
GTK_CHECK_CLASS_CAST (klass, dfos_xfer_progress_dialog_get_type (), DFOSXferProgressDialogClass) NautilusFileOperationsProgressDetails *details;
#define IS_DFOS_XFER_PROGRESS_DIALOG(obj) \ };
GTK_CHECK_TYPE (obj, dfos_xfer_progress_dialog_get_type ())
typedef struct NautilusFileOperationsProgressClass NautilusFileOperationsProgressClass;
struct NautilusFileOperationsProgressClass {
GnomeDialogClass parent_class;
};
guint dfos_xfer_progress_dialog_get_type #define NAUTILUS_FILE_OPERATIONS_PROGRESS(obj) \
(void); 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 guint nautilus_file_operations_progress_get_type (void);
(DFOSXferProgressDialog *dialog,
const char *progress_title);
void dfos_xfer_progress_dialog_set_total GtkWidget *nautilus_file_operations_progress_new (const char *title,
(DFOSXferProgressDialog *dialog, const char *operation_string,
gulong files_total, const char *from_prefix,
gulong bytes_total); const char *to_prefix,
gulong files_total,
gulong bytes_total);
void dfos_xfer_progress_dialog_set_operation_string void nautilus_file_operations_progress_set_progress_title (NautilusFileOperationsProgress *dialog,
(DFOSXferProgressDialog *dialog, const char *progress_title);
const char *operation_string);
void dfos_xfer_progress_dialog_clear void nautilus_file_operations_progress_set_total (NautilusFileOperationsProgress *dialog,
(DFOSXferProgressDialog *dialog); gulong files_total,
gulong bytes_total);
void dfos_xfer_progress_dialog_new_file void nautilus_file_operations_progress_set_operation_string (NautilusFileOperationsProgress *dialog,
(DFOSXferProgressDialog *dialog, const char *operation_string);
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_update_sizes void nautilus_file_operations_progress_clear (NautilusFileOperationsProgress *dialog);
(DFOSXferProgressDialog *dialog,
gulong bytes_done_in_file,
gulong bytes_done);
void dfos_xfer_progress_dialog_freeze void nautilus_file_operations_progress_new_file (NautilusFileOperationsProgress *dialog,
(DFOSXferProgressDialog *dialog); const char *progress_verb,
const char *item_name,