Fixed buffers and grids sharing the same styles
[projects/chimara/chimara.git] / libchimara / style.c
index 0aa4db282bccbcc031d3d4f9dccae2a6450d6b96..74a64378c9b16d2012ad88a1ab8ed3834ebc5718 100644 (file)
@@ -38,8 +38,8 @@ glk_set_style(glui32 styl)
        glk_set_style_stream(glk_data->current_stream, styl);
 }
 
+/* The first 11 tag names must correspond to the first 11 glk tag names as defined below */
 static const gchar* TAG_NAMES[] = {
-       "default",
        "normal",
        "emphasized",
        "preformatted",
@@ -52,9 +52,11 @@ static const gchar* TAG_NAMES[] = {
        "user1",
        "user2",
        "hyperlink",
-       "pager"
+       "pager",
+       "default"
 };
 
+/* The first 11 glk tag names must correspond to the first 11 tag names as defined above */
 static const gchar* GLK_TAG_NAMES[] = {
        "glk-normal",
        "glk-emphasized",
@@ -374,6 +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);
+               tag = gtk_text_tag_new(GLK_TAG_NAMES[i]);
                g_hash_table_insert(glk_text_buffer_styles, (gchar*) GLK_TAG_NAMES[i], tag);
        }