Commit 5bdf3ce5 authored by Claes Sjofors's avatar Claes Sjofors

Ge command 'disable log' added

parent 6a1cfc97
......@@ -267,6 +267,7 @@ void Ge::save_graph( Ge *gectx, char *name)
}
unsigned int opt = (gectx->options & ge_mOption_EnableComment) ? log_mOption_Comment : 0;
if ( !gectx->graph->disable_log)
wb_log::log( wlog_eCategory_GeSave, graphname, 0, opt);
}
......@@ -521,14 +522,17 @@ void Ge::export_gejava( Ge *gectx, char *name)
gectx->graph->get_name( gname);
if ( gectx->graph->is_javaapplication() && gectx->graph->is_javaapplet()) {
gectx->message( 'I', "Java frame and applet exported");
if ( !gectx->graph->disable_log)
wb_log::log( wlog_eCategory_GeExport, gname, 0);
}
else if ( gectx->graph->is_javaapplication()) {
gectx->message( 'I', "Java frame exported");
if ( !gectx->graph->disable_log)
wb_log::log( wlog_eCategory_GeExport, gname, 0);
}
else if ( gectx->graph->is_javaapplet()) {
gectx->message( 'I', "Java applet exported");
if ( !gectx->graph->disable_log)
wb_log::log( wlog_eCategory_GeExport, gname, 0);
}
else
......
......@@ -167,7 +167,7 @@ Graph::Graph(
graph_object_scan(0), graph_object_close(0), local_db(0),
use_default_access(xn_use_default_access),
default_access(xn_default_access), keep_mode(false),
subgraph_dyn(0), was_subgraph(0)
subgraph_dyn(0), was_subgraph(0), disable_log(0)
{
cdh_StrncpyCutOff( name, xn_name, sizeof(name), 1);
strcpy( default_path, xn_default_path);
......
......@@ -506,6 +506,7 @@ class Graph {
char java_path[80]; //!< Path for generated java code for baseclasses
char java_package[80]; //!< Package for generated java code for baseclasses
vector<GraphRef> reflist; //!< List with stored references
int disable_log; //!< Disable wb log window
//! Print to postscript file.
/*! \param filename Name of postscript file. */
......
......@@ -91,6 +91,8 @@ static int graph_export_func( void *client_data,
void *client_flag);
static int graph_replace_func( void *client_data,
void *client_flag);
static int graph_disable_func(void *client_data,
void *client_flag);
static int graph_convert_func( void *client_data,
void *client_flag);
......@@ -200,6 +202,11 @@ dcli_tCmdTable graph_command_table[] = {
&graph_export_func,
{"dcli_arg1", ""}
},
{
"DISABLE",
&graph_disable_func,
{"dcli_arg1", ""}
},
{"",}};
static void graph_store_graph( Graph *graph)
......@@ -2336,6 +2343,29 @@ static int graph_convert_func( void *client_data,
return GE__SUCCESS;
}
static int graph_disable_func( void *client_data,
void *client_flag)
{
Graph *graph = (Graph *)client_data;
char arg1_str[80];
int arg1_sts;
arg1_sts = dcli_get_qualifier( "dcli_arg1", arg1_str, sizeof(arg1_str));
if ( cdh_NoCaseStrncmp( arg1_str, "LOG", strlen( arg1_str)) == 0)
{
graph->disable_log = 1;
graph->message( 'I', "Log disabled");
}
else
{
graph->message('E', "Syntax error");
return GE__SYNTAX;
}
return GE__SUCCESS;
}
static int graph_replace_func( void *client_data,
void *client_flag)
{
......
Markdown is supported
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