[PATCH] Hig-ify copying/moving progress dialog



Hi,

Attaching a patch to HIG-ify the copying/moving progress dialog. 

Another thing that would be nice here is a responsive "cancel" button.
It can take up to half a minute for the "cancel" button to respond to
canceling copying a bigger file to a webdav location, for example. The
dialog will just sit there, cancel still clickable, like nothing
happened- very annoying. Maybe at least make the dialog say "canceling"
and de-sensitivify the cancel button, or something ..

Cheers,

Jorn
Index: libnautilus-private/nautilus-file-operations-progress.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations-progress.c,v
retrieving revision 1.44
diff -u -r1.44 nautilus-file-operations-progress.c
--- libnautilus-private/nautilus-file-operations-progress.c	18 Aug 2004 23:03:08 -0000	1.44
+++ libnautilus-private/nautilus-file-operations-progress.c	31 Jan 2005 21:54:54 -0000
@@ -271,6 +271,29 @@
 }
 
 static void
+style_set_callback (GtkWidget *widget,
+                    GtkStyle  *previous_style)
+{
+	GtkDialog *dialog;
+
+	if (GTK_WIDGET_CLASS (parent_class)->style_set)
+		GTK_WIDGET_CLASS (parent_class)->style_set (widget, previous_style);
+
+	dialog = GTK_DIALOG (widget);
+
+	/* Override the style properties with HIG-compliant spacings.  Ugh.
+	 * http://developer.gnome.org/projects/gup/hig/1.0/layout.html#layout-dialogs
+	 * http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-spacing
+	 */
+
+	gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), 12);
+	gtk_box_set_spacing (GTK_BOX (dialog->vbox), 24);
+
+	gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 0);
+	gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+}
+
+static void
 nautilus_file_operations_progress_init (NautilusFileOperationsProgress *progress)
 {
 	GtkWidget *hbox, *vbox;
@@ -278,6 +301,8 @@
 
 	progress->details = g_new0 (NautilusFileOperationsProgressDetails, 1);
 
+	gtk_dialog_set_has_separator (GTK_DIALOG (progress), FALSE);
+
 	vbox = gtk_vbox_new (FALSE, VERTICAL_SPACING);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), OUTER_BORDER);
 	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (progress)->vbox), vbox, TRUE, TRUE, VERTICAL_SPACING);
@@ -357,6 +382,7 @@
 	 */
 	widget_class->delete_event = delete_event_callback;
 	widget_class->map = map_callback;
+	widget_class->style_set = style_set_callback;
 
 	dialog_class->close = close_callback;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]