Fixed buffers and grids sharing the same styles
authorP. F. Chimento <philip.chimento@gmail.com>
Wed, 17 Nov 2010 21:14:06 +0000 (22:14 +0100)
committerP. F. Chimento <philip.chimento@gmail.com>
Wed, 17 Nov 2010 21:14:06 +0000 (22:14 +0100)
Two separate text tags should be created, one for text buffers, the
other for grids. Otherwise they share each other's styles (i.e. reverse
video on text grids.)

libchimara/style.c

index 4785b9086e4d3c1e1f9aa9fcd3775636f6ef1318..74a64378c9b16d2012ad88a1ab8ed3834ebc5718 100644 (file)
@@ -376,7 +376,7 @@ style_init(ChimaraGlk *glk)
        for(i=0; i<style_NUMSTYLES; i++) {
                tag = gtk_text_tag_new(GLK_TAG_NAMES[i]);
                g_hash_table_insert(glk_text_grid_styles, (gchar*) GLK_TAG_NAMES[i], tag);
-               g_object_ref(tag); /* Add an extra reference since the tag is in two hashtables */
+               tag = gtk_text_tag_new(GLK_TAG_NAMES[i]);
                g_hash_table_insert(glk_text_buffer_styles, (gchar*) GLK_TAG_NAMES[i], tag);
        }