diff options
author | Pavel Cisler <pavel@eazel.com> | 2000-11-17 04:26:52 +0000 |
---|---|---|
committer | Pavel Cisler <pce@src.gnome.org> | 2000-11-17 04:26:52 +0000 |
commit | 9e7f5397c333ddf400a2d1972a44356ef4f1e957 (patch) | |
tree | 247324d68cdecbb5f579c0bddb90aaf50caed9ad /libnautilus-private/nautilus-file-operations-progress.c | |
parent | 91ccf58d5aba90a2b256663a6d34967d4779f19d (diff) | |
download | nautilus-9e7f5397c333ddf400a2d1972a44356ef4f1e957.tar.gz |
reviewed by: Mathieu Lacage <mathieu@eazel.com>
2000-11-16 Pavel Cisler <pavel@eazel.com>
reviewed by: Mathieu Lacage <mathieu@eazel.com>
* libnautilus-extensions/nautilus-file-operations-progress.c:
(delete_event_callback),
(nautilus_file_operations_progress_initialize),
(nautilus_file_operations_progress_initialize_class):
Fix 3094: Closing file progress dialog using the close box
crashes.
The progress dialog shouldn't really have a close box, it only
shows up in broken window manager themes that don't respect the
window manager hints. Made it so that clicking the close box
does nothing instead of crashing.
* libnautilus-extensions/nautilus-file-operations.c:
(fit_rect_on_screen), (center_dialog_over_rect),
(center_dialog_over_window), (create_xfer_dialog):
Fix 3092: File operation progress dialog not placed well.
Made it center over the window that is the target of the
copy/move operation. I couldn't really do it by setting the window
as the dialog's parent because you need to be able to close
the window without the dialog closing. Instead, added explicit
centering code.
* libnautilus-extensions/nautilus-file-operations.c:
(progress_dialog_set_to_from_item_text):
Fix 4080: Copy dialog shows to and from as the same location.
Stupid typo.
Diffstat (limited to 'libnautilus-private/nautilus-file-operations-progress.c')
-rw-r--r-- | libnautilus-private/nautilus-file-operations-progress.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-file-operations-progress.c b/libnautilus-private/nautilus-file-operations-progress.c index 6547e2b48..2e3a1a0c5 100644 --- a/libnautilus-private/nautilus-file-operations-progress.c +++ b/libnautilus-private/nautilus-file-operations-progress.c @@ -156,6 +156,15 @@ create_titled_label (GtkBox *vbox, GtkWidget **title_widget, GtkWidget **label_t gtk_misc_set_alignment (GTK_MISC (*label_text_widget), 0, 0); } +static gboolean +delete_event_callback (GtkWidget *widget, GdkEventAny *event) +{ + /* Do nothing -- we shouldn't be getting a close event because + * the dialog should not have a close box. + */ + return TRUE; +} + static void nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *dialog) { @@ -220,19 +229,29 @@ nautilus_file_operations_progress_initialize (NautilusFileOperationsProgress *di dialog->details->total_bytes_copied = 0; dialog->details->freeze_count = 0; + } static void nautilus_file_operations_progress_initialize_class (NautilusFileOperationsProgressClass *klass) { GtkObjectClass *object_class; + GtkWidgetClass *widget_class; GnomeDialogClass *dialog_class; object_class = GTK_OBJECT_CLASS (klass); + widget_class = GTK_WIDGET_CLASS (klass); dialog_class = GNOME_DIALOG_CLASS (klass); object_class->destroy = nautilus_file_operations_progress_destroy; dialog_class->close = nautilus_file_operations_progress_close; + + /* The progress dialog should not have a title and a close box. + * Some broken window manager themes still show the window title. + * Make clicking the close box do nothing in that case to prevent + * a crash. + */ + widget_class->delete_event = delete_event_callback; } GtkWidget * |