GNOME Bugzilla – Bug 699901
GTK CSS keybinding broken
Last modified: 2013-05-08 14:48:25 UTC
CSS keybinding appears to have been broken since the following commit commit 44ba5d253f5bbda2d5a42c58218ad2aa318256f4 Author: Benjamin Otte <otte@redhat.com> Date: Tue Aug 28 17:52:12 2012 +0200 css: Redo bindings parsing I want to get away from the ability to have 0-length arrays, all css arrays are single element. Even if the element is "none", it is still a "none" element. The following one-line patch makes it work again diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index ea3cb36..c189ea6 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -476,7 +476,7 @@ bindings_value_parse_one (GtkCssParser *parser) return NULL; } - if (g_ascii_strcasecmp (name, "none")) + if (g_ascii_strcasecmp (name, "none") == 0) { name = NULL; } This can be tested quickly by e.g. creating a ~/.config/gtk-3.0/gtk.css with the following content, then running gtk3-demo and testing that the control-F2 binding is applied in the Text Widget -> Hypertext demo: @binding-set MyBindings { bind "<Control>F2" { "cut-clipboard" () }; } GtkTextView { gtk-key-bindings: MyBindings; }
*** Bug 694673 has been marked as a duplicate of this bug. ***