From 23ec84ef6b7312ce7a1d5e7bc8aa1de5059a84aa Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Mon, 2 May 2016 12:09:45 +0200 Subject: [PATCH] option -debug-gui to textlog --- common/utils/T/tracer/gui/x.c | 2 +- common/utils/T/tracer/remote.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/utils/T/tracer/gui/x.c b/common/utils/T/tracer/gui/x.c index f29a0c6adb..bbc51e8a94 100644 --- a/common/utils/T/tracer/gui/x.c +++ b/common/utils/T/tracer/gui/x.c @@ -189,7 +189,7 @@ void x_events(gui *_gui) } break; #endif - default: WARN("TODO: X event type %d\n", ev.type); break; + default: if (gui_logd) WARN("TODO: X event type %d\n", ev.type); break; } } diff --git a/common/utils/T/tracer/remote.c b/common/utils/T/tracer/remote.c index e99bcf2c36..85112bf6eb 100644 --- a/common/utils/T/tracer/remote.c +++ b/common/utils/T/tracer/remote.c @@ -59,7 +59,8 @@ void usage(void) " they will be processed in order\n" " by default, all is off\n" " -p use given port (default %d)\n" -" -x GUI output\n", +" -x GUI output\n" +" -debug-gui active GUI debug logs\n", DEFAULT_REMOTE_PORT ); exit(1); @@ -102,6 +103,7 @@ static void *gui_thread(void *_g) int main(int n, char **v) { + extern int volatile gui_logd; char *database_filename = NULL; void *database; int port = DEFAULT_REMOTE_PORT; @@ -138,6 +140,7 @@ int main(int n, char **v) if (!strcmp(v[i], "-OFF")) { on_off_name[on_off_n]=NULL; on_off_action[on_off_n++]=0; continue; } if (!strcmp(v[i], "-x")) { gui_mode = 1; continue; } + if (!strcmp(v[i], "-debug-gui")) { gui_logd = 1; continue; } usage(); }