Make gtk_binding_entry_add_signal_from_string() return the expected
token in case of parsing error, so that we can return a GError
instead of spewing. Also, add a separate scope for binding-set,
since allowing {} in identifiers in SCOPE_VALUE breaks the fact
that the ; after the last assignment in a rule is optional.
This is done in the same place than it was done before the switch
to GtkStyleContext, the GtkBindingEntry has been slightly simplified
since it's now the GtkStyleContext which hands us the list
of binding sets applying to a widget, so no need to use the older
matching mechanisms.
Most code in gtkrc.c has been turned into a no-op, but that one
reverting in public API (gtk_rc_scanner_new() and such). GtStyle
is also more shallow, now fully relies in the backing
GtkStyleContext and all connection to gtkrc.c has been removed.
GtkBinding has been also affected, there is no replacement yet
for custom keybindings in style files, so that piece of code that
hooked into gtkrc has been replaced by a FIXME so in the future
it may be added back.
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
This patch adds Since: 2.4 tags to gtk_bindings_activate_event,
gtk_window_propagate_key_event and gtk_window_activate_key.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=604859
Signed-off-by: Javier Jardón <jjardon@gnome.org>
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
2008-07-21 Michael Natterer <mitch@imendio.com>
* gtk/gtkbox.c (gtk_box_add): use gtk_box_pack_start() instead of
the deprecated gtk_box_pack_start_defaults().
* gtk/gtkbindings.c (gtk_binding_entry_add_signal)
(gtk_binding_parse_signal): use _gtk_binding_entry_add_signall()
instead of the deprecated gtk_binding_entry_add_signall().
svn path=/trunk/; revision=20885
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2008-06-16 Michael Natterer <mitch@imendio.com>
* gtk/gtkbindings.c (_gtk_binding_entry_add_signall): use
gtk_binding_entry_clear() instead of gtk_binding_entry_add()
(the former is deprecated and #defined to gtk_binding_entry_clear)
svn path=/trunk/; revision=20408
Tue Oct 10 16:38:23 2006 Tim Janik <timj@imendio.com>
* gtk/tmpl/gtkbindings.sgml:
* gtk/gtkbindings.c: applied patch from Michael Natterer to move to
inline docs. applied wording fixes suggested by Martyn Russell.
2006-10-05 Michael Natterer <mitch@imendio.com>
* gtk/gtkrc.[ch]: added new scanner token "unbind" which gets
rid of a key binding (in fact, it only lets it appear unbound).
* gtk/gtkbindings.[ch] (struct GtkBindingEntry): added
"guint marks_unbound : 1"
(gtk_binding_entry_skip): new API which marks the entry as unbound.
Changed code so it returns FALSE when "marks_unbound == TRUE" is
encountered while activating bindings, effectively letting the
binding appear unbound (regardless of still existing bindings in
lower binding priority levels). Fixes bug #358329.
(gtk_binding_entry_add)
(gtk_binding_entry_clear)
(gtk_binding_entry_add_signall)
(gtk_binding_parse_binding): deprected these functions.
(_gtk_binding_parse_binding)
(_gtk_binding_entry_add_signall): new internal API.
* gtk/gtk.symbols: changed accordingly.
2006-03-23 Matthias Clasen <mclasen@redhat.com>
Support subclasses in RC files. (#142417, Todd Berman, patch
based on a patch by Benjamin Berg)
* gtk/gtkrc.h:
* gtk/gtkrc.c: Support <classname> elements in widget_class paths
in rc files which match any classes derived from named class.
(_gtk_rc_init): Use the new syntax in the default rc string.
* gtk/gtkbindings.c: Support the new syntax for bindings too.
* tests/testrc.c: Tests for widget_class path matching
2006-01-04 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbindings.h (struct _GtkBindingSignal): Revert questionable
changes.
* gtk/gtkbindings.c: Use the slice allocator and allocate signal
and arguments in one block.
2005-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkbindings.h (GtkBindingSignal):
* gtk/gtkbindings.c (binding_signal_new): Make the
args a flexible array inside the struct, and allocate them
together.
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-03-20 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gtk/grk.symbols: Group symbols by header and source file.
* gtk/makegtkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegtkalias.pl -def
* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
this file.
* gtk/*.c: Include gtkalias.h after the other headers,
include gtkaliasdef.c at the bottom.
* gtk/*.h: Small cleanups.