Commit acf2a1bc authored by Claes Sjofors's avatar Claes Sjofors

Xtt opplace, starup applications added, and layout option hide navigator

parent ce3413a5
This diff is collapsed.
...@@ -111,6 +111,16 @@ SObject pwrb:Type ...@@ -111,6 +111,16 @@ SObject pwrb:Type
Attr Value = 32 Attr Value = 32
EndBody EndBody
EndObject EndObject
!/**
! Hide the Navigator.
!*/
Object HideNavigator $Bit
Body SysBody
Attr PgmName = "HideNavigator"
Attr Text = "HideNavigator"
Attr Value = 64
EndBody
EndObject
EndObject EndObject
EndSObject EndSObject
......
...@@ -961,6 +961,8 @@ int OpGtk::configure( char *opplace_str) ...@@ -961,6 +961,8 @@ int OpGtk::configure( char *opplace_str)
if ( opplace_p->StartJavaProcess) if ( opplace_p->StartJavaProcess)
start_jop = 1; start_jop = 1;
// Store autostart array
memcpy( autostart_aref, opplace_p->AutoStart, sizeof(autostart_aref));
// Examine Graph objects // Examine Graph objects
for ( i = 0; i < sizeof(opplace_p->FastAvail)/sizeof(opplace_p->FastAvail[0]); i++) { for ( i = 0; i < sizeof(opplace_p->FastAvail)/sizeof(opplace_p->FastAvail[0]); i++) {
...@@ -975,7 +977,7 @@ int OpGtk::configure( char *opplace_str) ...@@ -975,7 +977,7 @@ int OpGtk::configure( char *opplace_str)
if ( tid != pwr_cClass_XttGraph) if ( tid != pwr_cClass_XttGraph)
continue; continue;
memset( &attrref, 0, sizeof(attrref)); memset( &attrref, 0, sizeof(attrref));
sts = gdh_ClassAttrToAttrref( pwr_cClass_XttGraph, ".ButtonText", &attrref); sts = gdh_ClassAttrToAttrref( pwr_cClass_XttGraph, ".ButtonText", &attrref);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
......
...@@ -94,8 +94,8 @@ void Op::scan() ...@@ -94,8 +94,8 @@ void Op::scan()
int Op::appl_action( int idx) int Op::appl_action( int idx)
{ {
char cmd[80]; pwr_tCmd cmd;
char name[80]; pwr_tAName name;
int sts; int sts;
if ( command_cb) { if ( command_cb) {
...@@ -363,3 +363,31 @@ void Op::sup_scan( void *data) ...@@ -363,3 +363,31 @@ void Op::sup_scan( void *data)
op->sup_timerid->add( time, sup_scan, op); op->sup_timerid->add( time, sup_scan, op);
} }
void Op::appl_startup()
{
pwr_tCmd cmd;
pwr_tAName name;
int sts;
if ( command_cb) {
if ( layout_mask & pwr_mOpWindLayoutMask_HideNavigator) {
strcpy( cmd, "close navigator");
command_cb( parent_ctx, cmd);
}
for ( unsigned int i = 0; i < sizeof(autostart_aref)/sizeof(autostart_aref[0]); i++) {
if ( cdh_ObjidIsNotNull( autostart_aref[i].Objid)) {
sts = gdh_AttrrefToName( &autostart_aref[i], name, sizeof(name),
cdh_mName_volumeStrict);
if ( ODD(sts)) {
strcpy( cmd, "ope gra/obj=");
strcat( cmd, name);
command_cb( parent_ctx, cmd);
}
}
}
}
}
...@@ -98,6 +98,7 @@ class Op { ...@@ -98,6 +98,7 @@ class Op {
pwr_tAttrRef button_aref[25]; pwr_tAttrRef button_aref[25];
int button_cnt; int button_cnt;
int start_jop; int start_jop;
pwr_tAttrRef autostart_aref[25];
Jop *jop; Jop *jop;
void (*command_cb)( void *, char *); void (*command_cb)( void *, char *);
void (*map_cb)( void *); void (*map_cb)( void *);
...@@ -129,6 +130,7 @@ class Op { ...@@ -129,6 +130,7 @@ class Op {
int appl_action( int idx); int appl_action( int idx);
int jop_command( char *command); int jop_command( char *command);
int sup_init(); int sup_init();
void appl_startup();
void activate_exit(); void activate_exit();
void activate_aalarm_ack(); void activate_aalarm_ack();
void activate_balarm_ack(); void activate_balarm_ack();
......
...@@ -2867,6 +2867,7 @@ static int xnav_open_func( void *client_data, ...@@ -2867,6 +2867,7 @@ static int xnav_open_func( void *client_data,
xnav->op->add_close_button(); xnav->op->add_close_button();
strcpy( xnav->opplace_name, opplace_str); strcpy( xnav->opplace_name, opplace_str);
xnav->op->set_title( xnav->user); xnav->op->set_title( xnav->user);
xnav->op->appl_startup();
// Load eventlist // Load eventlist
if ( xnav->ev) { if ( xnav->ev) {
......
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