[PATCH] Make properties dialog close on enter



This patch makes the file properties dialog close when enter is pressed
in the name entry widget.  This behavior used to be in 1.0.x.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5412
diff -u -p -r1.5412 ChangeLog
--- ChangeLog	5 Jul 2002 20:58:42 -0000	1.5412
+++ ChangeLog	9 Jul 2002 03:05:00 -0000
@@ -1,3 +1,9 @@
+2002-07-08  David Emory Watson  <dwatson cs ucr edu>
+
+	* fm-properties-window.c:
+	(create_basic_page): Make entry activate default widget.
+	(create_properties_window): Make "Close" the default widget.
+
 2002-07-05  Dave Camp  <dave ximian com>
 
 	* src/nautilus-sidebar.c (nautilus_sidebar_create_context_menu):
Index: ./src/file-manager/fm-properties-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.c,v
retrieving revision 1.153
diff -u -p -r1.153 fm-properties-window.c
--- ./src/file-manager/fm-properties-window.c	17 May 2002 19:58:13 -0000	1.153
+++ ./src/file-manager/fm-properties-window.c	9 Jul 2002 03:05:14 -0000
@@ -1104,8 +1104,8 @@ append_separator (GtkTable *table)
 			  GTK_FILL, 0,
 			  0, 0);
 	return separator;				   
-}		  	
- 
+}
+
 static void
 directory_contents_value_field_update (FMPropertiesWindow *window)
 {
@@ -1552,6 +1552,7 @@ create_basic_page (FMPropertiesWindow *w
 	/* Name field */
 	name_field = nautilus_entry_new ();
 	window->details->name_field = NAUTILUS_ENTRY (name_field);
+	gtk_entry_set_activates_default (GTK_ENTRY (name_field), TRUE);
 	gtk_widget_show (name_field);
 	gtk_table_attach (table,
 			  name_field,
@@ -2238,6 +2239,8 @@ create_properties_window (StartupData *s
 	g_signal_connect_swapped (button, "clicked",
 				  G_CALLBACK (gtk_widget_destroy),
 				  window);
+	GTK_WIDGET_SET_FLAGS (GTK_WIDGET (button), GTK_CAN_DEFAULT);
+	gtk_widget_grab_default (GTK_WIDGET (button));
 
 	return window;
 }


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