Commit 888c3a72 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer
Browse files

move the code of the deprecated gtk_binding_entry_clear() to a new private

2008-08-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbindings.c: move the code of the deprecated
	gtk_binding_entry_clear() to a new private function
	gtk_binding_entry_clear_internal() and call it from
	gtk_binding_entry_clear().

	(_gtk_binding_entry_add_signall)
	(gtk_binding_parse_bind): use the new internal function in order
	to avoid our own deprecated public API.


svn path=/trunk/; revision=20963
parent 5a369135
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkbindings.c: move the code of the deprecated
gtk_binding_entry_clear() to a new private function
gtk_binding_entry_clear_internal() and call it from
gtk_binding_entry_clear().
(_gtk_binding_entry_add_signall)
(gtk_binding_parse_bind): use the new internal function in order
to avoid our own deprecated public API.
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_font):
......
......@@ -689,6 +689,23 @@ gtk_binding_set_activate (GtkBindingSet *binding_set,
return FALSE;
}
static void
gtk_binding_entry_clear_internal (GtkBindingSet *binding_set,
guint keyval,
GdkModifierType modifiers)
{
GtkBindingEntry *entry;
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);
}
/**
* gtk_binding_entry_clear:
* @binding_set:
......@@ -702,18 +719,9 @@ gtk_binding_entry_clear (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);
gtk_binding_entry_clear_internal (binding_set, keyval, modifiers);
}
/**
......@@ -865,7 +873,7 @@ _gtk_binding_entry_add_signall (GtkBindingSet *binding_set,
entry = binding_ht_lookup_entry (binding_set, keyval, modifiers);
if (!entry)
{
gtk_binding_entry_clear (binding_set, keyval, modifiers);
gtk_binding_entry_clear_internal (binding_set, keyval, modifiers);
entry = binding_ht_lookup_entry (binding_set, keyval, modifiers);
}
signal_p = &entry->signals;
......@@ -1536,8 +1544,8 @@ gtk_binding_parse_bind (GScanner *scanner,
if (scanner->token != '{')
return '{';
gtk_binding_entry_clear (binding_set, keyval, modifiers);
gtk_binding_entry_clear_internal (binding_set, keyval, modifiers);
g_scanner_peek_next_token (scanner);
while (scanner->next_token != '}')
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment