forked from AuroraMiddleware/gtk
cssnode: Drop the node-added/-removed signals
These are no longer used, and the children-observer listmodel is a better approach for monitoring the children.
This commit is contained in:
parent
dbe04adb1a
commit
5fa027ab8a
@ -98,8 +98,6 @@
|
||||
G_DEFINE_TYPE (GtkCssNode, gtk_css_node, G_TYPE_OBJECT)
|
||||
|
||||
enum {
|
||||
NODE_ADDED,
|
||||
NODE_REMOVED,
|
||||
STYLE_CHANGED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@ -567,32 +565,6 @@ gtk_css_node_class_init (GtkCssNodeClass *klass)
|
||||
klass->node_removed = gtk_css_node_real_node_removed;
|
||||
klass->style_changed = gtk_css_node_real_style_changed;
|
||||
|
||||
cssnode_signals[NODE_ADDED] =
|
||||
g_signal_new (I_("node-added"),
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkCssNodeClass, node_added),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__OBJECT_OBJECT,
|
||||
G_TYPE_NONE, 2,
|
||||
GTK_TYPE_CSS_NODE, GTK_TYPE_CSS_NODE);
|
||||
g_signal_set_va_marshaller (cssnode_signals[NODE_ADDED],
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_VOID__OBJECT_OBJECTv);
|
||||
|
||||
cssnode_signals[NODE_REMOVED] =
|
||||
g_signal_new (I_("node-removed"),
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkCssNodeClass, node_removed),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__OBJECT_OBJECT,
|
||||
G_TYPE_NONE, 2,
|
||||
GTK_TYPE_CSS_NODE, GTK_TYPE_CSS_NODE);
|
||||
g_signal_set_va_marshaller (cssnode_signals[NODE_REMOVED],
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
_gtk_marshal_VOID__OBJECT_OBJECTv);
|
||||
|
||||
cssnode_signals[STYLE_CHANGED] =
|
||||
g_signal_new (I_("style-changed"),
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
@ -742,7 +714,7 @@ gtk_css_node_reposition (GtkCssNode *node,
|
||||
|
||||
if (old_parent != NULL)
|
||||
{
|
||||
g_signal_emit (old_parent, cssnode_signals[NODE_REMOVED], 0, node, node->previous_sibling);
|
||||
GTK_CSS_NODE_GET_CLASS (old_parent)->node_removed (old_parent, node, node->previous_sibling);
|
||||
if (old_parent->first_child && node->visible)
|
||||
gtk_css_node_invalidate (old_parent->first_child, GTK_CSS_CHANGE_NTH_LAST_CHILD);
|
||||
}
|
||||
@ -779,7 +751,7 @@ gtk_css_node_reposition (GtkCssNode *node,
|
||||
|
||||
if (new_parent)
|
||||
{
|
||||
g_signal_emit (new_parent, cssnode_signals[NODE_ADDED], 0, node, previous);
|
||||
GTK_CSS_NODE_GET_CLASS (new_parent)->node_added (new_parent, node, previous);
|
||||
if (node->visible)
|
||||
gtk_css_node_invalidate (new_parent->first_child, GTK_CSS_CHANGE_NTH_LAST_CHILD);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user