summaryrefslogtreecommitdiffstats
path: root/drakpxelinux.pl
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-08-29 21:27:31 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-08-29 21:27:31 +0000
commit9e6c4fff82e4bc33853d2587418f98eee9362980 (patch)
tree41906c9af4739b482ff32ac0493e8fffade066b6 /drakpxelinux.pl
parent044eb03c76001b8897e44292b65c165b3197ba74 (diff)
downloaddrakpxelinux-9e6c4fff82e4bc33853d2587418f98eee9362980.tar
drakpxelinux-9e6c4fff82e4bc33853d2587418f98eee9362980.tar.gz
drakpxelinux-9e6c4fff82e4bc33853d2587418f98eee9362980.tar.bz2
drakpxelinux-9e6c4fff82e4bc33853d2587418f98eee9362980.tar.xz
drakpxelinux-9e6c4fff82e4bc33853d2587418f98eee9362980.zip
clear $model before filling it
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r--drakpxelinux.pl10
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;