X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=src%2Fwindow.c;h=204daa566c8868714d98d18e5ddf9a856f20b8e2;hb=e47eebee2f127d0c1d4825d9bdc41471b6d7f3c1;hp=66d708bfc2b722503281e1ec335ab70f7ff7ae32;hpb=e7b655fa76e4a42b1a0228bd7e9290998a1fbeae;p=rodin%2Fchimara.git diff --git a/src/window.c b/src/window.c index 66d708b..204daa5 100644 --- a/src/window.c +++ b/src/window.c @@ -217,7 +217,6 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, { GtkWidget *scrolledwindow = gtk_scrolled_window_new(NULL, NULL); GtkWidget *textview = gtk_text_view_new(); - GtkTextBuffer *textbuffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(textview) ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_NEVER ); @@ -237,7 +236,7 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, win->frame = scrolledwindow; text_window_get_char_size( textview, &(win->unit_width), &(win->unit_height) ); - /* Set the other parameters */ + /* Set the other parameters (width and height are set later) */ win->window_stream = window_stream_new(win); win->echo_stream = NULL; win->input_request_type = INPUT_REQUEST_NONE; @@ -247,15 +246,6 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, /* Connect signal handlers */ win->keypress_handler = g_signal_connect( G_OBJECT(textview), "key-press-event", G_CALLBACK(on_window_key_press_event), win ); g_signal_handler_block( G_OBJECT(textview), win->keypress_handler ); - - win->insert_text_handler = g_signal_connect( G_OBJECT(textview), "key-press-event", G_CALLBACK(on_text_grid_key_press_event), win ); - g_signal_handler_block( G_OBJECT(textview), win->insert_text_handler ); - - /* Create a tag to indicate an editable field in the window (for line input) */ - gtk_text_buffer_create_tag(textbuffer, "input_field", - "background", "grey", "background-set", TRUE, - "editable", TRUE, "editable-set", TRUE, - NULL); } break; @@ -395,7 +385,7 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype, } win->width = (glui32)(win->widget->allocation.width / win->unit_width); win->height = (glui32)(win->widget->allocation.height / win->unit_height); - + /* Mark the cursor position */ GtkTextIter begin; GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(win->widget) );