Commit 1d148b61 authored by Claes Sjofors's avatar Claes Sjofors

Xtt, problems with OpPlace and XttGraph objects in SharedVolume fixed

parent dfb46882
This diff is collapsed.
......@@ -3655,6 +3655,17 @@ gdh_GetVolumeInfo(
return rsts;
}
/**
* @brief Get info for a volume.
*/
pwr_tStatus
gdh_GetRootVolume( pwr_tVid *vid /**< Volume identity */
)
{
*vid = gdbroot->my_volume->g.vid;
return GDH__SUCCESS;
}
pwr_tStatus
gdh_GetObjectBodyDef(
pwr_tCid cid,
......
......@@ -501,6 +501,11 @@ gdh_GetVolumeList(
pwr_tVid *vid
);
pwr_tStatus
gdh_GetRootVolume(
pwr_tVid *vid
);
pwr_tStatus
gdh_SearchFile (
pwr_tOid oid,
......
......@@ -168,3 +168,5 @@
101006 cs wb Dev method PostCreate, inheritance added.
101006 cs wb IO objects, PostCreate method to automatically insert ThreadObject.
101123 cs wb Lockfile added to directory and class volumes.
110202 cs wb Bugfix in object editor, Ctrl+DoubleClick didn't work on attrrefs.
110202 cs wb Plc compile, problem with compilation of component subwindow from plc editor fixed.
......@@ -197,3 +197,4 @@
110121 cs xtt Languages zh_cn and fr_fr added.
110121 rk rtmon Runtime Monitor, problem with restart timeout fixed.
110202 cs flow Color alloc problem fixed.
110203 cs xtt Problems with OpPlace and XttGraph object in SharedVolume fixed.
\ No newline at end of file
......@@ -561,7 +561,7 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
while (ODD(sts)) {
sts = gdh_ObjidToName( op_objid, oname, sizeof(oname), cdh_mName_object);
if (ODD(sts) && cdh_NoCaseStrcmp( oname, opplace_str) == 0) {
sts = gdh_ObjidToName( op_objid, opplace_str, sizeof(opplace_str), cdh_mNName);
sts = gdh_ObjidToName( op_objid, opplace_str, sizeof(opplace_str), cdh_mName_volumeStrict);
opplace_found = 1;
break;
}
......@@ -619,7 +619,7 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
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_mNName);
sts = gdh_ObjidToName( oid, fullname, sizeof(fullname), cdh_mName_volumeStrict);
if ( EVEN(sts)) continue;
i++;
......@@ -639,7 +639,7 @@ Xtt::Xtt( int *argc, char **argv[], int *return_sts) :
sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_object);
if ( ODD(sts) && cdh_NoCaseStrcmp( name, "opdefault") == 0) {
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mNName);
sts = gdh_ObjidToName( oid, name, sizeof(name), cdh_mName_volumeStrict);
if ( EVEN(sts)) exit(sts);
strcpy( opplace_str, name);
......@@ -759,13 +759,18 @@ void Xtt::list_opplace()
pwr_tObjName name;
pwr_tStatus sts;
pwr_tOid oid;
pwr_tVid root_vid;
gdh_GetRootVolume( &root_vid);
int i = 0;
for ( sts = gdh_GetClassList( pwr_cClass_OpPlace, &oid);
ODD(sts);
sts = gdh_GetNextObject( oid, &oid)) {
sts = gdh_ObjidToName( oid, texts[i], sizeof(texts[0]), cdh_mNName);
if ( oid.vid == root_vid)
sts = gdh_ObjidToName( oid, texts[i], sizeof(texts[0]), cdh_mNName);
else
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);
......
......@@ -73,6 +73,7 @@ OpGtk::OpGtk( void *op_parent_ctx,
Op( op_parent_ctx, opplace, status), parent_wid(op_parent_wid), title_label(0), a_height(2),
text_size(12)
{
pwr_tStatus sts;
memset( a_exist, 0, sizeof(a_exist));
memset( a_active, 0, sizeof(a_active));
GdkColor red_color;
......@@ -538,7 +539,8 @@ OpGtk::OpGtk( void *op_parent_ctx,
gtk_box_pack_start( GTK_BOX(sysbutton_box), GTK_WIDGET(tools2), FALSE, FALSE, 0);
gtk_widget_set_size_request( sysbutton_box, 160, -1);
configure( opplace);
sts = configure( opplace);
if ( EVEN(sts)) return;
// Status bar
GtkWidget *status_bar;
......@@ -657,9 +659,12 @@ OpGtk::~OpGtk()
{
if ( jop)
delete jop;
sup_timerid->remove();
delete sup_timerid;
delete wow;
if ( sup_timerid) {
sup_timerid->remove();
delete sup_timerid;
}
if ( wow)
delete wow;
gtk_widget_destroy( toplevel);
}
......
......@@ -47,7 +47,7 @@ Op::Op( void *op_parent_ctx,
pwr_tStatus *status) :
parent_ctx(op_parent_ctx), start_jop(0),
jop(NULL), command_cb(NULL), map_cb(NULL), help_cb(NULL),
close_cb(NULL), get_alarm_info_cb(NULL), ack_last_cb(NULL), sup_timerid(0)
close_cb(NULL), get_alarm_info_cb(NULL), ack_last_cb(NULL), wow(0), sup_timerid(0)
{
sup_init();
}
......@@ -82,7 +82,7 @@ int Op::appl_action( int idx)
int sts;
if ( command_cb) {
sts = gdh_AttrrefToName( &button_aref[idx], name, sizeof(name), cdh_mNName);
sts = gdh_AttrrefToName( &button_aref[idx], name, sizeof(name), cdh_mName_volumeStrict);
strcpy( cmd, "ope gra/obj=");
strcat( cmd, name);
......
......@@ -1979,6 +1979,7 @@ static int xnav_show_func( void *client_data,
pwr_tOName *names;
xnav_sObjectList *ctx;
pwr_tCid cid;
pwr_tVid root_vid;
if ( EVEN( dcli_get_qualifier( "/CLASS", class_str, sizeof(class_str)))) {
xnav->message('E', "Class is missing");
......@@ -1991,6 +1992,8 @@ static int xnav_show_func( void *client_data,
return XNAV__HOLDCOMMAND;
}
gdh_GetRootVolume( &root_vid);
for ( sts = gdh_GetClassListAttrRef( cid, &aref);
ODD(sts);
sts = gdh_GetNextAttrRef( cid, &aref, &aref)) {
......@@ -2002,8 +2005,12 @@ static int xnav_show_func( void *client_data,
for ( sts = gdh_GetClassListAttrRef( cid, &aref);
ODD(sts);
sts = gdh_GetNextAttrRef( cid, &aref, &aref)) {
sts = gdh_AttrrefToName( &aref, names[idx], sizeof(names[0]),
cdh_mNName /* cdh_mName_volumeStrict */ );
if ( aref.Objid.vid == root_vid)
sts = gdh_AttrrefToName( &aref, names[idx], sizeof(names[0]),
cdh_mNName);
else
sts = gdh_AttrrefToName( &aref, names[idx], sizeof(names[0]),
cdh_mName_volumeStrict);
if ( EVEN(sts)) continue;
idx++;
......
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