Commit 3571d0b0 authored by claes's avatar claes

Directory volume added

parent 6348fe36
......@@ -16,7 +16,7 @@
typedef enum {
wb_eType_Volume,
wb_eType_Project,
wb_eType_Directory,
wb_eType_Class,
wb_eType_Buffer
} wb_eType;
......
......@@ -548,7 +548,17 @@ void wb_erep::loadMeta( pwr_tStatus *status)
}
fpm.close();
if ( !vol_cnt)
// Load directory volume
strcpy( vname, "$pwrp_db/directory.db");
dcli_translate_filename( vname, vname);
wb_vrepdb *vrepdb = new wb_vrepdb( this, vname);
vrepdb->name("directory");
addDb( &sts, vrepdb);
if ( EVEN(sts))
*status = LDH__PROJCONFIG;
else if ( !vol_cnt)
*status = LDH__PROJCONFIG;
else
*status = LDH__SUCCESS;
......
......@@ -24,7 +24,7 @@ extern "C" {
#define ldh_cWbdbVersionStr "V2.7.0"
#define ldh_cWBVol (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 254)
#define ldh_cWBVolLocal (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 252)
#define ldh_cProjectVolume (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 253)
#define ldh_cDirectoryVolume (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 253)
#define ldh_cVolatileVolMin (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 0)
#define ldh_cVolatileVolMax (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 100)
......
......@@ -226,7 +226,7 @@ void Wtt::menu_setup()
switch( wb_type)
{
case wb_eType_Project:
case wb_eType_Directory:
if ( editmode)
{
XtSetValues( menu_save_w, sensitive, 1);
......@@ -647,7 +647,7 @@ static void wtt_save_cb( void *ctx)
return;
}
if ( wtt->wb_type == wb_eType_Project)
if ( wtt->wb_type == wb_eType_Directory)
{
sts = lfu_SaveDirectoryVolume( wtt->ldhses, wtt->toplevel);
if ( EVEN(sts))
......@@ -919,7 +919,7 @@ int Wtt::set_noedit( wtt_eNoEditMode save, wtt_eNoEditVolMode detach)
if ( save == wtt_eNoEdit_Save)
{
sts = ldh_SaveSession( ldhses);
if ( ODD(sts) && wb_type == wb_eType_Project)
if ( ODD(sts) && wb_type == wb_eType_Directory)
sts = lfu_SaveDirectoryVolume( ldhses, toplevel);
}
else
......@@ -3331,7 +3331,7 @@ Wtt::Wtt(
*status = sts;
return;
}
if ( volid == ldh_cProjectVolume) volclass = pwr_eClass_DirectoryVolume; // Fix
if ( volid == ldh_cDirectoryVolume) volclass = pwr_eClass_DirectoryVolume; // Fix
sts = ldh_VolumeIdToName( wbctx, volid, volname,
sizeof(volname), &size);
......@@ -3343,8 +3343,8 @@ Wtt::Wtt(
switch( volclass)
{
case pwr_eClass_DirectoryVolume:
wb_type = wb_eType_Project;
sprintf( title, "PwR Navigator Project %s, %s", volname, name);
wb_type = wb_eType_Directory;
sprintf( title, "PwR Navigator Directory %s, %s", volname, name);
strcpy( layout_w1, "ProjectNavigatorW1");
strcpy( layout_w2, "ProjectNavigatorW2");
strcpy( layout_palette, "ProjectNavigatorPalette");
......
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