Index: src/nautilus-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v
retrieving revision 1.450
diff -u -p -r1.450 nautilus-window.c
--- src/nautilus-window.c	1 Jul 2005 14:13:49 -0000	1.450
+++ src/nautilus-window.c	2 Jul 2005 11:43:02 -0000
@@ -679,6 +679,11 @@ add_view_as_menu_item (NautilusWindow *w
 	char *action_name;
 	ActivateViewData *data;
 
+	char *accel;
+	char *accel_path;
+	unsigned int accel_keyval;
+	GdkModifierType accel_mods;
+
 	info = nautilus_view_factory_lookup (identifier);
 	
 	action_name = g_strdup_printf ("view_as_%d", index);
@@ -687,6 +692,27 @@ add_view_as_menu_item (NautilusWindow *w
 				       _(info->display_location_label),
 				       NULL,
 				       0);
+
+	if (index >= 0 && index <= 9) {
+		accel = g_strdup_printf ("%d", index);
+
+		accel_path = g_strdup_printf ("<Nautilus-Window>/%s", action_name);
+
+		accel_keyval = gdk_keyval_from_name (accel);
+		g_assert (accel_keyval != GDK_VoidSymbol);
+
+		accel_mods = GDK_CONTROL_MASK;
+		if (index == 0) {
+			/* ctrl-0 is bound to 100% zoom */
+			accel_mods |= GDK_SHIFT_MASK;
+		}
+
+		gtk_accel_map_add_entry (accel_path, accel_keyval, accel_mods);
+		gtk_action_set_accel_path (GTK_ACTION (action), accel_path);
+
+		g_free (accel);
+		g_free (accel_path);
+	}
 
 	if (window->details->view_as_radio_action != NULL) {
 		gtk_radio_action_set_group (action,
