#!/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::server_conf_ui;
use interface_cluster;


$::in = interactive::gtk->new;

my $w = ugtk2->new('Cluster Set Configuration');
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 $server_conf = drakcluster::server_conf::read();
	push @notebook_callbacks, sub {};
	ugtk2::add2notebook($notebook_widget, N("Server Configuration"), drakcluster::server_conf_ui::create($server_conf));
    }
}

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

$w->main;

