Commit 78ab3e22 authored by claes's avatar claes

Start wizard for empty rootvolume

parent 506fa2aa
/*
* Proview $Id: wb_wtt_gtk.cpp,v 1.26 2008-10-15 06:04:55 claes Exp $
* Proview $Id: wb_wtt_gtk.cpp,v 1.27 2008-10-28 09:50:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -2714,17 +2714,22 @@ WttGtk::WttGtk(
wnavnode->volume_attached( wbctx, ldhses, 0);
}
if ( wb_type == wb_eType_Directory) {
if ( wb_type == wb_eType_Directory || wb_type == wb_eType_Volume) {
// Start configuration wizard if volume is empty
pwr_tOid oid;
sts = ldh_GetRootList( ldhses, &oid);
if ( EVEN( sts)) {
wnav->wow->HideWarranty(); // Warranty window is hidden behind the wizard
set_edit();
start_wizard( this);
// XtAppAddWorkProc( XtWidgetToApplicationContext(toplevel),
// (XtWorkProc)start_wizard, this) ;
pwr_tCid vcid;
if ( wbctx && volid) {
sts = ldh_GetVolumeClass( wbctx, volid, &vcid);
if ( vcid == pwr_eClass_RootVolume || vcid == pwr_eClass_DirectoryVolume) {
wnav->wow->HideWarranty(); // Warranty window is hidden behind the wizard
set_edit();
start_wizard( this, vcid);
}
}
}
}
......
/*
* Proview $Id: wb_wtt.cpp,v 1.42 2008-10-15 06:04:55 claes Exp $
* Proview $Id: wb_wtt.cpp,v 1.43 2008-10-28 09:54:15 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -101,11 +101,20 @@ int Wtt::format_selection( void *ctx, pwr_sAttrRef attrref,
return 0;
}
int Wtt::start_wizard( Wtt *wtt)
int Wtt::start_wizard( Wtt *wtt, pwr_tCid vcid)
{
pwr_tCmd cmd;
strcpy( cmd, "@$pwr_exe/wb_wiz_directoryvolume");
switch ( vcid) {
case pwr_eClass_DirectoryVolume:
strcpy( cmd, "@$pwr_exe/wb_wiz_directoryvolume");
break;
case pwr_eClass_RootVolume:
strcpy( cmd, "@$pwr_exe/wb_wiz_rootvolume");
break;
default:
return 1;
}
wtt->wnav->command( cmd);
return 1;
}
......
/*
* Proview $Id: wb_wtt.h,v 1.20 2008-10-09 08:36:12 claes Exp $
* Proview $Id: wb_wtt.h,v 1.21 2008-10-28 09:54:15 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -285,7 +285,7 @@ class Wtt : public WUtility {
static int format_selection( void *ctx, pwr_sAttrRef attrref,
char **value_return, int is_class, int is_attr,
wnav_eSelectionFormat format);
static int start_wizard( Wtt *wtt);
static int start_wizard( Wtt *wtt, pwr_tCid vcid);
static void set_twowindows_cb( void *wtt, int two, int display_w1,
int display_w2);
static pwr_tStatus ldh_this_session_cb( void *ctx, ldh_sEvent *event);
......
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