148 lines
3.2 KiB
Plaintext
148 lines
3.2 KiB
Plaintext
/* ------------------------------------------------------------------------------
|
|
* Copyright (c) 2006 Novell, Inc. All Rights Reserved.
|
|
*
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it under
|
|
* the terms of version 2 of the GNU General Public License as published by the
|
|
* Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program; if not, contact Novell, Inc.
|
|
*
|
|
* To contact Novell about this file by physical or electronic mail, you may find
|
|
* current contact information at www.novell.com.
|
|
* ------------------------------------------------------------------------------
|
|
*/
|
|
|
|
/**
|
|
* File: include/casa-ats/wizards.ycp
|
|
* Package: Configuration of casa-ats
|
|
* Summary: Wizards definitions
|
|
* Authors: Ryan Partridge <rpartridge@novell.com>
|
|
*
|
|
* $Id: wizards.ycp 27914 2006-02-13 14:32:08Z locilka $
|
|
*/
|
|
|
|
{
|
|
|
|
textdomain "casa-ats";
|
|
|
|
import "Sequencer";
|
|
import "Wizard";
|
|
|
|
include "casa-ats/complex.ycp";
|
|
include "casa-ats/dialogs.ycp";
|
|
|
|
/**
|
|
* Add a configuration of casa-ats
|
|
* @return sequence result
|
|
*/
|
|
any AddSequence() {
|
|
|
|
/* FIXME: adapt to your needs */
|
|
map aliases = $[
|
|
"atsinfo" : ``(ATSInfoDialog()),
|
|
];
|
|
|
|
/* FIXME: adapt to your needs */
|
|
map sequence = $[
|
|
"ws_start" : "config1",
|
|
"atsinfo" : $[
|
|
`abort : `abort,
|
|
`next : `next
|
|
]
|
|
];
|
|
|
|
return Sequencer::Run(aliases, sequence);
|
|
}
|
|
|
|
/**
|
|
* Main workflow of the casa-ats configuration
|
|
* @return sequence result
|
|
*/
|
|
any MainSequence() {
|
|
|
|
/* FIXME: adapt to your needs */
|
|
map aliases = $[
|
|
"atsinfo" : ``( ATSInfoDialog() )
|
|
];
|
|
|
|
/* FIXME: adapt to your needs */
|
|
map sequence = $[
|
|
"ws_start" : "atsinfo",
|
|
"atsinfo" : $[
|
|
`abort : `abort,
|
|
`next : `next
|
|
]
|
|
];
|
|
|
|
any ret = Sequencer::Run(aliases, sequence);
|
|
|
|
return ret;
|
|
}
|
|
|
|
/**
|
|
* Whole configuration of casa-ats
|
|
* @return sequence result
|
|
*/
|
|
any CasaAtsSequence() {
|
|
|
|
map aliases = $[
|
|
"read" : [ ``( ReadDialog() ), true ],
|
|
"main" : ``( MainSequence() ),
|
|
"write" : [ ``( WriteDialog() ), true ]
|
|
];
|
|
|
|
map sequence = $[
|
|
"ws_start" : "read",
|
|
"read" : $[
|
|
`abort : `abort,
|
|
`next : "main"
|
|
],
|
|
"main" : $[
|
|
`abort : `abort,
|
|
`next : "write"
|
|
],
|
|
"write" : $[
|
|
`abort : `abort,
|
|
`next : `next
|
|
]
|
|
];
|
|
|
|
Wizard::CreateDialog();
|
|
|
|
any ret = Sequencer::Run(aliases, sequence);
|
|
|
|
UI::CloseDialog();
|
|
return ret;
|
|
}
|
|
|
|
/**
|
|
* Whole configuration of casa-ats but without reading and writing.
|
|
* For use with autoinstallation.
|
|
* @return sequence result
|
|
*/
|
|
any CasaAtsAutoSequence() {
|
|
|
|
/* Initialization dialog caption */
|
|
string caption = _("CasaAts Configuration");
|
|
/* Initialization dialog contents */
|
|
term contents = `Label(_("Initializing..."));
|
|
|
|
Wizard::CreateDialog();
|
|
Wizard::SetContentsButtons(caption, contents, "",
|
|
Label::BackButton(), Label::NextButton());
|
|
|
|
any ret = MainSequence();
|
|
|
|
UI::CloseDialog();
|
|
return ret;
|
|
}
|
|
|
|
/* EOF */
|
|
}
|