#!/usr/bin/perl
use
lib
qw'../lib ../../lib'
;
my
$conf
=
shift
;
my
$logfile
=
shift
||
'/tmp/dbr-admin_lastrun_debug.txt'
;
open
STDERR,
">$logfile"
;
if
(!
$conf
) {
print
"you must supply the path to the dbr config file as the first argument\n"
;
exit
;
}
DBR::Admin::Utility::get_dbrh(
$conf
);
my
$cui
= new Curses::UI(
-color_support
=> 1,
-mouse_support
=> 1,
);
DBR::Admin::Window::MainMenu->new({
id
=>
'DBR Admin Main Menu'
,
parent
=>
$cui
});
$cui
->set_binding( \
&exit_dialog
,
"\cQ"
);
$cui
->set_binding( \
&exit_dialog
,
"\cC"
);
$cui
->mainloop();
sub
exit_dialog
{
my
$return
=
$cui
->dialog(
-message
=>
"Do you really want to quit?"
,
-title
=>
"Are you sure???"
,
-buttons
=> [
'yes'
,
'no'
],
);
exit
(0)
if
$return
;
}