X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fwindow.c;h=edb241f88a4c34fdf34369409c3da24ecccbae3d;hb=0c75df5f3c9b9dce26f54dfceaefd71a48a8a392;hp=574069043e77238960dfe7b252626988a7ff1b0f;hpb=1acbb531d46b046cf124a8c24ad6d16a1c3856aa;p=rodin%2Fchimara.git diff --git a/libchimara/window.c b/libchimara/window.c index 5740690..edb241f 100644 --- a/libchimara/window.c +++ b/libchimara/window.c @@ -474,7 +474,8 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, gtk_text_view_set_editable( GTK_TEXT_VIEW(textview), FALSE ); gtk_widget_show(textview); - /* Set the window's font */ + /* Create the styles available to the window stream */ + style_init_textgrid(textbuffer); gtk_widget_modify_font( textview, get_current_font(wintype) ); win->widget = textview; @@ -496,9 +497,6 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, gtk_widget_add_events( textview, GDK_BUTTON_RELEASE_MASK ); win->mouse_click_handler = g_signal_connect_after( G_OBJECT(textview), "button-release-event", G_CALLBACK(on_window_button_release_event), win ); g_signal_handler_block( textview, win->mouse_click_handler ); - - /* Create the styles available to the window stream */ - style_init_textgrid(textbuffer); } break; @@ -519,7 +517,8 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, gtk_container_add( GTK_CONTAINER(scrolledwindow), textview ); gtk_widget_show_all(scrolledwindow); - /* Set the window's font */ + /* Create the styles available to the window stream */ + style_init_textbuffer(textbuffer); gtk_widget_modify_font( textview, get_current_font(wintype) ); win->widget = textview; @@ -548,9 +547,6 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, (for line input) */ gtk_text_buffer_create_tag(textbuffer, "uneditable", "editable", FALSE, "editable-set", TRUE, NULL); - /* Create the styles available to the window stream */ - style_init_textbuffer(textbuffer); - /* Mark the position where the user will input text */ GtkTextIter end; gtk_text_buffer_get_end_iter(textbuffer, &end);