? foo
? diff
? invent.patch
? move-patch
? foopatch
? foo.patch
? prelight-etc.diff
? summary.diff
? wrap.patch
? tinderdeath.patch
? text.patch
? keybinding.patch
? desktop-file.patch
? log.diff
? xml.diff
? smack-the-installer.diff
? movecopy.diff
? keybindings2.patch
? components/services/inventory/conf-info
? data/top/Makefile.in
? data/top/Makefile
? help/nautilus-user-manual/es/nautilus-user-manual.junk
? libnautilus-extensions/nautilus-view-identifier.h.x
? libnautilus-extensions/nautilus-view-identifier.c.x
? nautilus-installer/src/eazel-installer
? nautilus-installer/src/.xvpics
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.4224
diff -u -p -r1.4224 ChangeLog
--- ChangeLog	2001/03/11 03:48:42	1.4224
+++ ChangeLog	2001/03/12 14:18:26
@@ -1,3 +1,27 @@
+2001-03-12  Maciej Stachowiak  <mjs@eazel.com>
+
+        Fix bug 6495 (Emacs-style keybindings not working in location bar
+	and other NautilusEntry fields) by adding an expert preference to
+	prefer the location bar key bindings to global keyboard shortcuts.
+	
+	* libnautilus-extensions/nautilus-global-preferences.h,
+	libnautilus-extensions/nautilus-global-preferences.c:
+	(global_preferences_install_descriptions),
+	(global_preferences_install_defaults),
+	(global_preferences_install_visibility),
+	(global_preferences_create_dialog): Add a new expert-only
+	preference to let emacs-style key bindings take precedence over
+	global accelerators in the location bar.
+
+	* libnautilus-extensions/nautilus-entry.h,
+	libnautilus-extensions/nautilus-entry.c:
+	(key_bindings_preference_changed_callback,
+	nautilus_entry_initialize): Track the new preference.
+
+	(nautilus_entry_key_press): Only filter out Control and Alt key
+	combinations here if the preference to let location bar key
+	bindings take precedence was _not_ set.
+
 2001-03-10  Robey Pointer  <robey@eazel.com>
 
 	reviewed by: Eskil Heyn Olsen <eskil@eazel.com>
Index: libnautilus-extensions/nautilus-entry.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-extensions/nautilus-entry.c,v
retrieving revision 1.29
diff -u -p -r1.29 nautilus-entry.c
--- libnautilus-extensions/nautilus-entry.c	2001/02/23 02:08:24	1.29
+++ libnautilus-extensions/nautilus-entry.c	2001/03/12 14:18:27
@@ -39,6 +39,7 @@
 
 #include <libnautilus-extensions/nautilus-gdk-extensions.h>
 #include <libnautilus-extensions/nautilus-undo-signal-handlers.h>
+#include <libnautilus-extensions/nautilus-global-preferences.h>
 
 #include <orb/orbit.h>
 
@@ -115,6 +116,17 @@ nautilus_entry_initialize_class (Nautilu
 }
 
 static void
+key_bindings_preference_changed_callback (gpointer callback_data)
+{
+	NautilusEntry *entry;
+
+	entry = NAUTILUS_ENTRY (callback_data);
+
+	entry->dont_override_key_bindings =
+		nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS);
+}
+
+static void
 nautilus_entry_initialize (NautilusEntry *entry)
 {
 	GtkWidget *widget;
@@ -129,6 +141,13 @@ nautilus_entry_initialize (NautilusEntry
 	gtk_widget_set_events (widget, gtk_widget_get_events (widget) | GDK_POINTER_MOTION_MASK);
 
 	nautilus_undo_set_up_nautilus_entry_for_undo (entry);
+
+	entry->dont_override_key_bindings =
+		nautilus_preferences_get_boolean (NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS);
+
+	nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS,
+					   key_bindings_preference_changed_callback,
+					   entry);
 }
 
 GtkWidget *
@@ -214,11 +233,13 @@ nautilus_entry_key_press (GtkWidget *wid
 		break;
 	}
 
-	/* Filter out default GTKEntry alt and control key bindings. They have numerous conflicts
-	 * with Nautilus menu keyboard accelerators.
-	 */		
-	if (event->state & GDK_CONTROL_MASK || event->state & GDK_MOD1_MASK) {
-		return FALSE;
+	if (!entry->dont_override_key_bindings) {
+		/* Filter out default GTKEntry alt and control key bindings. They have numerous conflicts
+		 * with Nautilus menu keyboard accelerators.
+		 */		
+		if (event->state & GDK_CONTROL_MASK || event->state & GDK_MOD1_MASK) {
+			return FALSE;
+		}
 	}
 	
 	obscure_cursor (entry);
Index: libnautilus-extensions/nautilus-entry.h
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-extensions/nautilus-entry.h,v
retrieving revision 1.14
diff -u -p -r1.14 nautilus-entry.h
--- libnautilus-extensions/nautilus-entry.h	2001/02/23 01:16:10	1.14
+++ libnautilus-extensions/nautilus-entry.h	2001/03/12 14:18:27
@@ -48,10 +48,12 @@ typedef struct NautilusEntryClass Nautil
 
 struct NautilusEntry {
 	GtkEntry parent;
-		
+	
+	/* FIXME: should be in details struct */
 	gboolean user_edit;
 	gboolean special_tab_handling;
 	gboolean cursor_obscured;
+	gboolean dont_override_key_bindings;
 };
 
 struct NautilusEntryClass {
Index: libnautilus-extensions/nautilus-global-preferences.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-extensions/nautilus-global-preferences.c,v
retrieving revision 1.134
diff -u -p -r1.134 nautilus-global-preferences.c
--- libnautilus-extensions/nautilus-global-preferences.c	2001/03/09 12:28:27	1.134
+++ libnautilus-extensions/nautilus-global-preferences.c	2001/03/12 14:18:28
@@ -217,6 +217,9 @@ global_preferences_install_descriptions 
 	nautilus_preferences_set_description (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS,
 					      _("Don't include the built-in bookmarks in the Bookmarks menu"));
 	
+	nautilus_preferences_set_description (NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS,
+					      _("Let Emacs-style keybindings in location bar take precendece\n"
+						"over global keyboard shortcuts"));
 
 	nautilus_preferences_set_description (NAUTILUS_PREFERENCES_HOME_URI,
 					      _("Location:"));
@@ -335,6 +338,10 @@ global_preferences_install_defaults (voi
 	nautilus_preferences_default_set_boolean (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS,
 						  NAUTILUS_USER_LEVEL_NOVICE,
 						  FALSE);
+
+	nautilus_preferences_default_set_boolean (NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS,
+						  NAUTILUS_USER_LEVEL_NOVICE,
+						  FALSE);
 	
 	/* FIXME bugzilla.eazel.com 1245: Saved in pixels instead of in %? */
 	nautilus_preferences_default_set_integer (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH,
@@ -475,6 +482,9 @@ global_preferences_install_visibility (v
 
 	nautilus_preferences_set_visible_user_level (NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS,
 						     NAUTILUS_USER_LEVEL_INTERMEDIATE);
+
+	nautilus_preferences_set_visible_user_level (NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS,
+						     NAUTILUS_USER_LEVEL_ADVANCED);
 }
 
 /*
@@ -715,6 +725,13 @@ global_preferences_create_dialog (void)
 							 NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS,
 							 NAUTILUS_PREFERENCE_ITEM_BOOLEAN);
 
+	/* Location Bar */
+	nautilus_preferences_pane_add_group (NAUTILUS_PREFERENCES_PANE (navigation_pane),
+					     _("Location Bar"));
+	nautilus_preferences_pane_add_item_to_nth_group (NAUTILUS_PREFERENCES_PANE (navigation_pane),
+							 3,
+							 NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS,
+							 NAUTILUS_PREFERENCE_ITEM_BOOLEAN);
 
 	/*
 	 * Tradeoffs
Index: libnautilus-extensions/nautilus-global-preferences.h
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-extensions/nautilus-global-preferences.h,v
retrieving revision 1.76
diff -u -p -r1.76 nautilus-global-preferences.h
--- libnautilus-extensions/nautilus-global-preferences.h	2001/03/08 00:40:18	1.76
+++ libnautilus-extensions/nautilus-global-preferences.h	2001/03/12 14:18:28
@@ -59,6 +59,7 @@ BEGIN_GNOME_DECLS
 /* Navigation  */
 #define NAUTILUS_PREFERENCES_HOME_URI                 		"preferences/home_uri"
 #define NAUTILUS_PREFERENCES_HIDE_BUILT_IN_BOOKMARKS		"preferences/hide_built_in_bookmarks"
+#define NAUTILUS_PREFERENCES_LOCATION_BAR_KEY_BINDINGS          "preferences/location_bar_keybindings"
 
 /* Proxy */
 #define NAUTILUS_PREFERENCES_HTTP_PROXY                 	"preferences/http-proxy"
