From db8f0672e461459093412739cbe14a24084d000c Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sun, 13 Sep 2009 18:44:57 +0000 Subject: [PATCH] Fixed bug in text grid line input that obscured a new bug in the multisession code. Fixed the new bug too. git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@123 ddfedd41-794f-dd11-ae45-00112f111e67 --- libchimara/input.c | 4 ++-- tests/main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libchimara/input.c b/libchimara/input.c index ab1eef5..8ab3f41 100644 --- a/libchimara/input.c +++ b/libchimara/input.c @@ -493,7 +493,7 @@ static int flush_text_grid(winid_t win) { VALID_WINDOW(win, return 0); - g_return_val_if_fail(win->type == wintype_TextBuffer, 0); + g_return_val_if_fail(win->type == wintype_TextGrid, 0); GtkTextBuffer *buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(win->widget) ); @@ -554,6 +554,6 @@ on_input_entry_activate(GtkEntry *input_entry, winid_t win) g_signal_handler_block( G_OBJECT(win->widget), win->keypress_handler ); int chars_written = flush_text_grid(win); - event_throw(CHIMARA_GLK(gtk_widget_get_ancestor(GTK_WIDGET(input_entry), CHIMARA_TYPE_GLK)), evtype_LineInput, win, chars_written, 0); + event_throw(CHIMARA_GLK(gtk_widget_get_ancestor(win->widget, CHIMARA_TYPE_GLK)), evtype_LineInput, win, chars_written, 0); } diff --git a/tests/main.c b/tests/main.c index 94755c8..5fbd624 100644 --- a/tests/main.c +++ b/tests/main.c @@ -154,7 +154,7 @@ main(int argc, char *argv[]) g_object_unref( G_OBJECT(builder) ); g_object_unref( G_OBJECT(uimanager) ); - if( !chimara_glk_run(CHIMARA_GLK(glk), "../interpreters/frotz/.libs/frotz.so", argc, argv, &error) ) { + if( !chimara_glk_run(CHIMARA_GLK(glk), ".libs/gridtest.so"/*"../interpreters/frotz/.libs/frotz.so"*/, argc, argv, &error) ) { error_dialog(GTK_WINDOW(window), error, "Error starting Glk library: "); return 1; } -- 2.30.2