[gtk/otte/for-master: 5/6] cssnode: Remove unused widget path vfuncs
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/otte/for-master: 5/6] cssnode: Remove unused widget path vfuncs
- Date: Tue, 21 Jan 2020 02:08:35 +0000 (UTC)
commit d80fa287f6ce9bbf1816daedffacab764916371d
Author: Benjamin Otte <otte redhat com>
Date: Tue Jan 21 03:03:46 2020 +0100
cssnode: Remove unused widget path vfuncs
gtk/gtkcssnode.c | 26 ------------------------
gtk/gtkcssnodeprivate.h | 4 ----
gtk/gtkcsspathnode.c | 33 ------------------------------
gtk/gtkcsstransientnode.c | 32 -----------------------------
gtk/gtkcsswidgetnode.c | 51 -----------------------------------------------
5 files changed, 146 deletions(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 4fe350d5ff..008c2a6f35 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -495,18 +495,6 @@ gtk_css_node_real_init_matcher (GtkCssNode *cssnode,
return TRUE;
}
-static GtkWidgetPath *
-gtk_css_node_real_create_widget_path (GtkCssNode *cssnode)
-{
- return gtk_widget_path_new ();
-}
-
-static const GtkWidgetPath *
-gtk_css_node_real_get_widget_path (GtkCssNode *cssnode)
-{
- return NULL;
-}
-
static GtkStyleProvider *
gtk_css_node_real_get_style_provider (GtkCssNode *cssnode)
{
@@ -587,8 +575,6 @@ gtk_css_node_class_init (GtkCssNodeClass *klass)
klass->queue_validate = gtk_css_node_real_queue_validate;
klass->dequeue_validate = gtk_css_node_real_dequeue_validate;
klass->init_matcher = gtk_css_node_real_init_matcher;
- klass->create_widget_path = gtk_css_node_real_create_widget_path;
- klass->get_widget_path = gtk_css_node_real_get_widget_path;
klass->get_style_provider = gtk_css_node_real_get_style_provider;
klass->get_frame_clock = gtk_css_node_real_get_frame_clock;
@@ -1392,18 +1378,6 @@ gtk_css_node_init_matcher (GtkCssNode *cssnode,
return GTK_CSS_NODE_GET_CLASS (cssnode)->init_matcher (cssnode, matcher);
}
-GtkWidgetPath *
-gtk_css_node_create_widget_path (GtkCssNode *cssnode)
-{
- return GTK_CSS_NODE_GET_CLASS (cssnode)->create_widget_path (cssnode);
-}
-
-const GtkWidgetPath *
-gtk_css_node_get_widget_path (GtkCssNode *cssnode)
-{
- return GTK_CSS_NODE_GET_CLASS (cssnode)->get_widget_path (cssnode);
-}
-
GtkStyleProvider *
gtk_css_node_get_style_provider (GtkCssNode *cssnode)
{
diff --git a/gtk/gtkcssnodeprivate.h b/gtk/gtkcssnodeprivate.h
index 20ef434e7e..680189813f 100644
--- a/gtk/gtkcssnodeprivate.h
+++ b/gtk/gtkcssnodeprivate.h
@@ -78,8 +78,6 @@ struct _GtkCssNodeClass
gboolean (* init_matcher) (GtkCssNode *cssnode,
GtkCssMatcher *matcher);
- GtkWidgetPath * (* create_widget_path) (GtkCssNode *cssnode);
- const GtkWidgetPath * (* get_widget_path) (GtkCssNode *cssnode);
/* get style provider to use or NULL to use parent's */
GtkStyleProvider * (* get_style_provider) (GtkCssNode *cssnode);
/* get frame clock or NULL (only relevant for root node) */
@@ -157,8 +155,6 @@ void gtk_css_node_validate (GtkCssNode *
gboolean gtk_css_node_init_matcher (GtkCssNode *cssnode,
GtkCssMatcher *matcher);
-GtkWidgetPath * gtk_css_node_create_widget_path (GtkCssNode *cssnode);
-const GtkWidgetPath * gtk_css_node_get_widget_path (GtkCssNode *cssnode) G_GNUC_PURE;
GtkStyleProvider * gtk_css_node_get_style_provider (GtkCssNode *cssnode) G_GNUC_PURE;
void gtk_css_node_print (GtkCssNode *cssnode,
diff --git a/gtk/gtkcsspathnode.c b/gtk/gtkcsspathnode.c
index 64cd49260b..164487e4e8 100644
--- a/gtk/gtkcsspathnode.c
+++ b/gtk/gtkcsspathnode.c
@@ -59,37 +59,6 @@ gtk_css_path_node_real_init_matcher (GtkCssNode *node,
gtk_css_node_get_declaration (node));
}
-static GtkWidgetPath *
-gtk_css_path_node_real_create_widget_path (GtkCssNode *node)
-{
- GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
- GtkWidgetPath *path;
- guint length;
-
- if (path_node->path == NULL)
- path = gtk_widget_path_new ();
- else
- path = gtk_widget_path_copy (path_node->path);
-
- length = gtk_widget_path_length (path);
- if (length > 0)
- {
- gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
- path,
- length - 1);
- }
-
- return path;
-}
-
-static const GtkWidgetPath *
-gtk_css_path_node_real_get_widget_path (GtkCssNode *node)
-{
- GtkCssPathNode *path_node = GTK_CSS_PATH_NODE (node);
-
- return path_node->path;
-}
-
static GtkCssStyle *
gtk_css_path_node_update_style (GtkCssNode *cssnode,
GtkCssChange change,
@@ -122,8 +91,6 @@ gtk_css_path_node_class_init (GtkCssPathNodeClass *klass)
node_class->invalidate = gtk_css_path_node_invalidate;
node_class->update_style = gtk_css_path_node_update_style;
node_class->init_matcher = gtk_css_path_node_real_init_matcher;
- node_class->create_widget_path = gtk_css_path_node_real_create_widget_path;
- node_class->get_widget_path = gtk_css_path_node_real_get_widget_path;
node_class->get_style_provider = gtk_css_path_node_get_style_provider;
}
diff --git a/gtk/gtkcsstransientnode.c b/gtk/gtkcsstransientnode.c
index a8485f0858..218358005d 100644
--- a/gtk/gtkcsstransientnode.c
+++ b/gtk/gtkcsstransientnode.c
@@ -22,36 +22,6 @@
G_DEFINE_TYPE (GtkCssTransientNode, gtk_css_transient_node, GTK_TYPE_CSS_NODE)
-static GtkWidgetPath *
-gtk_css_transient_node_create_widget_path (GtkCssNode *node)
-{
- GtkWidgetPath *result;
- GtkCssNode *parent;
-
- parent = gtk_css_node_get_parent (node);
- if (parent == NULL)
- result = gtk_widget_path_new ();
- else
- result = gtk_css_node_create_widget_path (parent);
-
- gtk_widget_path_append_type (result, gtk_css_node_get_widget_type (node));
- gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node), result, -1);
-
- return result;
-}
-
-static const GtkWidgetPath *
-gtk_css_transient_node_get_widget_path (GtkCssNode *node)
-{
- GtkCssNode *parent;
-
- parent = gtk_css_node_get_parent (node);
- if (parent == NULL)
- return NULL;
-
- return gtk_css_node_get_widget_path (parent);
-}
-
static GtkCssStyle *
gtk_css_transient_node_update_style (GtkCssNode *cssnode,
GtkCssChange change,
@@ -67,8 +37,6 @@ gtk_css_transient_node_class_init (GtkCssTransientNodeClass *klass)
{
GtkCssNodeClass *node_class = GTK_CSS_NODE_CLASS (klass);
- node_class->create_widget_path = gtk_css_transient_node_create_widget_path;
- node_class->get_widget_path = gtk_css_transient_node_get_widget_path;
node_class->update_style = gtk_css_transient_node_update_style;
}
diff --git a/gtk/gtkcsswidgetnode.c b/gtk/gtkcsswidgetnode.c
index 142f6b2750..d71cd21f2d 100644
--- a/gtk/gtkcsswidgetnode.c
+++ b/gtk/gtkcsswidgetnode.c
@@ -38,20 +38,6 @@ gtk_css_widget_node_finalize (GObject *object)
G_OBJECT_CLASS (gtk_css_widget_node_parent_class)->finalize (object);
}
-static void
-gtk_css_widget_node_style_changed (GtkCssNode *cssnode,
- GtkCssStyleChange *change)
-{
- GtkCssWidgetNode *node;
-
- node = GTK_CSS_WIDGET_NODE (cssnode);
-
- if (node->widget)
- gtk_widget_clear_path (node->widget);
-
- GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->style_changed (cssnode, change);
-}
-
static gboolean
gtk_css_widget_node_queue_callback (GtkWidget *widget,
GdkFrameClock *frame_clock,
@@ -133,40 +119,6 @@ gtk_css_widget_node_init_matcher (GtkCssNode *node,
return GTK_CSS_NODE_CLASS (gtk_css_widget_node_parent_class)->init_matcher (node, matcher);
}
-static GtkWidgetPath *
-gtk_css_widget_node_create_widget_path (GtkCssNode *node)
-{
- GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
- GtkWidgetPath *path;
- guint length;
-
- if (widget_node->widget == NULL)
- path = gtk_widget_path_new ();
- else
- path = _gtk_widget_create_path (widget_node->widget);
-
- length = gtk_widget_path_length (path);
- if (length > 0)
- {
- gtk_css_node_declaration_add_to_widget_path (gtk_css_node_get_declaration (node),
- path,
- length - 1);
- }
-
- return path;
-}
-
-static const GtkWidgetPath *
-gtk_css_widget_node_get_widget_path (GtkCssNode *node)
-{
- GtkCssWidgetNode *widget_node = GTK_CSS_WIDGET_NODE (node);
-
- if (widget_node->widget == NULL)
- return NULL;
-
- return gtk_widget_get_path (widget_node->widget);
-}
-
static GtkStyleProvider *
gtk_css_widget_node_get_style_provider (GtkCssNode *node)
{
@@ -211,11 +163,8 @@ gtk_css_widget_node_class_init (GtkCssWidgetNodeClass *klass)
node_class->queue_validate = gtk_css_widget_node_queue_validate;
node_class->dequeue_validate = gtk_css_widget_node_dequeue_validate;
node_class->init_matcher = gtk_css_widget_node_init_matcher;
- node_class->create_widget_path = gtk_css_widget_node_create_widget_path;
- node_class->get_widget_path = gtk_css_widget_node_get_widget_path;
node_class->get_style_provider = gtk_css_widget_node_get_style_provider;
node_class->get_frame_clock = gtk_css_widget_node_get_frame_clock;
- node_class->style_changed = gtk_css_widget_node_style_changed;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]