[gtk+/key-themes: 5/6] Remove unneeded code from GtkBindingSet



commit e23121d25d94a2ad5dda4fdbfc33991020fcc8c1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jan 28 10:25:00 2011 +0100

    Remove unneeded code from GtkBindingSet

 gtk/gtkbindings.c |  114 -----------------------------------------------------
 1 files changed, 0 insertions(+), 114 deletions(-)
---
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index d837b8a..2b9d512 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -1383,120 +1383,6 @@ gtk_binding_set_add_path (GtkBindingSet      *binding_set,
     }
 }
 
-static gboolean
-binding_match_activate (GSList          *pspec_list,
-                        GObject         *object,
-                        guint            path_length,
-                        gchar           *path,
-                        gchar           *path_reversed,
-                        gboolean        *unbound)
-{
-  GSList *slist;
-
-  *unbound = FALSE;
-
-  for (slist = pspec_list; slist; slist = slist->next)
-    {
-      PatternSpec *pspec;
-      GtkBindingSet *binding_set;
-
-      binding_set = NULL;
-      pspec = slist->data;
-
-      if (pspec->type != GTK_PATH_WIDGET_CLASS)
-        {
-          if (g_pattern_match (pspec->pspec, path_length, path, path_reversed))
-            binding_set = pspec->user_data;
-        }
-
-      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;
-}
-
-static gint
-gtk_binding_pattern_compare (gconstpointer new_pattern,
-                             gconstpointer existing_pattern)
-{
-  register const PatternSpec *np  = new_pattern;
-  register const PatternSpec *ep  = existing_pattern;
-
-  /* walk the list as long as the existing patterns have
-   * higher priorities.
-   */
-
-  return np->seq_id < ep->seq_id;
-}
-
-static GSList*
-gtk_binding_entries_sort_patterns (GSList      *entries,
-                                   GtkPathType  path_id,
-                                   gboolean     is_release)
-{
-  GSList *patterns;
-  GSList *tmp_list;
-
-  patterns = NULL;
-  for (tmp_list = entries; tmp_list; tmp_list = tmp_list->next)
-    {
-      GtkBindingEntry *entry = tmp_list->data;
-      GtkBindingSet *binding_set;
-
-      binding_set = entry->binding_set;
-      binding_set->current = NULL;
-    }
-  
-  for (; entries; entries = entries->next)
-    {
-      GtkBindingEntry *entry = entries->data;
-      GtkBindingSet *binding_set;
-      GSList *slist = NULL;
-
-      if (is_release != ((entry->modifiers & GDK_RELEASE_MASK) != 0))
-        continue;
-
-      binding_set = entry->binding_set;
-
-      if (binding_set->current)
-        continue;
-      binding_set->current = entry;
-
-      switch (path_id)
-        {
-        case GTK_PATH_WIDGET:
-          slist = binding_set->widget_path_pspecs;
-          break;
-        case GTK_PATH_WIDGET_CLASS:
-          slist = binding_set->widget_class_pspecs;
-          break;
-        case GTK_PATH_CLASS:
-          slist = binding_set->class_branch_pspecs;
-          break;
-        }
-
-      for (; slist; slist = slist->next)
-        {
-          PatternSpec *pspec;
-
-          pspec = slist->data;
-          patterns = g_slist_insert_sorted (patterns, pspec, gtk_binding_pattern_compare);
-        }
-    }
-
-  return patterns;
-}
-
 static gint
 find_entry_with_binding (GtkBindingEntry *entry,
                          GtkBindingSet   *binding_set)



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