Build in tracing by default and toggle on with ctrl-v

calculate-0.9.5
Ray Strode 16 years ago
parent c9ce142983
commit b738dda915

@ -42,6 +42,12 @@ PLYMOUTH_LIBS="-lm -ldl $IMAGE_LIBS"
AC_SUBST(PLYMOUTH_CFLAGS)
AC_SUBST(PLYMOUTH_LIBS)
AC_ARG_ENABLE(tracing, AS_HELP_STRING([--enable-tracing],[enable verbose tracing code]),enable_tracing=$enableval,enable_tracing=yes)
if test x$enable_tracing = xyes; then
AC_DEFINE(PLY_ENABLE_TRACING, 1, [Build in verbose debug tracing spew])
fi
AC_OUTPUT([Makefile
src/libply/Makefile
src/splash-plugins/Makefile

@ -478,8 +478,6 @@ main (int argc,
return EX_USAGE;
}
ply_toggle_tracing ();
state.loop = ply_event_loop_new ();
/* before do anything we need to make sure we have a working

@ -43,6 +43,7 @@
#include "ply-logger.h"
#include "ply-utils.h"
#define KEY_CTRL_V '\026'
#define KEY_ESCAPE '\033'
struct _ply_window
@ -89,6 +90,12 @@ process_keyboard_input (ply_window_t *window,
{
switch (key)
{
case KEY_CTRL_V:
ply_trace ("toggle verbose mode!");
ply_toggle_tracing ();
ply_trace ("verbose mode toggled!");
return;
case KEY_ESCAPE:
ply_trace ("escape key!");
if (window->escape_handler != NULL)

Loading…
Cancel
Save