Commit eda4ed5a authored by Claes Sjofors's avatar Claes Sjofors

Wb build xttgraph, Ge journal question removed

parent 5e9474b6
...@@ -256,14 +256,14 @@ void WNavGtk::create_popup_menu( pwr_tAttrRef aref, int x, int y) ...@@ -256,14 +256,14 @@ void WNavGtk::create_popup_menu( pwr_tAttrRef aref, int x, int y)
(create_popup_menu_cb)( parent_ctx, aref, x, y); (create_popup_menu_cb)( parent_ctx, aref, x, y);
} }
Ge *WNavGtk::ge_new( char *graph_name) Ge *WNavGtk::ge_new( char *graph_name, int nojournal)
{ {
unsigned int options; unsigned int options = 0;
if ( gbl.enable_comment) if ( gbl.enable_comment)
options = ge_mOption_EnableComment; options |= ge_mOption_EnableComment;
else if ( nojournal)
options = 0; options |= ge_mOption_IgnoreJournal;
GeGtk *ge = new GeGtk( NULL, toplevel, ldhses, 0, options, graph_name); GeGtk *ge = new GeGtk( NULL, toplevel, ldhses, 0, options, graph_name);
return ge; return ge;
......
...@@ -73,7 +73,7 @@ class WNavGtk : public WNav { ...@@ -73,7 +73,7 @@ class WNavGtk : public WNav {
void set_inputfocus( int focus); void set_inputfocus( int focus);
void trace_start(); void trace_start();
void set_selection_owner(); void set_selection_owner();
Ge *ge_new( char *graph_name); Ge *ge_new( char *graph_name, int nojournal);
WGe *wge_new( char *name, char *filename, char *object_name, WGe *wge_new( char *name, char *filename, char *object_name,
int modal); int modal);
void create_popup_menu( pwr_tAttrRef aref, int x, int y); void create_popup_menu( pwr_tAttrRef aref, int x, int y);
......
...@@ -263,14 +263,14 @@ void WNavMotif::create_popup_menu( pwr_tAttrRef aref, int x, int y) ...@@ -263,14 +263,14 @@ void WNavMotif::create_popup_menu( pwr_tAttrRef aref, int x, int y)
wnav_set_avoid_deadlock( this, 2000); wnav_set_avoid_deadlock( this, 2000);
} }
Ge *WNavMotif::ge_new( char *graph_name) Ge *WNavMotif::ge_new( char *graph_name, int nojournal)
{ {
unsigned int options; unsigned int options = 0;
if ( gbl.enable_comment) if ( gbl.enable_comment)
options = ge_mOption_EnableComment; options |= ge_mOption_EnableComment;
else if ( nojournal)
options = 0; options |= ge_mOption_IgnoreJournal;
GeMotif *ge = new GeMotif( NULL, parent_wid, ldhses, 0, options, graph_name); GeMotif *ge = new GeMotif( NULL, parent_wid, ldhses, 0, options, graph_name);
return ge; return ge;
......
...@@ -72,7 +72,7 @@ class WNavMotif : public WNav { ...@@ -72,7 +72,7 @@ class WNavMotif : public WNav {
void set_inputfocus( int focus); void set_inputfocus( int focus);
void trace_start(); void trace_start();
void set_selection_owner(); void set_selection_owner();
Ge *ge_new( char *graph_name); Ge *ge_new( char *graph_name, int nojournal);
WGe *wge_new( char *name, char *filename, char *object_name, WGe *wge_new( char *name, char *filename, char *object_name,
int modal); int modal);
void create_popup_menu( pwr_tAttrRef aref, int x, int y); void create_popup_menu( pwr_tAttrRef aref, int x, int y);
......
...@@ -731,7 +731,7 @@ void wb_build::xttgraph( pwr_tOid oid) ...@@ -731,7 +731,7 @@ void wb_build::xttgraph( pwr_tOid oid)
MsgWindow::message('W', cmd, msgw_ePop_No, oid); MsgWindow::message('W', cmd, msgw_ePop_No, oid);
} }
else { else {
Ge *gectx = m_wnav->ge_new( action); Ge *gectx = m_wnav->ge_new( action, 1);
strcpy( cmd, "export java"); strcpy( cmd, "export java");
m_sts = gectx->command( cmd); m_sts = gectx->command( cmd);
if ( evenSts()) { if ( evenSts()) {
...@@ -861,7 +861,7 @@ void wb_build::webgraph( pwr_tOid oid) ...@@ -861,7 +861,7 @@ void wb_build::webgraph( pwr_tOid oid)
MsgWindow::message('W', cmd, msgw_ePop_No, oid); MsgWindow::message('W', cmd, msgw_ePop_No, oid);
} }
else { else {
Ge *gectx = m_wnav->ge_new( graph_name); Ge *gectx = m_wnav->ge_new( graph_name, 1);
strcpy( cmd, "export java"); strcpy( cmd, "export java");
m_sts = gectx->command( cmd); m_sts = gectx->command( cmd);
if ( evenSts()) { if ( evenSts()) {
......
...@@ -75,7 +75,7 @@ static pwr_tStatus OpenObjectGraph ( ...@@ -75,7 +75,7 @@ static pwr_tStatus OpenObjectGraph (
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
cdh_ToLower( name, name); cdh_ToLower( name, name);
ip->wnav->ge_new( name); ip->wnav->ge_new( name, 0);
return PWRS__SUCCESS; return PWRS__SUCCESS;
} }
......
...@@ -317,7 +317,7 @@ class WNav : public WUtility{ ...@@ -317,7 +317,7 @@ class WNav : public WUtility{
virtual void set_inputfocus( int focus) {} virtual void set_inputfocus( int focus) {}
virtual void trace_start() {} virtual void trace_start() {}
virtual void set_selection_owner() {} virtual void set_selection_owner() {}
virtual Ge *ge_new( char *graph_name) { return 0;} virtual Ge *ge_new( char *graph_name, int nojournal) { return 0;}
virtual WGe *wge_new( char *name, char *filename, char *object_name, virtual WGe *wge_new( char *name, char *filename, char *object_name,
int modal) { return 0;} int modal) { return 0;}
virtual void create_popup_menu( pwr_tAttrRef aref, int x, int y) {} virtual void create_popup_menu( pwr_tAttrRef aref, int x, int y) {}
......
...@@ -66,9 +66,10 @@ GraphGtk::GraphGtk( ...@@ -66,9 +66,10 @@ GraphGtk::GraphGtk(
int xn_gdh_init_done, int xn_gdh_init_done,
const char *xn_object_name, const char *xn_object_name,
int xn_use_default_access, int xn_use_default_access,
unsigned int xn_default_access) : unsigned int xn_default_access,
unsigned int xn_options) :
Graph( xn_parent_ctx, xn_name, xn_default_path, graph_mode, xn_gdh_init_done, xn_object_name, Graph( xn_parent_ctx, xn_name, xn_default_path, graph_mode, xn_gdh_init_done, xn_object_name,
xn_use_default_access), parent_wid(xn_parent_wid) xn_use_default_access, xn_default_access, xn_options), parent_wid(xn_parent_wid)
{ {
default_access = xn_default_access; default_access = xn_default_access;
if ( scrollbar) { if ( scrollbar) {
......
...@@ -74,7 +74,8 @@ class GraphGtk : public Graph { ...@@ -74,7 +74,8 @@ class GraphGtk : public Graph {
int xn_gdh_init_done = 0, int xn_gdh_init_done = 0,
const char *xn_object_name = 0, const char *xn_object_name = 0,
int xn_use_default_access = 0, int xn_use_default_access = 0,
unsigned int xn_default_access = 0); unsigned int xn_default_access = 0,
unsigned int xn_options = 0);
void trace_timer_remove(); void trace_timer_remove();
void trace_timer_add( int time); void trace_timer_add( int time);
......
...@@ -2934,9 +2934,10 @@ GeGtk::GeGtk( void *x_parent_ctx, ...@@ -2934,9 +2934,10 @@ GeGtk::GeGtk( void *x_parent_ctx,
// Graph component // Graph component
int sts; int sts;
unsigned int opt = x_options & ge_mOption_IgnoreJournal ? graph_mOption_IgnoreJournal : 0;
graph = new GraphGtk( this, GTK_WIDGET(toplevel), "GraphGtk", &grow_widget, &sts, "pwrp_pop:", graph = new GraphGtk( this, GTK_WIDGET(toplevel), "GraphGtk", &grow_widget, &sts, "pwrp_pop:",
graph_eMode_Development, 1); graph_eMode_Development, 1, 0, 0, 0, 0, opt);
graph->message_cb = &Ge::message_cb; graph->message_cb = &Ge::message_cb;
graph->get_current_subgraph_cb = &Ge::subpalette_get_select; graph->get_current_subgraph_cb = &Ge::subpalette_get_select;
graph->get_current_colors_cb = &Ge::colorpalette_get_current; graph->get_current_colors_cb = &Ge::colorpalette_get_current;
......
...@@ -78,9 +78,10 @@ GraphMotif::GraphMotif( ...@@ -78,9 +78,10 @@ GraphMotif::GraphMotif(
int xn_gdh_init_done, int xn_gdh_init_done,
const char *xn_object_name, const char *xn_object_name,
int xn_use_default_access, int xn_use_default_access,
unsigned int xn_default_access) : unsigned int xn_default_access,
unsigned int xn_options) :
Graph( xn_parent_ctx, xn_name, xn_default_path, graph_mode, xn_gdh_init_done, xn_object_name, Graph( xn_parent_ctx, xn_name, xn_default_path, graph_mode, xn_gdh_init_done, xn_object_name,
xn_use_default_access), parent_wid(xn_parent_wid) xn_use_default_access, xn_default_access, xn_options), parent_wid(xn_parent_wid)
{ {
default_access = xn_default_access; default_access = xn_default_access;
if ( scrollbar) if ( scrollbar)
......
...@@ -72,7 +72,8 @@ class GraphMotif : public Graph { ...@@ -72,7 +72,8 @@ class GraphMotif : public Graph {
int xn_gdh_init_done = 0, int xn_gdh_init_done = 0,
const char *xn_object_name = 0, const char *xn_object_name = 0,
int xn_use_default_access = 0, int xn_use_default_access = 0,
unsigned int xn_default_access = 0); unsigned int xn_default_access = 0,
unsigned int xn_options = 0);
void trace_timer_remove(); void trace_timer_remove();
void trace_timer_add( int time); void trace_timer_add( int time);
......
...@@ -1569,8 +1569,11 @@ GeMotif::GeMotif( void *x_parent_ctx, ...@@ -1569,8 +1569,11 @@ GeMotif::GeMotif( void *x_parent_ctx,
XtManageChild( ge_widget); XtManageChild( ge_widget);
XtUnmanageChild( cmd_input); XtUnmanageChild( cmd_input);
unsigned int opt = x_options & ge_mOption_IgnoreJournal ? graph_mOption_IgnoreJournal : 0;
graph = new GraphMotif( this, graph_form, "", graph = new GraphMotif( this, graph_form, "",
&grow_widget, &sts, "pwrp_pop:"); &grow_widget, &sts, "pwrp_pop:", graph_eMode_Development,
1, 0, 0, 0, 0, opt);
graph->message_cb = &Ge::message_cb; graph->message_cb = &Ge::message_cb;
graph->get_current_subgraph_cb = &Ge::subpalette_get_select; graph->get_current_subgraph_cb = &Ge::subpalette_get_select;
graph->get_current_colors_cb = &Ge::colorpalette_get_current; graph->get_current_colors_cb = &Ge::colorpalette_get_current;
......
...@@ -69,7 +69,8 @@ typedef void *GlowCtx; ...@@ -69,7 +69,8 @@ typedef void *GlowCtx;
/* ge.h -- Simple graphic editor */ /* ge.h -- Simple graphic editor */
typedef enum { typedef enum {
ge_mOption_EnableComment = 1 ge_mOption_EnableComment = 1 << 0,
ge_mOption_IgnoreJournal = 1 << 1
} ge_mOption; } ge_mOption;
typedef struct { typedef struct {
......
...@@ -155,7 +155,8 @@ Graph::Graph( ...@@ -155,7 +155,8 @@ Graph::Graph(
int xn_gdh_init_done, int xn_gdh_init_done,
const char *xn_object_name, const char *xn_object_name,
int xn_use_default_access, int xn_use_default_access,
unsigned int xn_default_access) : unsigned int xn_default_access,
unsigned int xn_options) :
attr_list( 0, NULL), attr_list( 0, NULL),
parent_ctx(xn_parent_ctx), parent_ctx(xn_parent_ctx),
grow(0), grow_cnt(0), ldhses(0), journal(0), grow(0), grow_cnt(0), ldhses(0), journal(0),
...@@ -198,7 +199,7 @@ Graph::Graph( ...@@ -198,7 +199,7 @@ Graph::Graph(
strcpy( systemname, ""); strcpy( systemname, "");
// Create journal file // Create journal file
if ( mode == graph_eMode_Development) { if ( mode == graph_eMode_Development && !(xn_options & graph_mOption_IgnoreJournal)) {
int sts; int sts;
journal = new GraphJournal( this, &sts); journal = new GraphJournal( this, &sts);
......
...@@ -108,6 +108,10 @@ typedef enum { ...@@ -108,6 +108,10 @@ typedef enum {
graph_eMode_Runtime //!< Runtime mode. graph_eMode_Runtime //!< Runtime mode.
} graph_eMode; } graph_eMode;
typedef enum {
graph_mOption_IgnoreJournal = 1 << 0
} graph_mOption;
//! Databases //! Databases
typedef enum { typedef enum {
graph_eDatabase_Gdh, //!< Database rtdb. graph_eDatabase_Gdh, //!< Database rtdb.
...@@ -422,7 +426,8 @@ class Graph { ...@@ -422,7 +426,8 @@ class Graph {
int xn_gdh_init_done = 0, int xn_gdh_init_done = 0,
const char *xn_object_name = 0, const char *xn_object_name = 0,
int xn_use_default_access = 0, int xn_use_default_access = 0,
unsigned int xn_default_access = 0); unsigned int xn_default_access = 0,
unsigned int xn_options = 0);
virtual void trace_timer_remove() {} virtual void trace_timer_remove() {}
virtual void trace_timer_add( int time) {} virtual void trace_timer_add( int time) {}
......
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