Implemented line input in text grid windows using a GtkEntry.
[projects/chimara/chimara.git] / src / gridtest.c
index 92d3d0cddafd1402aeef9f316371665258da4cd3..4c59f1dda068aa9ac7cbb02ee62a3fc23b17e674 100644 (file)
@@ -63,7 +63,9 @@ void glk_main(void)
             break;
     }
     
-    fprintf(stderr, "Your string was: '%s'.\nPress another key to clear the window and exit.\n", buffer);
+       gchar *text = g_strndup(buffer, ev.val1);
+    fprintf(stderr, "Your string was: '%s'.\nPress another key to clear the window and exit.\n", text);
+       g_free(text);
     glk_request_char_event(mainwin);
     while(1) {
         glk_select(&ev);
@@ -73,4 +75,4 @@ void glk_main(void)
     
     glk_window_clear(mainwin);
     g_free(buffer);
-}
\ No newline at end of file
+}