[gtk] Remove support for -gtk-key-bindings: css property
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] Remove support for -gtk-key-bindings: css property
- Date: Thu, 21 Feb 2019 18:57:21 +0000 (UTC)
commit 12442bd1bfce709229323634e359dd3c5c28dd2d
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Feb 21 13:55:28 2019 -0500
Remove support for -gtk-key-bindings: css property
This is no longer used.
gtk/gtkcssstylepropertyimpl.c | 79 -------------------------------------------
1 file changed, 79 deletions(-)
---
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 62c48c39a0..e13710386a 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -419,75 +419,6 @@ icon_style_parse (GtkCssStyleProperty *property,
return value;
}
-static GtkCssValue *
-bindings_value_parse_one (GtkCssParser *parser)
-{
- char *name;
-
- name = _gtk_css_parser_try_ident (parser, TRUE);
- if (name == NULL)
- {
- _gtk_css_parser_error (parser, "Not a valid binding name");
- return NULL;
- }
-
- if (g_ascii_strcasecmp (name, "none") == 0)
- {
- name = NULL;
- }
- else if (!gtk_binding_set_find (name))
- {
- _gtk_css_parser_error (parser, "No binding set named '%s'", name);
- g_free (name);
- return NULL;
- }
-
- return _gtk_css_string_value_new_take (name);
-}
-
-static GtkCssValue *
-bindings_value_parse (GtkCssStyleProperty *property,
- GtkCssParser *parser)
-{
- return _gtk_css_array_value_parse (parser, bindings_value_parse_one);
-}
-
-static void
-bindings_value_query (GtkCssStyleProperty *property,
- const GtkCssValue *css_value,
- GValue *value)
-{
- GPtrArray *array;
- guint i;
-
- g_value_init (value, G_TYPE_PTR_ARRAY);
-
- if (_gtk_css_array_value_get_n_values (css_value) == 0)
- return;
-
- array = NULL;
-
- for (i = 0; i < _gtk_css_array_value_get_n_values (css_value); i++)
- {
- const char *name;
- GtkBindingSet *binding_set;
-
- name = _gtk_css_string_value_get (_gtk_css_array_value_get_nth (css_value, i));
- if (name == NULL)
- continue;
-
- binding_set = gtk_binding_set_find (name);
- if (binding_set == NULL)
- continue;
-
- if (array == NULL)
- array = g_ptr_array_new ();
- g_ptr_array_add (array, binding_set);
- }
-
- g_value_take_boxed (value, array);
-}
-
static GtkCssValue *
parse_letter_spacing (GtkCssStyleProperty *property,
GtkCssParser *parser)
@@ -1761,16 +1692,6 @@ _gtk_css_style_property_init_properties (void)
NULL,
gtk_css_filter_value_new_none ());
- /* Private property holding the binding sets */
- gtk_css_style_property_register ("-gtk-key-bindings",
- GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
- G_TYPE_PTR_ARRAY,
- 0,
- 0,
- bindings_value_parse,
- bindings_value_query,
- _gtk_css_array_value_new (_gtk_css_string_value_new (NULL)));
-
gtk_css_style_property_register ("caret-color",
GTK_CSS_PROPERTY_CARET_COLOR,
GDK_TYPE_RGBA,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]