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
EndBody
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
Attr TypeRef = "pwrs:Type-$Int32"
Attr Flags |= PWR_MASK_INVISIBLE
Attr Flags |= PWR_MASK_RTHIDE
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
EndObject
......
......@@ -53,6 +53,7 @@ static pwr_tStatus PostCreate (
pwr_tStatus sts;
pwr_tObjName name;
pwr_tMask value = 1;
pwr_tBoolean bvalue = 1;
int size;
sts = ldh_ObjidToName( Session, Object, ldh_eName_Object,
......@@ -65,6 +66,10 @@ static pwr_tStatus PostCreate (
sts = ldh_SetObjectPar( Session, Object, "RtBody",
"OpWindLayout", (char *) &value, sizeof(value));
if ( EVEN(sts)) return sts;
sts = ldh_SetObjectPar( Session, Object, "RtBody",
"IsDefaultOp", (char *) &value, sizeof(bvalue));
if ( EVEN(sts)) return sts;
}
return PWRS__SUCCESS;
......
......@@ -696,7 +696,6 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
if ( select_opplace) {
// Check if there is only one single opplace
pwr_tOName fullname;
pwr_tObjName name;
pwr_tStatus sts;
pwr_tOid oid;
......@@ -705,9 +704,6 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid);
ODD(sts);
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);
if ( EVEN(sts)) continue;
......@@ -726,8 +722,10 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid);
ODD(sts);
sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object);
if ( ODD(sts) && cdh_NoCaseStrcmp( name, "opdefault") == 0) {
pwr_sClass_OpPlace *opp;
sts = gdh_ObjidToPointer( oid, (void **)&opp);
if ( ODD(sts) && opp->IsDefaultOp ) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_volumeStrict);
if ( EVEN(sts)) exit(sts);
......@@ -844,13 +842,12 @@ void Xtt::opplace_selected_cb( void *ctx, char *text)
if ( xtt->op_close_button)
strcat( cmd, " /closebutton");
xtt->xnav->command( cmd);
xtt->xnav->load_ev_from_opplace();
//xtt->xnav->load_ev_from_opplace();
}
void Xtt::list_opplace()
{
pwr_tOName texts[20];
pwr_tObjName name;
pwr_tStatus sts;
pwr_tOid oid;
pwr_tVid root_vid;
......@@ -867,10 +864,6 @@ void Xtt::list_opplace()
sts = gdh_ObjidToName( oid, texts[i], sizeof(texts[0]), cdh_mName_volumeStrict);
if ( EVEN(sts)) continue;
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object);
if ( EVEN(sts) || cdh_NoCaseStrcmp( name, "opdefault") == 0)
continue;
i++;
if ( i == (int)(sizeof(texts)/sizeof(texts[0]) - 2))
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