summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-file-operations-progress.h
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-04-03 00:47:20 +0000
committerDarin Adler <darin@src.gnome.org>2001-04-03 00:47:20 +0000
commit58b097eca0e8a3109ef15af3f9c186f13d546240 (patch)
treef78be7efe7ce6bbadec1ad99f514dd046b4f0829 /libnautilus-private/nautilus-file-operations-progress.h
parent59362affbb81e118d56c46707f7474c9df8ca0f0 (diff)
downloadnautilus-58b097eca0e8a3109ef15af3f9c186f13d546240.tar.gz
Make file operations progress dialog always stay up for at least 1
second total so it doesn't just appear and disappear. Preparing for a fix to the nautilus-adapter process leaking when Nautilus is terminated by Ctrl-C, I cleaned up some of the code inside the adapter. Improved the warning you get when neither /etc/mnttab nor /proc/mounts can be opened. Fix bug 6888 (when I view a large image, it appears first at 100%, then zoomed to fit). Re-added part of the code to make components go away when the main program that is hosting them goes away. The X-window-based solution is not working as well as I had hoped, so I'm re-adding the 20-second-timeout-based solution. * components/adapter/nautilus-adapter-embed-strategy.c: (nautilus_adapter_embed_strategy_initialize_class), (nautilus_adapter_embed_strategy_get), (nautilus_adapter_embed_strategy_emit_open_location): Change the strategy new functions to use more-normal reference rules. The caller no longer expects them to "use up" a reference. * components/adapter/nautilus-adapter-control-embed-strategy.c: (nautilus_adapter_control_embed_strategy_destroy), (nautilus_adapter_control_embed_strategy_new): Don't keep a reference to the BonoboControl around after creating the frame. * components/adapter/nautilus-adapter-embeddable-embed-strategy.c: (nautilus_adapter_embeddable_embed_strategy_destroy), (nautilus_adapter_embeddable_embed_strategy_new): Don't keep a reference to the BonoboEmeddable around after creating the frame. * components/image-viewer/nautilus-image-view.c: (redraw_control), (scrolled_window_size_allocate_callback), (control_factory_common), (init_bonobo_image_generic_factory): Some name changes, and a fix so that we don't show the image first at 100%, and then shrink to fit. The downside is that this might be too hard-coded to the current behavior of Nautilus, but it's better than flashing every time you open an image. * components/services/trilobite/utils/.cvsignore: Ignore some files in this new directory. * libnautilus-extensions/nautilus-file-operations-progress.h: * libnautilus-extensions/nautilus-file-operations-progress.c: (nautilus_file_operations_progress_update), (close_callback), (nautilus_file_operations_progress_destroy), (map_callback), (delete_event_callback), (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), (delayed_close_callback), (nautilus_file_operations_progress_done): Did a lot of code cleanups throughout the file, and added a new call nautilus_file_operations_progress_done. Use this instead of gtk_object_destroy so that the window can linger long enough for the user to see it, if a copy was really fast. * libnautilus-extensions/nautilus-file-operations.c: (transfer_info_destroy), (parent_for_error_dialog), (create_transfer_dialog), (handle_transfer_ok), (handle_transfer_vfs_error): Change to use the new nautilus_file_operations_progress_done call instead of gtk_object_destroy when done with the progress dialog. * libnautilus-extensions/nautilus-icon-container.c: (nautilus_icon_container_update_scroll_region): Fix indentation. * libnautilus-extensions/nautilus-volume-monitor.c: (get_current_mount_list): Replace cryptic g_return_if_fail message with better-worded g_warning. * libnautilus/nautilus-view.c: (set_frame_callback), (widget_destroyed_callback), (nautilus_view_construct_from_bonobo_control): Re-added code to monitor the lifetime of the frame and self-destruct when the frame goes away. The X-window-based solution wasn't working 100%, and this solution does. * src/nautilus-sidebar.c: (toggle_sidebar_panel), (sidebar_for_each_sidebar_panel): Change object data key to use a prefix that includes the word "nautilus". Tweak code that builds the menu so that it always includes any panel that's displayed, even if the user level says it shouldn't be there.
Diffstat (limited to 'libnautilus-private/nautilus-file-operations-progress.h')
-rw-r--r--libnautilus-private/nautilus-file-operations-progress.h94
1 files changed, 39 insertions, 55 deletions
diff --git a/libnautilus-private/nautilus-file-operations-progress.h b/libnautilus-private/nautilus-file-operations-progress.h
index 6055d2f91..3ec3445d4 100644
--- a/libnautilus-private/nautilus-file-operations-progress.h
+++ b/libnautilus-private/nautilus-file-operations-progress.h
@@ -1,9 +1,10 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
/* 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.
+ Copyright (C) 2000, 2001 Eazel Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -25,73 +26,56 @@
Pavel Cisler <pavel@eazel.com>
*/
-#ifndef _NAUTILUS_FILE_OPERATIONS_PROGRESS_H
-#define _NAUTILUS_FILE_OPERATIONS_PROGRESS_H
+#ifndef NAUTILUS_FILE_OPERATIONS_PROGRESS_H
+#define NAUTILUS_FILE_OPERATIONS_PROGRESS_H
#include <libgnomeui/gnome-dialog.h>
typedef struct NautilusFileOperationsProgressDetails NautilusFileOperationsProgressDetails;
-typedef struct NautilusFileOperationsProgress NautilusFileOperationsProgress;
-struct NautilusFileOperationsProgress {
+typedef struct {
GnomeDialog dialog;
NautilusFileOperationsProgressDetails *details;
-};
+} NautilusFileOperationsProgress;
-typedef struct NautilusFileOperationsProgressClass NautilusFileOperationsProgressClass;
-struct NautilusFileOperationsProgressClass {
+typedef struct {
GnomeDialogClass parent_class;
-};
+} NautilusFileOperationsProgressClass;
#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) \
+#define NAUTILUS_IS_FILE_OPERATIONS_PROGRESS(obj) \
GTK_CHECK_TYPE (obj, nautilus_file_operations_progress_get_type ())
-
-guint nautilus_file_operations_progress_get_type (void);
-
-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 nautilus_file_operations_progress_set_progress_title (NautilusFileOperationsProgress *dialog,
- const char *progress_title);
-
-void nautilus_file_operations_progress_set_total (NautilusFileOperationsProgress *dialog,
- gulong files_total,
- gulong bytes_total);
-
-void nautilus_file_operations_progress_set_operation_string (NautilusFileOperationsProgress *dialog,
- const char *operation_string);
-
-void nautilus_file_operations_progress_clear (NautilusFileOperationsProgress *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 nautilus_file_operations_progress_update_sizes (NautilusFileOperationsProgress *dialog,
- gulong bytes_done_in_file,
- gulong bytes_done);
-
-void nautilus_file_operations_progress_freeze (NautilusFileOperationsProgress *dialog);
-
-void nautilus_file_operations_progress_thaw (NautilusFileOperationsProgress *dialog);
-
-
-#endif /* _NAUTILUS_FILE_OPERATIONS_PROGRESS_H */
-
-
-
+guint nautilus_file_operations_progress_get_type (void);
+NautilusFileOperationsProgress *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 nautilus_file_operations_progress_done (NautilusFileOperationsProgress *dialog);
+void nautilus_file_operations_progress_set_progress_title (NautilusFileOperationsProgress *dialog,
+ const char *progress_title);
+void nautilus_file_operations_progress_set_total (NautilusFileOperationsProgress *dialog,
+ gulong files_total,
+ gulong bytes_total);
+void nautilus_file_operations_progress_set_operation_string (NautilusFileOperationsProgress *dialog,
+ const char *operation_string);
+void nautilus_file_operations_progress_clear (NautilusFileOperationsProgress *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 nautilus_file_operations_progress_update_sizes (NautilusFileOperationsProgress *dialog,
+ gulong bytes_done_in_file,
+ gulong bytes_done);
+
+#endif /* NAUTILUS_FILE_OPERATIONS_PROGRESS_H */