Index: gtk/gtkrc.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkrc.c,v
retrieving revision 1.186
diff -u -p -r1.186 gtkrc.c
--- gtk/gtkrc.c	4 Sep 2006 11:23:38 -0000	1.186
+++ gtk/gtkrc.c	5 Oct 2006 09:02:45 -0000
@@ -319,7 +319,8 @@ static const gchar symbol_names[] = 
   "im_module_file\0"
   "LTR\0"
   "RTL\0"
-  "color\0";
+  "color\0"
+  "unbind\0";
 
 static const struct
 {
@@ -361,7 +362,8 @@ static const struct
   { 245, GTK_RC_TOKEN_IM_MODULE_FILE },
   { 260, GTK_RC_TOKEN_LTR },
   { 264, GTK_RC_TOKEN_RTL },
-  { 268, GTK_RC_TOKEN_COLOR }
+  { 268, GTK_RC_TOKEN_COLOR },
+  { 274, GTK_RC_TOKEN_UNBIND }
 };
 
 static GHashTable *realized_style_ht = NULL;
Index: gtk/gtkrc.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkrc.h,v
retrieving revision 1.46
diff -u -p -r1.46 gtkrc.h
--- gtk/gtkrc.h	21 Jul 2006 16:12:44 -0000	1.46
+++ gtk/gtkrc.h	5 Oct 2006 09:02:45 -0000
@@ -217,6 +217,7 @@ typedef enum {
   GTK_RC_TOKEN_LTR,
   GTK_RC_TOKEN_RTL,
   GTK_RC_TOKEN_COLOR,
+  GTK_RC_TOKEN_UNBIND,
   GTK_RC_TOKEN_LAST
 } GtkRcTokenType;
 
Index: gtk/gtkbindings.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbindings.c,v
retrieving revision 1.54
diff -u -p -r1.54 gtkbindings.c
--- gtk/gtkbindings.c	23 Mar 2006 23:21:30 -0000	1.54
+++ gtk/gtkbindings.c	5 Oct 2006 09:02:46 -0000
@@ -206,6 +206,7 @@ binding_entry_new (GtkBindingSet  *bindi
   entry->binding_set = binding_set,
   entry->destroyed = FALSE;
   entry->in_emission = FALSE;
+  entry->marks_unbound = FALSE;
   entry->signals = NULL;
 
   entry->set_next = binding_set->entries;
@@ -568,7 +569,7 @@ gtk_binding_set_new (const gchar    *set
   g_return_val_if_fail (set_name != NULL, NULL);
   
   binding_set = g_new (GtkBindingSet, 1);
-  binding_set->set_name = g_intern_string (set_name);
+  binding_set->set_name = (gchar *) g_intern_string (set_name);
   binding_set->widget_path_pspecs = NULL;
   binding_set->widget_class_pspecs = NULL;
   binding_set->class_branch_pspecs = NULL;
@@ -666,6 +667,26 @@ gtk_binding_entry_clear (GtkBindingSet	*
 }
 
 void
+gtk_binding_entry_skip (GtkBindingSet  *binding_set,
+                        guint           keyval,
+                        GdkModifierType modifiers)
+{
+  GtkBindingEntry *entry;
+
+  g_return_if_fail (binding_set != NULL);
+
+  keyval = gdk_keyval_to_lower (keyval);
+  modifiers = modifiers & BINDING_MOD_MASK ();
+
+  entry = binding_ht_lookup_entry (binding_set, keyval, modifiers);
+  if (entry)
+    binding_entry_destroy (entry);
+
+  entry = binding_entry_new (binding_set, keyval, modifiers);
+  entry->marks_unbound = TRUE;
+}
+
+void
 gtk_binding_entry_remove (GtkBindingSet	 *binding_set,
 			  guint		  keyval,
 			  GdkModifierType modifiers)
@@ -684,10 +705,22 @@ gtk_binding_entry_remove (GtkBindingSet	
 
 void
 gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
-			       guint	       keyval,
-			       GdkModifierType modifiers,
-			       const gchar    *signal_name,
-			       GSList	      *binding_args)
+                               guint	       keyval,
+                               GdkModifierType modifiers,
+                               const gchar    *signal_name,
+                               GSList	      *binding_args)
+{
+  _gtk_binding_entry_add_signall (binding_set,
+                                  keyval, modifiers,
+                                  signal_name, binding_args);
+}
+
+void
+_gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
+                                guint	       keyval,
+                                GdkModifierType modifiers,
+                                const gchar    *signal_name,
+                                GSList	      *binding_args)
 {
   GtkBindingEntry *entry;
   GtkBindingSignal *signal, **signal_p;
@@ -929,10 +962,13 @@ binding_match_activate (GSList          
 			GtkObject	*object,
 			guint	         path_length,
 			gchar           *path,
-			gchar           *path_reversed)
+			gchar           *path_reversed,
+                        gboolean        *unbound)
 {
   GSList *slist;
 
+  *unbound = FALSE;
+
   for (slist = pspec_list; slist; slist = slist->next)
     {
       PatternSpec *pspec;
@@ -952,8 +988,17 @@ binding_match_activate (GSList          
 	    binding_set = pspec->user_data;
         }
 
-      if (binding_set && gtk_binding_entry_activate (binding_set->current, object))
-        return TRUE;
+      if (binding_set)
+        {
+          if (binding_set->current->marks_unbound)
+            {
+              *unbound = TRUE;
+              return FALSE;
+            }
+
+          if (gtk_binding_entry_activate (binding_set->current, object))
+            return TRUE;
+        }
     }
 
   return FALSE;
@@ -1047,13 +1092,17 @@ gtk_bindings_activate_list (GtkObject *o
       guint path_length;
       gchar *path, *path_reversed;
       GSList *patterns;
+      gboolean unbound;
 
       gtk_widget_path (widget, &path_length, &path, &path_reversed);
       patterns = gtk_binding_entries_sort_patterns (entries, GTK_PATH_WIDGET, is_release);
-      handled = binding_match_activate (patterns, object, path_length, path, path_reversed);
+      handled = binding_match_activate (patterns, object, path_length, path, path_reversed, &unbound);
       g_slist_free (patterns);
       g_free (path);
       g_free (path_reversed);
+
+      if (unbound)
+        return FALSE;
     }
 
   if (!handled)
@@ -1061,20 +1110,25 @@ gtk_bindings_activate_list (GtkObject *o
       guint path_length;
       gchar *path, *path_reversed;
       GSList *patterns;
+      gboolean unbound;
 
       gtk_widget_class_path (widget, &path_length, &path, &path_reversed);
       patterns = gtk_binding_entries_sort_patterns (entries, GTK_PATH_WIDGET_CLASS, is_release);
-      handled = binding_match_activate (patterns, object, path_length, path, path_reversed);
+      handled = binding_match_activate (patterns, object, path_length, path, path_reversed, &unbound);
       g_slist_free (patterns);
       g_free (path);
       g_free (path_reversed);
+
+      if (unbound)
+        return FALSE;
     }
 
   if (!handled)
     {
       GSList *patterns;
       GType class_type;
-      
+      gboolean unbound = FALSE;
+
       patterns = gtk_binding_entries_sort_patterns (entries, GTK_PATH_CLASS, is_release);
       class_type = G_TYPE_FROM_INSTANCE (object);
       while (class_type && !handled)
@@ -1082,18 +1136,24 @@ gtk_bindings_activate_list (GtkObject *o
 	  guint path_length;
 	  gchar *path;
 	  gchar *path_reversed;
-	  
+
 	  path = g_strdup (g_type_name (class_type));
 	  path_reversed = g_strdup (path);
 	  g_strreverse (path_reversed);
 	  path_length = strlen (path);
-	  handled = binding_match_activate (patterns, object, path_length, path, path_reversed);
+	  handled = binding_match_activate (patterns, object, path_length, path, path_reversed, &unbound);
 	  g_free (path);
 	  g_free (path_reversed);
 
+          if (unbound)
+            break;
+
 	  class_type = g_type_parent (class_type);
 	}
       g_slist_free (patterns);
+
+      if (unbound)
+        return FALSE;
     }
 
   return handled;
@@ -1335,12 +1395,15 @@ gtk_binding_parse_bind (GScanner       *
 {
   guint keyval = 0;
   GdkModifierType modifiers = 0;
+  gboolean unbind = FALSE;
 
   g_return_val_if_fail (scanner != NULL, G_TOKEN_ERROR);
   
   g_scanner_get_next_token (scanner);
-  if (scanner->token != GTK_RC_TOKEN_BIND)
+  if (scanner->token != GTK_RC_TOKEN_BIND &&
+      scanner->token != GTK_RC_TOKEN_UNBIND)
     return GTK_RC_TOKEN_BIND;
+  unbind = (scanner->token == GTK_RC_TOKEN_UNBIND);
   g_scanner_get_next_token (scanner);
   if (scanner->token != G_TOKEN_STRING)
     return G_TOKEN_STRING;
@@ -1349,7 +1412,14 @@ gtk_binding_parse_bind (GScanner       *
   if (keyval == 0)
     return G_TOKEN_STRING;
 
+  if (unbind)
+    {
+      gtk_binding_entry_skip (binding_set, keyval, modifiers);
+      return G_TOKEN_NONE;
+    }
+
   g_scanner_get_next_token (scanner);
+
   if (scanner->token != '{')
     return '{';
 
@@ -1420,6 +1490,7 @@ gtk_binding_parse_binding (GScanner     
 	  guint expected_token;
 
 	case GTK_RC_TOKEN_BIND:
+	case GTK_RC_TOKEN_UNBIND:
 	  expected_token = gtk_binding_parse_bind (scanner, binding_set);
 	  if (expected_token != G_TOKEN_NONE)
 	    return expected_token;
Index: gtk/gtkbindings.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkbindings.h,v
retrieving revision 1.20
diff -u -p -r1.20 gtkbindings.h
--- gtk/gtkbindings.h	5 Jan 2006 04:21:09 -0000	1.20
+++ gtk/gtkbindings.h	5 Oct 2006 09:02:46 -0000
@@ -69,6 +69,7 @@ struct _GtkBindingEntry
   GtkBindingSet		*binding_set;
   guint			destroyed : 1;
   guint			in_emission : 1;
+  guint                 marks_unbound : 1;
   GtkBindingEntry	*set_next;
   GtkBindingEntry	*hash_next;
   GtkBindingSignal	*signals;
@@ -106,16 +107,32 @@ gboolean gtk_binding_set_activate	(GtkBi
 					 guint		 keyval,
 					 GdkModifierType modifiers,
 					 GtkObject	*object);
+
+#ifndef GTK_DISABLE_DEPRECATED
 #define	 gtk_binding_entry_add		gtk_binding_entry_clear
 void	 gtk_binding_entry_clear	(GtkBindingSet	*binding_set,
 					 guint		 keyval,
 					 GdkModifierType modifiers);
-void	 gtk_binding_entry_add_signal	(GtkBindingSet	*binding_set,
+void	 gtk_binding_entry_add_signall	(GtkBindingSet	*binding_set,
 					 guint		 keyval,
 					 GdkModifierType modifiers,
 					 const gchar	*signal_name,
-					 guint		 n_args,
-					 ...);
+					 GSList		*binding_args);
+#endif /* GTK_DISABLE_DEPRECATED */
+
+void	 gtk_binding_entry_skip         (GtkBindingSet  *binding_set,
+                                         guint           keyval,
+                                         GdkModifierType modifiers);
+void	 gtk_binding_entry_add_signal   (GtkBindingSet  *binding_set,
+                                         guint           keyval,
+                                         GdkModifierType modifiers,
+                                         const gchar    *signal_name,
+                                         guint           n_args,
+                                         ...);
+void	 gtk_binding_entry_remove	(GtkBindingSet	*binding_set,
+					 guint		 keyval,
+					 GdkModifierType modifiers);
+
 void	 gtk_binding_set_add_path	(GtkBindingSet	*binding_set,
 					 GtkPathType	 path_type,
 					 const gchar	*path_pattern,
@@ -124,18 +141,13 @@ void	 gtk_binding_set_add_path	(GtkBindi
 
 /* Non-public methods */
 
-void	 gtk_binding_entry_remove	(GtkBindingSet	*binding_set,
-					 guint		 keyval,
-					 GdkModifierType modifiers);
-void	 gtk_binding_entry_add_signall	(GtkBindingSet	*binding_set,
+guint	 gtk_binding_parse_binding      (GScanner       *scanner);
+void     _gtk_binding_reset_parsed      (void);
+void	 _gtk_binding_entry_add_signall (GtkBindingSet  *binding_set,
 					 guint		 keyval,
 					 GdkModifierType modifiers,
 					 const gchar	*signal_name,
 					 GSList		*binding_args);
-guint	 gtk_binding_parse_binding	(GScanner	*scanner);
-
-
-void     _gtk_binding_reset_parsed    (void);
 
 /* Creates a signal with a fixed callback instead of a class offset;
  * useful for key binding signals
Index: gtk/gtk.symbols
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtk.symbols,v
retrieving revision 1.129
diff -u -p -r1.129 gtk.symbols
--- gtk/gtk.symbols	10 Sep 2006 06:39:16 -0000	1.129
+++ gtk/gtk.symbols	5 Oct 2006 09:02:47 -0000
@@ -372,9 +372,12 @@ gtk_aspect_frame_set
 
 #if IN_HEADER(__GTK_BINDINGS_H__)
 #if IN_FILE(__GTK_BINDINGS_C__)
-gtk_binding_entry_add_signal
-gtk_binding_entry_add_signall
+#ifndef GTK_DISABLE_DEPRECATED
 gtk_binding_entry_clear
+gtk_binding_entry_add_signall
+#endif
+gtk_binding_entry_skip
+gtk_binding_entry_add_signal
 gtk_binding_entry_remove
 gtk_binding_parse_binding
 gtk_bindings_activate
