Commit 599ba28d authored by Claes Sjofors's avatar Claes Sjofors

Xtt default OpPlace changed from name 'OpDefault' to attribute IsDefaultOp in OpPlace object

parent 070021c9
...@@ -331,13 +331,14 @@ SObject pwrb:Class ...@@ -331,13 +331,14 @@ SObject pwrb:Class
EndBody EndBody
EndObject EndObject
!/** !/**
! Obsolete from V4.7.0. ! @Summary Used as default OpPlace if no specific OpPlace is specified.
! An OpPlace object can be specified as an argument to rt_xtt when
! rt_xtt is started. If no OpPlace is specified, the OpPlace object
! where IsDefaultOp is set, will be used.
!*/ !*/
Object OpNumber $Attribute 2 Object IsDefaultOp $Attribute 50
Body SysBody Body SysBody
Attr TypeRef = "pwrs:Type-$Int32" Attr TypeRef = "pwrs:Type-$Boolean"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_RTHIDE
EndBody EndBody
EndObject EndObject
EndObject EndObject
......
...@@ -53,6 +53,7 @@ static pwr_tStatus PostCreate ( ...@@ -53,6 +53,7 @@ static pwr_tStatus PostCreate (
pwr_tStatus sts; pwr_tStatus sts;
pwr_tObjName name; pwr_tObjName name;
pwr_tMask value = 1; pwr_tMask value = 1;
pwr_tBoolean bvalue = 1;
int size; int size;
sts = ldh_ObjidToName( Session, Object, ldh_eName_Object, sts = ldh_ObjidToName( Session, Object, ldh_eName_Object,
...@@ -65,6 +66,10 @@ static pwr_tStatus PostCreate ( ...@@ -65,6 +66,10 @@ static pwr_tStatus PostCreate (
sts = ldh_SetObjectPar( Session, Object, "RtBody", sts = ldh_SetObjectPar( Session, Object, "RtBody",
"OpWindLayout", (char *) &value, sizeof(value)); "OpWindLayout", (char *) &value, sizeof(value));
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
sts = ldh_SetObjectPar( Session, Object, "RtBody",
"IsDefaultOp", (char *) &value, sizeof(bvalue));
if ( EVEN(sts)) return sts;
} }
return PWRS__SUCCESS; return PWRS__SUCCESS;
......
...@@ -696,7 +696,6 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) : ...@@ -696,7 +696,6 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
if ( select_opplace) { if ( select_opplace) {
// Check if there is only one single opplace // Check if there is only one single opplace
pwr_tOName fullname; pwr_tOName fullname;
pwr_tObjName name;
pwr_tStatus sts; pwr_tStatus sts;
pwr_tOid oid; pwr_tOid oid;
...@@ -705,9 +704,6 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) : ...@@ -705,9 +704,6 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid); for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid);
ODD(sts); ODD(sts);
sts = gdh_GetNextObject( oid, &oid)) { sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object);
if ( EVEN(sts) || cdh_NoCaseStrcmp( name, "opdefault") == 0)
continue;
sts = gdh_ObjidToName( oid, fullname, sizeof(fullname), cdh_mName_volumeStrict); sts = gdh_ObjidToName( oid, fullname, sizeof(fullname), cdh_mName_volumeStrict);
if ( EVEN(sts)) continue; if ( EVEN(sts)) continue;
...@@ -726,8 +722,10 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) : ...@@ -726,8 +722,10 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid); for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid);
ODD(sts); ODD(sts);
sts = gdh_GetNextObject( oid, &oid)) { sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object); pwr_sClass_OpPlace *opp;
if ( ODD(sts) && cdh_NoCaseStrcmp( name, "opdefault") == 0) {
sts = gdh_ObjidToPointer( oid, (void **)&opp);
if ( ODD(sts) && opp->IsDefaultOp ) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_volumeStrict); sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_volumeStrict);
if ( EVEN(sts)) exit(sts); if ( EVEN(sts)) exit(sts);
...@@ -844,13 +842,12 @@ void Xtt::opplace_selected_cb( void *ctx, char *text) ...@@ -844,13 +842,12 @@ void Xtt::opplace_selected_cb( void *ctx, char *text)
if ( xtt->op_close_button) if ( xtt->op_close_button)
strcat( cmd, " /closebutton"); strcat( cmd, " /closebutton");
xtt->xnav->command( cmd); xtt->xnav->command( cmd);
xtt->xnav->load_ev_from_opplace(); //xtt->xnav->load_ev_from_opplace();
} }
void Xtt::list_opplace() void Xtt::list_opplace()
{ {
pwr_tOName texts[20]; pwr_tOName texts[20];
pwr_tObjName name;
pwr_tStatus sts; pwr_tStatus sts;
pwr_tOid oid; pwr_tOid oid;
pwr_tVid root_vid; pwr_tVid root_vid;
...@@ -867,10 +864,6 @@ void Xtt::list_opplace() ...@@ -867,10 +864,6 @@ void Xtt::list_opplace()
sts = gdh_ObjidToName( oid, texts[i], sizeof(texts[0]), cdh_mName_volumeStrict); sts = gdh_ObjidToName( oid, texts[i], sizeof(texts[0]), cdh_mName_volumeStrict);
if ( EVEN(sts)) continue; if ( EVEN(sts)) continue;
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object);
if ( EVEN(sts) || cdh_NoCaseStrcmp( name, "opdefault") == 0)
continue;
i++; i++;
if ( i == (int)(sizeof(texts)/sizeof(texts[0]) - 2)) if ( i == (int)(sizeof(texts)/sizeof(texts[0]) - 2))
break; break;
......
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