X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Fchimara-glk.c;h=625460243e7caa9579e2b2138f29993b8464a2d9;hp=b422ef1792c1f14e5c7cf563babb1b612e21effc;hb=268cb7d6d08efc2fcbe52aa7b1e0d27ec19b6dc0;hpb=86bf905d2bf441c655a57d46e9260da8a3237b47 diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index b422ef1..6254602 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -156,8 +156,8 @@ chimara_glk_init(ChimaraGlk *self) priv->self = self; priv->interactive = TRUE; priv->protect = FALSE; - priv->default_styles = g_new0(StyleSet,1); - priv->current_styles = g_new0(StyleSet,1); + priv->styles = g_new0(StyleSet,1); + priv->glk_styles = g_new0(StyleSet,1); priv->pager_attr_list = pango_attr_list_new(); priv->final_message = g_strdup("[ The game has finished ]"); priv->running = FALSE; @@ -257,10 +257,10 @@ chimara_glk_finalize(GObject *object) /* Free widget properties */ g_free(priv->final_message); /* Free styles */ - g_hash_table_destroy(priv->default_styles->text_buffer); - g_hash_table_destroy(priv->default_styles->text_grid); - g_hash_table_destroy(priv->current_styles->text_buffer); - g_hash_table_destroy(priv->current_styles->text_grid); + g_hash_table_destroy(priv->styles->text_buffer); + g_hash_table_destroy(priv->styles->text_grid); + g_hash_table_destroy(priv->glk_styles->text_buffer); + g_hash_table_destroy(priv->glk_styles->text_grid); pango_attr_list_unref(priv->pager_attr_list); /* Free the event queue */ @@ -1067,10 +1067,6 @@ chimara_glk_set_css_from_file(ChimaraGlk *glk, const gchar *filename, GError **e scanner->input_name = filename; scan_css_file(scanner, glk); - /* Set the current style to a copy of the default style */ - /* FIXME this is not correct */ - copy_default_styles_to_current_styles(glk); - if(close(fd) == -1) { *error = g_error_new(G_IO_ERROR, g_io_error_from_errno(errno), _("Error closing file \"%s\": %s"), filename, g_strerror(errno)); @@ -1099,10 +1095,6 @@ chimara_glk_set_css_from_string(ChimaraGlk *glk, const gchar *css) g_scanner_input_text(scanner, css, strlen(css)); scanner->input_name = ""; scan_css_file(scanner, glk); - - /* Set the current style to a copy of the default style */ - /* FIXME this is not correct */ - copy_default_styles_to_current_styles(glk); } /**