Commit dd8a9ea2 authored by claes's avatar claes

Spreadsheet editor was not inserted correctly in Wtt application list

parent 3b04727e
...@@ -26,7 +26,8 @@ typedef enum { ...@@ -26,7 +26,8 @@ typedef enum {
wb_eUtility_Wtt = 999, wb_eUtility_Wtt = 999,
wb_eUtility_PlcEditor = 1000, wb_eUtility_PlcEditor = 1000,
wb_eUtility_AttributeEditor = 1001, wb_eUtility_AttributeEditor = 1001,
wb_eUtility_Distributor = 1002 wb_eUtility_Distributor = 1002,
wb_eUtility_SpreadsheetEditor = 1003
} wb_eUtility; } wb_eUtility;
#endif #endif
......
...@@ -886,7 +886,7 @@ Wda::Wda( ...@@ -886,7 +886,7 @@ Wda::Wda(
if ( utility == wb_eUtility_Wtt) if ( utility == wb_eUtility_Wtt)
{ {
((Wtt *)parent_ctx)->register_utility( (void *) this, ((Wtt *)parent_ctx)->register_utility( (void *) this,
wb_eUtility_AttributeEditor); wb_eUtility_SpreadsheetEditor);
} }
} }
...@@ -150,7 +150,7 @@ extern "C" void wtt_uted_quit_cb( void *ctx) ...@@ -150,7 +150,7 @@ extern "C" void wtt_uted_quit_cb( void *ctx)
extern "C" void wtt_wpkg_quit_cb( void *ctx) extern "C" void wtt_wpkg_quit_cb( void *ctx)
{ {
delete ((Wtt *)ctx)->wpkg; delete ((Wtt *)ctx)->wpkg;
((Wtt *)ctx)->wpkg = NULL; ((Wtt *)ctx)->wpkg = 0;
} }
static void wtt_open_vsel_cb( void *ctx, wb_eType type, char *filename, wow_eFileSelType file_type) static void wtt_open_vsel_cb( void *ctx, wb_eType type, char *filename, wow_eFileSelType file_type)
...@@ -1094,7 +1094,7 @@ int Wtt::set_edit() ...@@ -1094,7 +1094,7 @@ int Wtt::set_edit()
ldh_eUtility_Configurator); ldh_eUtility_Configurator);
if ( EVEN(sts)) if ( EVEN(sts))
{ {
// Access denied, open readsesssion again // Access denied, open readsession again
ldh_OpenSession( &ldhses, volctx, ldh_eAccess_ReadOnly, ldh_OpenSession( &ldhses, volctx, ldh_eAccess_ReadOnly,
ldh_eUtility_Navigator); ldh_eUtility_Navigator);
ldh_AddOtherSessionCallback( ldhses, (void *)this, ldh_AddOtherSessionCallback( ldhses, (void *)this,
...@@ -3204,6 +3204,14 @@ void wtt_watt_close_cb( void *watt) ...@@ -3204,6 +3204,14 @@ void wtt_watt_close_cb( void *watt)
wtt->appl.remove( watt); wtt->appl.remove( watt);
} }
void wtt_wda_close_cb( void *wda)
{
Wtt *wtt = (Wtt *) ((Wda *)wda)->parent_ctx;
delete (Wda *)wda;
wtt->appl.remove( wda);
}
void Wtt::register_utility( void *ctx, wb_eUtility utility) void Wtt::register_utility( void *ctx, wb_eUtility utility)
{ {
...@@ -3213,6 +3221,10 @@ void Wtt::register_utility( void *ctx, wb_eUtility utility) ...@@ -3213,6 +3221,10 @@ void Wtt::register_utility( void *ctx, wb_eUtility utility)
appl.insert( utility, ctx, pwr_cNObjid, ""); appl.insert( utility, ctx, pwr_cNObjid, "");
((WAtt *)ctx)->close_cb = wtt_watt_close_cb; ((WAtt *)ctx)->close_cb = wtt_watt_close_cb;
break; break;
case wb_eUtility_SpreadsheetEditor:
appl.insert( utility, ctx, pwr_cNObjid, "");
((Wda *)ctx)->close_cb = wtt_wda_close_cb;
break;
default: default:
; ;
} }
...@@ -3601,6 +3613,9 @@ Wtt::~Wtt() ...@@ -3601,6 +3613,9 @@ Wtt::~Wtt()
free_cursor(); free_cursor();
if ( utedctx)
uted_delete( utedctx);
if ( set_focus_disabled) if ( set_focus_disabled)
XtRemoveTimeOut( disfocus_timerid); XtRemoveTimeOut( disfocus_timerid);
if ( selection_timerid) if ( selection_timerid)
...@@ -3668,6 +3683,9 @@ WttApplList::~WttApplList() ...@@ -3668,6 +3683,9 @@ WttApplList::~WttApplList()
case wb_eUtility_AttributeEditor: case wb_eUtility_AttributeEditor:
delete (WAtt *)elem->ctx; delete (WAtt *)elem->ctx;
break; break;
case wb_eUtility_SpreadsheetEditor:
delete (Wda *)elem->ctx;
break;
default: default:
; ;
} }
...@@ -3733,6 +3751,9 @@ void WttApplList::set_editmode( int editmode, ldh_tSesContext ldhses) ...@@ -3733,6 +3751,9 @@ void WttApplList::set_editmode( int editmode, ldh_tSesContext ldhses)
remove( elem->ctx); remove( elem->ctx);
elem = next_elem; elem = next_elem;
continue; continue;
case wb_eUtility_SpreadsheetEditor:
((Wda *)elem->ctx)->set_editmode( editmode, ldhses);
break;
default: default:
; ;
} }
......
...@@ -49,6 +49,10 @@ extern "C" { ...@@ -49,6 +49,10 @@ extern "C" {
#include "wb_uted.h" #include "wb_uted.h"
#endif #endif
#ifndef wb_wda_h
#include "wb_wda.h"
#endif
#ifndef co_wow_h #ifndef co_wow_h
#include "co_wow.h" #include "co_wow.h"
#endif #endif
......
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