From 0ce15daa50a3fe259576430e99f3d6324a5716c6 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sat, 24 Oct 2009 09:19:56 +0000 Subject: [PATCH 1/1] Avoid compilation warnings git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@149 ddfedd41-794f-dd11-ae45-00112f111e67 --- libchimara/chimara-glk.c | 5 ++++- libchimara/style.c | 14 ++++++++++++++ libchimara/style.h | 14 -------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index 45031d9..d8f071d 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -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); } diff --git a/libchimara/style.c b/libchimara/style.c index f6093d9..1b13e61 100644 --- a/libchimara/style.c +++ b/libchimara/style.c @@ -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) diff --git a/libchimara/style.h b/libchimara/style.h index 4f67973..7dc507f 100644 --- a/libchimara/style.h +++ b/libchimara/style.h @@ -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; -- 2.30.2