summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2011-01-28 10:25:00 +0100
committerCarlos Garnacho <carlosg@gnome.org>2011-01-28 19:40:24 +0100
commit99d950b82ffa31842ceb6ea70e8e6dedd1bbee91 (patch)
tree2d36d332a331817e4408c5a864c4a36d4b146a64
parentb7edae0fe366da6c4503ea857d8cfe8844f04747 (diff)
downloadgtk+-99d950b82ffa31842ceb6ea70e8e6dedd1bbee91.tar.gz
Remove unneeded code from GtkBindingSet
-rw-r--r--gtk/gtkbindings.c114
1 files changed, 0 insertions, 114 deletions
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index d837b8a5df..2b9d51230f 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)