[gtk/wip/otte/css: 43/48] stylecontext: Remove gtk_style_context_get_section()



commit 18cb15a05a8da5eb1b084837e7179d50b738369e
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jan 27 16:13:25 2020 +0100

    stylecontext: Remove gtk_style_context_get_section()
    
    The inspectors gets values differently these days.

 docs/reference/gtk/gtk4-sections.txt |  1 -
 gtk/gtkstylecontext.c                | 39 ------------------------------------
 gtk/gtkstylecontext.h                |  3 ---
 3 files changed, 43 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 3b178a5d13..9e396b17e3 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -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
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index cb2b62b5ab..f99783285e 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -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)
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 45f73fc007..46a98bc7ec 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]