Implement line terminators for text grids
authorP. F. Chimento <philip.chimento@gmail.com>
Sun, 1 May 2011 14:37:11 +0000 (16:37 +0200)
committerP. F. Chimento <philip.chimento@gmail.com>
Sun, 1 May 2011 14:37:11 +0000 (16:37 +0200)
This completes the 0.7.2 Glk specification, closing #2.

libchimara/input.c

index b43eae9b42c82055cb2ee0587ec9f2d5cf3f5694..e3f887b23052d38bf6657e38463a03ade49f7706 100644 (file)
@@ -815,6 +815,11 @@ on_input_entry_key_press_event(GtkEntry *input_entry, GdkEventKey *event, winid_
                g_signal_handler_unblock(input_entry, win->line_input_entry_changed);
                return TRUE;
        }
+       else if(g_slist_find(win->current_extra_line_terminators, GUINT_TO_POINTER(event->keyval)))
+       {
+               /* If this key was a line terminator, pretend we pressed enter */
+               on_input_entry_activate(input_entry, win);
+       }
        return FALSE;
 }