diff options
author | Antoine Ginies <aginies@mandriva.com> | 2004-08-11 03:05:27 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2004-08-11 03:05:27 +0000 |
commit | 79b564b464045e6a900ddd3e27874c92fbdca0f3 (patch) | |
tree | e986f8ade759da04f77f1faf68c27cd81d32faaa /drakpxelinux.pl | |
parent | bcfa89086cfcf1cfc5425efe6cfe6b3c6b2990c6 (diff) | |
download | drakpxelinux-79b564b464045e6a900ddd3e27874c92fbdca0f3.tar drakpxelinux-79b564b464045e6a900ddd3e27874c92fbdca0f3.tar.gz drakpxelinux-79b564b464045e6a900ddd3e27874c92fbdca0f3.tar.bz2 drakpxelinux-79b564b464045e6a900ddd3e27874c92fbdca0f3.tar.xz drakpxelinux-79b564b464045e6a900ddd3e27874c92fbdca0f3.zip |
add null option in OptionMenu
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r-- | drakpxelinux.pl | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl index 701739a..abcf3d7 100644 --- a/drakpxelinux.pl +++ b/drakpxelinux.pl @@ -91,6 +91,7 @@ my %help = ( 'editb' => N("Edit the PXE entry selected with a dialog box"), 'removepxe' => N("Remove the PXE entry selected"), 'addpxe' => N("Launch a Wizard to add a PXE entry "), + 'helponline' => N("get help from Online documentation"), ); sub set_help_tip { @@ -105,10 +106,10 @@ if (!-f $conf) { } my @listpxe; -my @list_method = qw(nfs http); -my @list_ram = qw(48000 32000 64000 1280000); -my @list_vga = qw(normal 785 788 791 794 text); -my @list_eth = qw(eth0 eth1 eth2); +my @list_method = qw(nfs http); push @list_method, ""; +my @list_ram = qw(32000 48000 64000 96000 1280000); push @list_ram, ""; +my @list_vga = qw(normal 785 788 791 794 text); push @list_vga, ""; +my @list_eth = qw(eth0 eth1 eth2); push @list_eth, ""; use constant COLUMN_LABEL => 0; use constant COLUMN_INFO => 1; @@ -299,8 +300,10 @@ sub wizard_add_entry { use wizards; my $WPXENAME = "Mandrakeclustering"; my $WINFO = "install Mandrakeclustering"; - my $WALLRDZ = "/home/nis/install/clic/isolinux/alt0/all.rdz"; - my $WVMLINUZ = "/home/nis/install/clic/isolinux/alt0/vmlinuz"; +# my $WALLRDZ = "/home/nis/install/clic/isolinux/alt0/all.rdz"; + my $WALLRDZ = "/mnt/ken/dis/10.0/i586/isolinux/alt0/all.rdz"; +# my $WVMLINUZ = "/home/nis/install/clic/isolinux/alt0/vmlinuz"; + my $WVMLINUZ = "/mnt/ken/dis/10.0/i586/isolinux/alt0/vmlinuz"; my $w = wizards->new; my $wiz = { name => N("Add PXE entry"), @@ -746,7 +749,7 @@ sub cell_edited { sub show_help { info_dialog("help", gtkpack_(gtkset_border_width(Gtk2::VBox->new, 3), 0, $help, - 0, gtksignal_connect(set_help_tip(Gtk2::Button->new(N("online PXE documentation")), 'editb'), + 0, gtksignal_connect(set_help_tip(Gtk2::Button->new(N("online PXE documentation")), 'helponline'), clicked => sub { open(F, "http://clic.mandrakesoft.com/documentation/pxe/ |") } ), ), @@ -950,7 +953,7 @@ $::isWizard = 0; my $model = create_model(); my $window = ugtk2->new("Drakpxelinux $version"); -$window->{rwindow}->set_size_request(800, 400) unless $::isEmbedded; # seems embedded cause some pb +$window->{rwindow}->set_size_request(800, 400) unless $::isEmbedded; my $W = $window->{window}; $W->signal_connect(delete_event => sub { ugtk2->exit }); @@ -960,18 +963,19 @@ $treeview->get_selection->set_mode('single'); add_columns($treeview); # labels that list pxe menu entry -my $labels = new Gtk2::OptionMenu(); -my @labels = list_label_pxe; +my $labelscombo = Gtk2::OptionMenu->new; +#my @labelslist = list_label_pxe; my $defaultlabel = get_default_pxe; -$labels->entry->set_text($defaultlabel); -$labels->entry->signal_connect("changed", sub { list_label_pxe; my $new_default = $labels->entry->get_text; +$labelscombo->entry->set_text($defaultlabel); +$labelscombo->entry->signal_connect("changed", sub { my $new_default = $labelscombo->entry->get_text; set_new_default($new_default); } ); -$labels->set_popdown_strings(@labels); -$labels->entry->set_text($defaultlabel); -set_help_tip($labels, 'labels'); +my @o = list_label_pxe; +$labelscombo->set_popdown_strings("", sort(@o)); +$labelscombo->entry->set_text($defaultlabel); +set_help_tip($labelscombo, 'labels'); my $banner = Gtk2::Banner->new('wiz_default_up', ("DrakPXE default configuration file")); my $okcancel = create_okcancel({ @@ -987,7 +991,7 @@ $W->add(gtkpack_(Gtk2::VBox->new(0,0), 1, create_scrolled_window($treeview), 0, gtkpack_(gtkset_border_width(Gtk2::HBox->new, 3), 0, Gtk2::Label->new(N("boot:")), - 0, $labels, + 0, $labelscombo, 0, Gtk2::VSeparator->new(), 0, gtksignal_connect(set_help_tip(new Gtk2::Button(N("Wizard PXE server")), 'wizardsrv'), clicked => sub { |