diff --git a/src/st/st-theme-context.c b/src/st/st-theme-context.c index 55e856f26..f10737b80 100644 --- a/src/st/st-theme-context.c +++ b/src/st/st-theme-context.c @@ -290,22 +290,6 @@ on_icon_theme_changed (StTextureCache *cache, g_source_set_name_by_id (id, "[gnome-shell] changed_idle"); } -static void -on_custom_stylesheets_changed (StTheme *theme, - StThemeContext *context) -{ - GHashTableIter iter; - StThemeNode *node; - - if (context->root_node) - _st_theme_node_reset_for_stylesheet_change (context->root_node); - - g_hash_table_iter_init (&iter, context->nodes); - - while (g_hash_table_iter_next (&iter, (gpointer *) &node, NULL)) - _st_theme_node_reset_for_stylesheet_change (node); -} - /** * st_theme_context_get_for_stage: * @stage: a #ClutterStage @@ -358,9 +342,10 @@ st_theme_context_set_theme (StThemeContext *context, if (context->theme) { context->stylesheets_changed_id = - g_signal_connect (context->theme, "custom-stylesheets-changed", - G_CALLBACK (on_custom_stylesheets_changed), - context); + g_signal_connect_swapped (context->theme, + "custom-stylesheets-changed", + G_CALLBACK (st_theme_context_changed), + context); } st_theme_context_changed (context); diff --git a/src/st/st-theme-node-private.h b/src/st/st-theme-node-private.h index dedb3cc8f..753348261 100644 --- a/src/st/st-theme-node-private.h +++ b/src/st/st-theme-node-private.h @@ -125,7 +125,6 @@ void _st_theme_node_ensure_background (StThemeNode *node); void _st_theme_node_ensure_geometry (StThemeNode *node); void _st_theme_node_apply_margins (StThemeNode *node, ClutterActor *actor); -void _st_theme_node_reset_for_stylesheet_change (StThemeNode *node); G_END_DECLS diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index 85e5dbe41..ca9675895 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -77,13 +77,6 @@ maybe_free_properties (StThemeNode *node) } } -void -_st_theme_node_reset_for_stylesheet_change (StThemeNode *node) -{ - maybe_free_properties (node); - node->properties_computed = FALSE; -} - static void st_theme_node_dispose (GObject *gobject) {