#!/usr/bin/perl

use lib '/usr/lib/libDrakX';
use strict;

BEGIN { push @::textdomains, 'drakcluster' }

use standalone;
use common;
use ugtk2 qw(:wrappers :create);
use interactive::gtk;

my $window_splash = Gtk2::Window->new('popup');
$window_splash->signal_connect(delete_event => \&quit_global);
$window_splash->set_position('center_always');
my $filename = "/usr/share/pixmaps/cluster/drakcluster-splash.png";
my $image = Gtk2::Image->new_from_file ($filename);
$window_splash->add($image);
$window_splash->show_all;
gtkflush();

use drakcluster::pxe_conf;
use drakcluster::common;
use interface_cluster;

$::in = interactive::gtk->new;
my $w = ugtk2->new('PXE config');

my $users_notebook = Gtk2::VBox->new;
my $notebook_widget = Gtk2::Notebook->new;
my @notebook_callbacks;
$notebook_widget->signal_connect(switch_page => sub { $notebook_callbacks[$_[2]]->() });
{
    my $box = Gtk2::VBox->new;
    {
	my $pxe_conf = drakcluster::pxe_conf::read();
	push @notebook_callbacks, sub {};
	ugtk2::add2notebook($notebook_widget, N("PXE Configuration"), drakcluster::pxe_conf::create($pxe_conf));
    }
}

gtkadd(gtkset_size_request($w->{window}, 620, 500), $notebook_widget);
$window_splash->destroy;

$w->main;

