Commit e69e47d7 authored by claes's avatar claes

save /quiet to save without any questions

parent d0982a96
/*
* Proview $Id: wb_lfu.cpp,v 1.19 2008-09-05 09:07:44 claes Exp $
* Proview $Id: wb_lfu.cpp,v 1.20 2008-10-09 08:34:14 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -604,7 +604,8 @@ pwr_tStatus lfu_WriteSysObjectFile(
*************************************************************************/
pwr_tStatus lfu_SaveDirectoryVolume(
ldh_tSesContext ldhses,
CoWow *wow
CoWow *wow,
int quiet
)
{
pwr_tStatus sts;
......@@ -981,7 +982,10 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sprintf( text, " Volume '%s' is not yet created.\n \n\
Do you want to create this volume.\n",
volume_name);
wow->DisplayQuestion( NULL,
if ( quiet)
lfu_creadb_qb_yes( NULL, (void *)data);
else
wow->DisplayQuestion( NULL,
"Create volume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
}
......@@ -1020,9 +1024,12 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sprintf( text, " Volume '%s' is not yet created.\n \n\
Do you want to create this volume.\n",
volume_name);
wow->DisplayQuestion( NULL,
"Create volume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
if ( quiet)
lfu_creadb_qb_yes( NULL, (void *)data);
else
wow->DisplayQuestion( NULL,
"Create volume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
}
else {
char msg[200];
......@@ -1077,9 +1084,12 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sprintf( text, " ClassVolume '%s' is not yet created.\n \n\
Do you want to create this volume.\n",
volume_name);
wow->DisplayQuestion( NULL,
"Create Classvolume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
if ( quiet)
lfu_creadb_qb_yes( NULL, (void *)data);
else
wow->DisplayQuestion( NULL,
"Create Classvolume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
}
}
}
......@@ -1111,9 +1121,12 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sprintf( text, " ClassVolume '%s' is not yet created.\n \n\
Do you want to create this volume.\n",
volume_name);
wow->DisplayQuestion( NULL,
"Create Classvolume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
if ( quiet)
lfu_creadb_qb_yes( NULL, (void *)data);
else
wow->DisplayQuestion( NULL,
"Create Classvolume", text,
lfu_creadb_qb_yes, NULL, (void *)data);
}
}
}
......
/*
* Proview $Id: wb_lfu.h,v 1.12 2008-06-26 13:20:41 claes Exp $
* Proview $Id: wb_lfu.h,v 1.13 2008-10-09 08:34:14 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -84,7 +84,8 @@ pwr_tStatus lfu_IncrementAndGetVersion( char *filename,
unsigned long *current_version);
pwr_tStatus lfu_SaveDirectoryVolume( ldh_tSesContext ldhses,
CoWow *wow);
CoWow *wow,
int quiet);
int lfu_create_bootfiles( char *nodestr,
int debug,
......
/*
* Proview $Id: wb_wtt.cpp,v 1.40 2008-10-03 14:18:37 claes Exp $
* Proview $Id: wb_wtt.cpp,v 1.41 2008-10-09 08:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -398,7 +398,7 @@ void Wtt::file_selected_cb( void *ctx, char *filename, wow_eFileSelType file_typ
(wtt->open_volume_cb) ( wtt, wb_eType_Volume, filename, file_type);
}
void Wtt::save_cb( void *ctx)
void Wtt::save_cb( void *ctx, int quiet)
{
Wtt *wtt = (Wtt *) ctx;
int sts;
......@@ -419,7 +419,7 @@ void Wtt::save_cb( void *ctx)
}
if ( wtt->wb_type == wb_eType_Directory) {
sts = lfu_SaveDirectoryVolume( wtt->ldhses, wtt->wnav->wow);
sts = lfu_SaveDirectoryVolume( wtt->ldhses, wtt->wnav->wow, quiet);
if ( EVEN(sts)) {
wtt->message( 'E', "Syntax error");
return;
......@@ -673,7 +673,7 @@ int Wtt::set_noedit( wtt_eNoEditMode save, wtt_eNoEditVolMode detach)
sts = ldh_SaveSession( ldhses);
// TODO
if ( ODD(sts) && wb_type == wb_eType_Directory)
sts = lfu_SaveDirectoryVolume( ldhses, wnav->wow);
sts = lfu_SaveDirectoryVolume( ldhses, wnav->wow, 0);
}
else
sts = ldh_RevertSession( ldhses);
......@@ -884,7 +884,7 @@ void Wtt::activate_collapse()
void Wtt::activate_save()
{
set_clock_cursor();
save_cb( this);
save_cb( this, 0);
reset_cursor();
}
......
/*
* Proview $Id: wb_wtt.h,v 1.19 2008-10-03 14:18:37 claes Exp $
* Proview $Id: wb_wtt.h,v 1.20 2008-10-09 08:36:12 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -308,7 +308,7 @@ class Wtt : public WUtility {
static void findregex_ok( Wtt *wtt, char *search_str);
static void find_ok( Wtt *wtt, char *search_str);
static void file_selected_cb( void *ctx, char *filename, wow_eFileSelType file_type);
static void save_cb( void *ctx);
static void save_cb( void *ctx, int quiet);
static void revert_ok( Wtt *wtt);
static void revert_cb( void *ctx, int confirm);
static int attach_volume_cb( void *ctx, pwr_tVolumeId volid, int pop);
......
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