int exited;
struct unicode_data ucsdata;
Config cfg;
+ void *eventlogstuff;
};
struct draw_ctx {
void logevent(void *frontend, char *string)
{
- /*
- * This is not a very helpful function: events are logged
- * pretty much exclusively by the back end, and our pty back
- * end is self-contained. So we need do nothing.
- */
+ Terminal *term = (Terminal *)frontend;
+ struct gui_data *inst = (struct gui_data *)term->frontend;
+
+ log_eventlog(inst->logctx, string);
+
+ logevent_dlg(inst->eventlogstuff, string);
}
int font_dimension(void *frontend, int which)/* 0 for width, 1 for height */
about_box();
}
+void event_log_menuitem(GtkMenuItem *item, gpointer data)
+{
+ struct gui_data *inst = (struct gui_data *)data;
+ showeventlog(inst->eventlogstuff, inst->window);
+}
+
void update_specials_menu(void *frontend)
{
Terminal *term = (Terminal *)frontend;
{
GtkWidget *menuitem;
char *s;
+ extern const int use_event_log;
inst->menu = gtk_menu_new();
gtk_signal_connect(GTK_OBJECT(menuitem), "activate", \
GTK_SIGNAL_FUNC(func), inst); \
} while (0)
+ if (use_event_log)
+ MKMENUITEM("Event Log", event_log_menuitem);
MKMENUITEM("Special Commands", NULL);
inst->specialsmenu = gtk_menu_new();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), inst->specialsmenu);
inst->currcursor = inst->textcursor;
show_mouseptr(inst, 1);
+ inst->eventlogstuff = eventlogstuff_new();
+
inst->term = term_init(&inst->cfg, &inst->ucsdata, inst);
inst->logctx = log_init(inst, &inst->cfg);
term_provide_logctx(inst->term, inst->logctx);