From 19c44967cbd03069919a32a1822744b07ac73354 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 17 Jun 2011 04:40:17 +0200 Subject: [PATCH] cssprovider: Remove dead code The code isn't used anymore since the introduction of rulesets. --- gtk/gtkcssprovider.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 30c5b79934..1c5ed95623 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -970,8 +970,6 @@ struct _GtkCssScanner GFile *file; GFile *base; GSList *state; - GSList *cur_selectors; - GHashTable *cur_properties; }; struct _GtkCssProviderPrivate @@ -1218,36 +1216,15 @@ gtk_css_ruleset_matches (GtkCssRuleset *ruleset, return _gtk_css_selector_matches (ruleset->selector, path, length); } -static void -gtk_css_scanner_reset (GtkCssScanner *scanner) -{ - g_slist_free (scanner->state); - scanner->state = NULL; - - g_slist_free_full (scanner->cur_selectors, (GDestroyNotify) _gtk_css_selector_free); - scanner->cur_selectors = NULL; - - if (scanner->cur_properties) - g_hash_table_unref (scanner->cur_properties); - - scanner ->cur_properties = g_hash_table_new_full (g_str_hash, - g_str_equal, - (GDestroyNotify) g_free, - (GDestroyNotify) property_value_free); -} - static void gtk_css_scanner_destroy (GtkCssScanner *scanner) { g_assert (scanner->sections == NULL); - gtk_css_scanner_reset (scanner); - g_object_unref (scanner->provider); if (scanner->file) g_object_unref (scanner->file); g_object_unref (scanner->base); - g_hash_table_destroy (scanner->cur_properties); _gtk_css_parser_free (scanner->parser); g_slice_free (GtkCssScanner, scanner); @@ -1296,11 +1273,6 @@ gtk_css_scanner_new (GtkCssProvider *provider, g_free (dir); } - scanner->cur_properties = g_hash_table_new_full (g_str_hash, - g_str_equal, - (GDestroyNotify) g_free, - (GDestroyNotify) property_value_free); - scanner->parser = _gtk_css_parser_new (data, gtk_css_scanner_parser_error, scanner);