diff options
author | Antoine Ginies <aginies@mandriva.com> | 2004-07-29 15:39:31 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2004-07-29 15:39:31 +0000 |
commit | 20b778a77c03130ab432c64b0977f18e52d4a0a2 (patch) | |
tree | ebc0f3bcd2bf4492fdd7637a94dee36e71fbf2f5 | |
parent | b1a259fa0cf5a2491804d7df7d13f1721f86b580 (diff) | |
download | drakpxelinux-20b778a77c03130ab432c64b0977f18e52d4a0a2.tar drakpxelinux-20b778a77c03130ab432c64b0977f18e52d4a0a2.tar.gz drakpxelinux-20b778a77c03130ab432c64b0977f18e52d4a0a2.tar.bz2 drakpxelinux-20b778a77c03130ab432c64b0977f18e52d4a0a2.tar.xz drakpxelinux-20b778a77c03130ab432c64b0977f18e52d4a0a2.zip |
- fix edit dialog box
- now support embedded mode (mcc)
-rw-r--r-- | drakpxelinux.pl | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl index e9f5eb2..8e2ac14 100644 --- a/drakpxelinux.pl +++ b/drakpxelinux.pl @@ -375,19 +375,19 @@ sub edit_box_item { gtkpack_($dialog->vbox, 0, gtkadd(Gtk2::Frame->new(("Descrition")), - gtkpack_(Gtk2::VBox->new, + gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), 0, $label_and_widgets->(N("Label"), $label, ""), 0, $label_and_widgets->(N("Info"), $info, ""), ), ), 0, gtkadd(Gtk2::Frame->new(("Boot image")), - gtkpack_(Gtk2::VBox->new, + gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), 0, $label_and_widgets->(N("Kernel"), $kernel, $buttonkernel), 0, $label_and_widgets->(N("Initrd"), $initrd, $buttoninitrd), ), ), 0, gtkadd(Gtk2::Frame->new(("Automatic Options")), - gtkpack_(Gtk2::VBox->new, + gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), 0, $label_and_widgets->(N("Automatic"), $automatic, ""), 0, $label_and_widgets->(N("Interface"), $interface, ""), 0, $label_and_widgets->(N("Network"), $network, ""), @@ -396,13 +396,13 @@ sub edit_box_item { ), ), 0, gtkadd(Gtk2::Frame->new(("Display")), - gtkpack_(Gtk2::VBox->new, + gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), 0, $label_and_widgets->(N("Vga"), $vga, ""), 0, $label_and_widgets->(N("Display"), $display, ""), ), ), 0, gtkadd(Gtk2::Frame->new(("Other options")), - gtkpack_(Gtk2::VBox->new, + gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), 0, $label_and_widgets->(N("Ramdisk"), $ramdisk, ""), 0, $label_and_widgets->(N("Option"), $option, ""), ), @@ -561,7 +561,7 @@ sub add_columns { my $model = create_model(); my $window = ugtk2->new('Drakpxe2'); -$window->{rwindow}->set_size_request(800, 400) unless $::isEmbedded; +$window->{rwindow}->set_size_request(800, 400) unless $::isEmbedded; # seems embedded cause some pb my $W = $window->{window}; $W->signal_connect(delete_event => sub { ugtk2->exit }); @@ -582,27 +582,35 @@ $labels->entry->signal_connect("changed", sub { list_label_pxe; my $new_default $labels->set_popdown_strings(@labels); $labels->entry->set_text("$defaultlabel"); +my $banner; +$banner = Gtk2::Banner->new('wiz_default_up', ("DrakPXE default configurati\on file")) unless $::isEmbedded; +my $okcancel = create_okcancel({ + cancel_clicked => sub { ugtk2->exit }, + ok_clicked => \&write_conf_pxe, + }, + ); +; +$okcancel ="" unless $::isEmbedded; + $W->add(gtkpack_(Gtk2::VBox->new(0,0), - 0, Gtk2::Banner->new('wiz_default_up', ("DrakPXE default configuration file")), + 0, $banner, 1, create_scrolled_window($treeview), - 0, gtkadd(gtkset_border_width(Gtk2::VBox->new, 0,0), - gtkadd(Gtk2::HBox->new(0,0), - $labels, - gtkpack(gtkset_layout(new Gtk2::HButtonBox, 'spread'), - 0, (map { - my ($label, $sub, $widg) = @$_; - gtksignal_connect(Gtk2::Button->new($label), clicked => sub { - $sub->($model, $widg); }) - } ([ ("Help"), \&show_help ], - [ ("Add a PXE entry"), \&add_item, $model ], - [ ("Remove PXE entry"), \&remove_item, $treeview ], - [ ("Edit a PXE entry"), \&edit_box_item, $treeview ], - ) - ), - ), - - ), - ), + 0, gtkpack_(gtkset_border_width(Gtk2::HBox->new, 3), + 0, $labels, + 0, gtkpack(gtkset_layout(new Gtk2::HButtonBox, 'spread'), + 0, (map { + my ($label, $sub, $widg) = @$_; + gtksignal_connect(Gtk2::Button->new($label), clicked => sub { + $sub->($model, $widg); }) + } ([ ("Help"), \&show_help ], + [ ("Add a PXE entry"), \&add_item, $model ], + [ ("Remove PXE entry"), \&remove_item, $treeview ], + [ ("Edit a PXE entry"), \&edit_box_item, $treeview ], + ) + ), + ), + ), + 0, $okcancel, ), ); |