summaryrefslogtreecommitdiff
path: root/libnautilus-private
diff options
context:
space:
mode:
authorDarin Adler <darin@src.gnome.org>2001-04-13 21:41:23 +0000
committerDarin Adler <darin@src.gnome.org>2001-04-13 21:41:23 +0000
commitfb65f036c2d72dd71df7e70d8c1f9a9343ffbb5a (patch)
tree2861ce8bac429174a3195c592b16ac7ed8be67fb /libnautilus-private
parentb1dc1476d2e0be50d540805c5a4e3d3686f6f93a (diff)
downloadnautilus-fb65f036c2d72dd71df7e70d8c1f9a9343ffbb5a.tar.gz
Remove code that fills the progress bar to the end. The callback from
* libnautilus-extensions/nautilus-file-operations-progress.c: (nautilus_file_operations_progress_done): Remove code that fills the progress bar to the end. The callback from gnome-vfs now takes care of this (need the new gnome-vfs with bug fixes). * libnautilus-extensions/nautilus-file-operations.c: (handle_close_callback), (create_transfer_dialog): Handle the cancel button in a cleaner way. Just make it close the dialog and fall into the code already there to handle cases where the dialog is closed directly. * src/file-manager/fm-icon-view.c: (get_default_zoom_level): Fixed a strangely named variable. (fm_icon_view_begin_loading): Don't set the zoom level if the view does not support zooming (desktop view anyone?). (default_zoom_level_changed_callback): Don't set the zoom level if the view does not support zooming (desktop view anyone?). * src/nautilus-window.c: (handle_view_as_item_from_bonobo_menu): Use eel_strcmp, because the container path can be NULL in some cases.
Diffstat (limited to 'libnautilus-private')
-rw-r--r--libnautilus-private/nautilus-file-operations-progress.c10
-rw-r--r--libnautilus-private/nautilus-file-operations.c29
2 files changed, 13 insertions, 26 deletions
diff --git a/libnautilus-private/nautilus-file-operations-progress.c b/libnautilus-private/nautilus-file-operations-progress.c
index 69d31917f..a72340a5c 100644
--- a/libnautilus-private/nautilus-file-operations-progress.c
+++ b/libnautilus-private/nautilus-file-operations-progress.c
@@ -99,7 +99,8 @@ nautilus_file_operations_progress_update (NautilusFileOperationsProgress *progre
gtk_progress_configure (GTK_PROGRESS (progress->details->progress_bar),
progress->details->bytes_copied,
- 0.0, progress->details->bytes_total);
+ 0.0,
+ progress->details->bytes_total);
}
static void
@@ -359,7 +360,8 @@ nautilus_file_operations_progress_new_file (NautilusFileOperationsProgress *prog
(EEL_ELLIPSIZING_LABEL (progress->details->item_name),
item_name);
- progress_count = g_strdup_printf (_("%ld of %ld"), file_index,
+ progress_count = g_strdup_printf (_("%ld of %ld"),
+ file_index,
progress->details->files_total);
gtk_label_set_text (GTK_LABEL (progress->details->progress_count_label), progress_count);
g_free (progress_count);
@@ -434,10 +436,8 @@ nautilus_file_operations_progress_done (NautilusFileOperationsProgress *progress
return;
}
- /* Make dialog look "done". */
+ /* No cancel button once the operation is done. */
gnome_dialog_set_sensitive (GNOME_DIALOG (progress), 0, FALSE);
- gtk_progress_configure (GTK_PROGRESS (progress->details->progress_bar),
- 1.0, 0.0, 1.0);
progress->details->delayed_close_timeout_id = gtk_timeout_add
(MINIMUM_TIME_UP - time_up,
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 030ad0c57..603caf8c9 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -280,17 +280,6 @@ parent_for_error_dialog (TransferInfo *transfer_info)
}
static void
-transfer_dialog_clicked_callback (NautilusFileOperationsProgress *dialog,
- int button_number,
- gpointer data)
-{
- TransferInfo *info;
-
- info = (TransferInfo *) data;
- info->cancelled = TRUE;
-}
-
-static void
fit_rect_on_screen (GdkRectangle *rect)
{
if (rect->x + rect->width > gdk_screen_width ()) {
@@ -343,16 +332,13 @@ center_dialog_over_window (GtkWindow *window, GtkWindow *over)
center_dialog_over_rect (window, rect);
}
-
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)
@@ -366,15 +352,18 @@ create_transfer_dialog (const GnomeVFSXferProgressInfo *progress_info,
transfer_info->progress_dialog = nautilus_file_operations_progress_new
(transfer_info->operation_title, "", "", "", 0, 0);
+ /* Treat clicking on the close box or use of the escape key
+ * the same as clicking cancel.
+ */
gtk_signal_connect (GTK_OBJECT (transfer_info->progress_dialog),
"clicked",
- GTK_SIGNAL_FUNC (transfer_dialog_clicked_callback),
+ GTK_SIGNAL_FUNC (gnome_dialog_close),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (transfer_info->progress_dialog),
+ "close",
+ GTK_SIGNAL_FUNC (handle_close_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 (GTK_WIDGET (transfer_info->progress_dialog));
/* Make the progress dialog show up over the window we are copying into */
@@ -524,10 +513,8 @@ handle_transfer_ok (const GnomeVFSXferProgressInfo *progress_info,
case GNOME_VFS_XFER_PHASE_OPENSOURCE:
case GNOME_VFS_XFER_PHASE_OPENTARGET:
/* fall through */
-
case GNOME_VFS_XFER_PHASE_COPYING:
if (transfer_info->progress_dialog != NULL) {
-
if (progress_info->bytes_copied == 0) {
progress_dialog_set_to_from_item_text
(transfer_info->progress_dialog,