diff options
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r-- | drakpxelinux.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl index efa187a..5ca0ed2 100644 --- a/drakpxelinux.pl +++ b/drakpxelinux.pl @@ -832,8 +832,10 @@ my $profiles = Gtk2::SimpleList->new("Profile name" => 'text'); $profiles->set_headers_visible(1); $profiles->get_selection->set_mode('browse'); $profiles->get_selection->signal_connect(changed => sub { - my ($model, $iter) = $_[0]->get_selected or return; - profile_selected($model->get($iter, 0)); + my ($models, $iter) = $_[0]->get_selected or return; + undef $model; + undef $treeview; + profile_selected($models->get($iter, 0)); }); my $log_text = gtknew('TextView'); @@ -906,12 +908,13 @@ our $treeview = Gtk2::TreeView->new_with_model($model); sub profile_selected { my ($profile) = @_; + $model->clear; # force type = boot my $type = "boot"; my ($config_file, $help_file) = network::pxe::get_pxelinux_profile_path($profile, $type); print "----- $config_file $help_file\n"; my $pxelinux_conf = network::pxe::read_pxelinux_conf($config_file, $help_file); - print Dumper($pxelinux_conf); + # print Dumper($pxelinux_conf); set_pxelinux_entry_at_iter($model, $model->append, $_) foreach (@{$pxelinux_conf->{entries}}); } @@ -935,7 +938,6 @@ sub launch_pxe_server() { # disable wizard $::isWizard = 0; -profile_selected; my $w = ugtk2->new(N("Drakpxelinux")); #$w->{rwindow}->set_size_request(800, 500) unless $::isEmbedded; |