Skip to content
Snippets Groups Projects
Commit 6fd939ca authored by edgrif's avatar edgrif
Browse files

add code for --xremote-debug flag to turn debug messages on/off.

parent bf8204c8
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,9 @@
* Description: Private header for application level of zmap.
*
* HISTORY:
* Last edited: Dec 19 09:12 2008 (edgrif)
* Last edited: Mar 2 14:22 2010 (edgrif)
* Created: Thu Jul 24 14:35:41 2003 (edgrif)
* CVS info: $Id: zmapApp_P.h,v 1.27 2009-12-03 15:03:08 mh17 Exp $
* CVS info: $Id: zmapApp_P.h,v 1.28 2010-03-03 11:02:18 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_APP_PRIV_H
......@@ -102,9 +102,12 @@ typedef struct _ZMapAppContextStruct
char *locale;
gboolean sent_finalised ;
char *script_dir; /* where scripts are kept for the pipeServer module
* can be set in [ZMap] or defaults to run-time directory
*/
char *script_dir; /* where scripts are kept for the pipeServer module
* can be set in [ZMap] or defaults to run-time directory
*/
gboolean xremote_debug ; /* Turn on/off debugging for xremote connections. */
} ZMapAppContextStruct, *ZMapAppContext ;
......
......@@ -26,9 +26,9 @@
*
* Exported functions: None
* HISTORY:
* Last edited: Feb 4 16:20 2010 (edgrif)
* Last edited: Mar 2 14:31 2010 (edgrif)
* Created: Thu Jul 24 14:36:27 2003 (edgrif)
* CVS info: $Id: zmapAppwindow.c,v 1.67 2010-02-04 16:57:32 edgrif Exp $
* CVS info: $Id: zmapAppwindow.c,v 1.68 2010-03-03 11:02:18 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -694,42 +694,50 @@ static gboolean getConfiguration(ZMapAppContext app_context)
gboolean result = FALSE ;
ZMapConfigIniContext context;
if((context = zMapConfigIniContextProvide()))
if ((context = zMapConfigIniContextProvide()))
{
gboolean tmp_bool = FALSE;
char *tmp_string = NULL;
int tmp_int = 0;
/* Do we show the main window? */
if(zMapConfigIniContextGetBoolean(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_MAINWINDOW, &tmp_bool))
if (zMapConfigIniContextGetBoolean(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_MAINWINDOW, &tmp_bool))
app_context->show_mainwindow = tmp_bool;
else
app_context->show_mainwindow = TRUE;
/* How long to wait when closing, before timeout */
if(zMapConfigIniContextGetInt(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_EXIT_TIMEOUT, &tmp_int))
if (zMapConfigIniContextGetInt(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_EXIT_TIMEOUT, &tmp_int))
app_context->exit_timeout = tmp_int;
if(app_context->exit_timeout < 0)
if (app_context->exit_timeout < 0)
app_context->exit_timeout = ZMAP_DEFAULT_EXIT_TIMEOUT;
/* default sequence to display */
if(zMapConfigIniContextGetString(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_SEQUENCE, &tmp_string))
if (zMapConfigIniContextGetString(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_SEQUENCE, &tmp_string))
app_context->default_sequence = tmp_string;
/* help url to use */
if(zMapConfigIniContextGetString(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_HELP_URL, &tmp_string))
if (zMapConfigIniContextGetString(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_HELP_URL, &tmp_string))
zMapGUISetHelpURL( tmp_string );
/* locale to use */
if(zMapConfigIniContextGetString(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_LOCALE, &tmp_string))
if (zMapConfigIniContextGetString(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_LOCALE, &tmp_string))
app_context->locale = tmp_string;
/* Turn on/off debugging for xremote connection to peer client. */
if (zMapConfigIniContextGetBoolean(context, ZMAPSTANZA_APP_CONFIG, ZMAPSTANZA_APP_CONFIG,
ZMAPSTANZA_APP_XREMOTE_DEBUG, &tmp_bool))
{
app_context->xremote_debug = tmp_bool ;
zMapXRemoteSetDebug(app_context->xremote_debug) ;
}
zMapConfigIniContextDestroy(context);
result = TRUE;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment