summaryrefslogtreecommitdiffstats
path: root/drakpxelinux.pl
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2004-08-06 08:55:53 +0000
committerAntoine Ginies <aginies@mandriva.com>2004-08-06 08:55:53 +0000
commit2d609c2800631957896757eff539f2da0f94adb9 (patch)
tree0d0251ecb83cd14c3a07c4ce79d20c39cefd548c /drakpxelinux.pl
parent527c21d84a35ad85018f404909f6bf047bff5b0b (diff)
downloaddrakpxelinux-2d609c2800631957896757eff539f2da0f94adb9.tar
drakpxelinux-2d609c2800631957896757eff539f2da0f94adb9.tar.gz
drakpxelinux-2d609c2800631957896757eff539f2da0f94adb9.tar.bz2
drakpxelinux-2d609c2800631957896757eff539f2da0f94adb9.tar.xz
drakpxelinux-2d609c2800631957896757eff539f2da0f94adb9.zip
- improve get information
- fix pb of wizard - block rename of label (to fix pb of same label name) - typo
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r--drakpxelinux.pl18
1 files changed, 11 insertions, 7 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl
index a552e4b..a2e3186 100644
--- a/drakpxelinux.pl
+++ b/drakpxelinux.pl
@@ -158,7 +158,7 @@ sub get_items() {
sub get_information {
my ($label) = @_;
my $line = cat_($PXEHELP);
- my ($information) = $line =~ /$label : (.*)/;
+ my ($information) = $line =~ /\b$label\b\s: (.*)/;
$information and return $information;
}
@@ -290,6 +290,9 @@ sub wizard_add_entry {
if (any { /^$WPXENAME :/ } cat_($PXEHELP)) {
err_dialog(N("Error !"), N("Found a similar entry in PXE list labeled : $WPXENAME.\nChoose another label please")) and return 'addimg';
}
+ if ($WPXENAME != /^\d+$/) {
+ err_dialog(N("Error !"), N("PXE label should be a name/number without space. Please adjust")) and return 'addimg';
+ }
},
next => 'endadd',
post => sub {
@@ -369,14 +372,14 @@ sub test_similar_label {
# if ($newlabel eq $oldlabel) {
# err_dialog(N("hmm.."), N("You should provide a new label name.")) and return 0;
# } els
- if (any { /^label $newlabel$/ } cat_($conf)) {
+ if (any { /^label\s$newlabel$/ } cat_($conf)) {
err_dialog(N("Error !"), N("Found a similar entry in PXE list labeled : $newlabel.\nChoose another label please")) and return 0;
} else { return 1 };
}
sub edit_box_item {
my ($widget, $treeview) = @_;
- # $::isWizard = 0;
+ $::isWizard = 0;
my $model = $treeview->get_model;
my $selection = $treeview->get_selection;
@@ -389,9 +392,10 @@ sub edit_box_item {
$dialog->set_modal(1);
$dialog->set_resizable(FALSE);
- my $label = Gtk2::Entry->new;
- $label->set_text($listpxe[$i]{label});
- my $oldlabel = $label;
+# my $label = Gtk2::Entry->new;
+ my $label = Gtk2::Label->new($listpxe[$i]{label});
+# $label->set_text($listpxe[$i]{label});
+# my $oldlabel = $label;
my $info = Gtk2::Entry->new;
$info->set_text($listpxe[$i]{info});
@@ -554,7 +558,7 @@ sub add_in_help {
my ($NAME, $INFO) = @_;
if (!any { /$NAME/ } cat_($PXEHELP)) {
append_to_file($PXEHELP, <<EOF);
-$NAME : install $INFO
+$NAME : $INFO
EOF
} else {