stylecontext: Remove gtk_style_context_get_section()
authorBenjamin Otte <otte@redhat.com>
Mon, 27 Jan 2020 15:13:25 +0000 (16:13 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 28 Jan 2020 01:17:03 +0000 (02:17 +0100)
The inspectors gets values differently these days.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h

index 3b178a5d13842366099f17bd1e2ed7f6dd091acb..9e396b17e31bd60e507b1b9be50bd794745ee87c 100644 (file)
@@ -4807,7 +4807,6 @@ gtk_style_context_get_property
 gtk_style_context_get_display
 gtk_style_context_get_state
 gtk_style_context_get_valist
-gtk_style_context_get_section
 gtk_style_context_get_color
 gtk_style_context_get_border
 gtk_style_context_get_padding
index cb2b62b5abf8bc319626922ed0a36be6bd1e47c0..f99783285eae52ed7734b3432c36bdb271600f80 100644 (file)
@@ -617,45 +617,6 @@ gtk_style_context_remove_provider_for_display (GdkDisplay       *display,
   _gtk_style_cascade_remove_provider (cascade, provider);
 }
 
-/**
- * gtk_style_context_get_section:
- * @context: a #GtkStyleContext
- * @property: style property name
- *
- * Queries the location in the CSS where @property was defined for the
- * current @context. Note that the state to be queried is taken from
- * gtk_style_context_get_state().
- *
- * If the location is not available, %NULL will be returned. The
- * location might not be available for various reasons, such as the
- * property being overridden, @property not naming a supported CSS
- * property or tracking of definitions being disabled for performance
- * reasons.
- *
- * Shorthand CSS properties cannot be queried for a location and will
- * always return %NULL.
- *
- * Returns: (nullable) (transfer none): %NULL or the section where a value
- * for @property was defined
- **/
-GtkCssSection *
-gtk_style_context_get_section (GtkStyleContext *context,
-                               const gchar     *property)
-{
-  GtkCssStyle *values;
-  GtkStyleProperty *prop;
-
-  g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
-  g_return_val_if_fail (property != NULL, NULL);
-
-  prop = _gtk_style_property_lookup (property);
-  if (!GTK_IS_CSS_STYLE_PROPERTY (prop))
-    return NULL;
-
-  values = gtk_style_context_lookup_style (context);
-  return gtk_css_style_get_section (values, _gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (prop)));
-}
-
 static GtkCssValue *
 gtk_style_context_query_func (guint    id,
                               gpointer values)
index 45f73fc007560e3d07cedda2df946cd97d80c1db..46a98bc7ecea1d3037da62d61cd9eac92bb26fd8 100644 (file)
@@ -874,9 +874,6 @@ void gtk_style_context_save    (GtkStyleContext *context);
 GDK_AVAILABLE_IN_ALL
 void gtk_style_context_restore (GtkStyleContext *context);
 
-GDK_AVAILABLE_IN_ALL
-GtkCssSection * gtk_style_context_get_section (GtkStyleContext *context,
-                                               const gchar     *property);
 GDK_AVAILABLE_IN_ALL
 void gtk_style_context_get_property (GtkStyleContext *context,
                                      const gchar     *property,