Avoid compilation warnings
authorfliep <fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Sat, 24 Oct 2009 09:19:56 +0000 (09:19 +0000)
committerfliep <fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Sat, 24 Oct 2009 09:19:56 +0000 (09:19 +0000)
libchimara/chimara-glk.c
libchimara/style.c
libchimara/style.h

index 45031d9178767b51c63bbf535d67c1a2c9552be3..d8f071d5efa6bd25b63ee4fd68188bf018b3543d 100644 (file)
@@ -197,7 +197,10 @@ chimara_glk_finalize(GObject *object)
        pango_font_description_free(priv->default_font_desc);
        pango_font_description_free(priv->monospace_font_desc);
        g_free(priv->current_dir);
-       g_hash_table_destroy(priv->default_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_OBJECT_CLASS(chimara_glk_parent_class)->finalize(object);
 }
index f6093d9a0884c6d3dc5ca8134aaf4326a82506fa..1b13e61e7ebbd4fbf77f24c17bf92a9478602e7e 100644 (file)
@@ -33,6 +33,20 @@ glk_set_style(glui32 styl)
        glk_set_style_stream(glk_data->current_stream, styl);
 }
 
+static const gchar* TAG_NAMES[] = {
+       "normal",
+       "emphasized",
+       "preformatted",
+       "header",
+       "subheader",
+       "alert",
+       "note",
+       "block-quote",
+       "input",
+       "user1",
+       "user2"
+};
+
 /* Internal function: mapping from style enum to tag name */
 static gchar*
 get_tag_name(glui32 style)
index 4f6797339a72144e0dbc6b2f0be4733ad15371b4..7dc507f0abaaa3c1dee2212e4ce1aec2f9b9a32e 100644 (file)
@@ -14,20 +14,6 @@ G_GNUC_INTERNAL void style_init_textbuffer(GtkTextBuffer *buffer);
 G_GNUC_INTERNAL void style_init_textgrid(GtkTextBuffer *buffer);
 G_GNUC_INTERNAL void style_init();
 
-static const gchar* TAG_NAMES[] = {
-       "normal",
-       "emphasized",
-       "preformatted",
-       "header",
-       "subheader",
-       "alert",
-       "note",
-       "block-quote",
-       "input",
-       "user1",
-       "user2"
-};
-
 typedef struct StyleSet {
        GHashTable *text_grid;
        GHashTable *text_buffer;