summaryrefslogtreecommitdiffstats
path: root/drakpxelinux.pl
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-08-29 14:36:54 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-08-29 14:36:54 +0000
commit84e6982ee1a13c5e188a1b461368f742c62bd655 (patch)
tree7a5ed8795faba0ac0f34369495b44f88a9146ee3 /drakpxelinux.pl
parent6c9a05c4a44ab810573c699f68390c2c3c524c5b (diff)
downloaddrakpxelinux-84e6982ee1a13c5e188a1b461368f742c62bd655.tar
drakpxelinux-84e6982ee1a13c5e188a1b461368f742c62bd655.tar.gz
drakpxelinux-84e6982ee1a13c5e188a1b461368f742c62bd655.tar.bz2
drakpxelinux-84e6982ee1a13c5e188a1b461368f742c62bd655.tar.xz
drakpxelinux-84e6982ee1a13c5e188a1b461368f742c62bd655.zip
various adjustement in GUI
Diffstat (limited to 'drakpxelinux.pl')
-rw-r--r--drakpxelinux.pl128
1 files changed, 58 insertions, 70 deletions
diff --git a/drakpxelinux.pl b/drakpxelinux.pl
index bfdf858..e029d23 100644
--- a/drakpxelinux.pl
+++ b/drakpxelinux.pl
@@ -109,6 +109,18 @@ sub get_items {
[ "/_PXE Server", undef, undef, undef, '<Branch>', ],
[ "/_PXE Server/_Restart", undef, \&restart_dialog, 1, '<StockItem>', 'gtk-execute' ],
+ [ "/_PXE Server/_Reconfigure", undef, sub {
+ eval { wizard_pxe_server() };
+ my $err = $@;
+ $::WizardWindow->destroy if defined $::WizardWindow;
+ undef $::WizardWindow;
+ if ($err && $err !~ /wizcancel/) {
+ err_dialog(N("Error"), N("The PXE server wizard has unexpectedly failed:")
+ . "\n\n" . $err);
+ }
+ }, 1, '<StockItem>', 'gtk-execute' ],
+
+ [ "/_Help/Help", undef, \&show_help, 1, '<StockItem>', 'gtk-help' ],
);
return @items;
}
@@ -222,6 +234,7 @@ sub wizard_add_entry {
welcome => {
name => N("Add an all.rdz boot image") . "\n" . N("To boot through the network, the networked computer needs a boot image. Morever we need to name this image, so each boot image is related to a name in the PXE menu. Thus, the user can choose which image he wants to boot through PXE.") . "\n\n" . N("For technical reasons, in case of multiple boot images, it's simpler to boot the networked computer through a kernel (vmlinuz), and to provide one file with all needed drivers (in our case all.rdz)."),
next => 'addimg',
+ no_back => 1,
},
addimg => {
name => N("When this wizard has finished, the all.rdz image and kernel vmlinuz will be copied into \n%s.\n\nThe PXE menu list will be updated with this new entry.", $network::pxe::pxelinux_images),
@@ -802,7 +815,7 @@ my $systems = Gtk2::SimpleList->new(
N("MAC address") => 'text',
N("Installed") => 'bool',
N("System") => 'text',
- );
+ );
$systems->get_selection->set_mode('multiple');
$systems->get_model->set_sort_column_id(0, 'ascending');
#- don't let the user modify the "Installed" state
@@ -884,8 +897,6 @@ sub profile_selected {
-
-
###############
# Main Program
###############
@@ -912,12 +923,8 @@ $::isWizard = 0;
# create model
my $model = create_model();
-my $window = ugtk2->new("Drakpxelinux $version");
-my $w = ugtk2->new(N("Deployment center"));
-
-$window->{rwindow}->set_size_request(800, 500) unless $::isEmbedded;
-my $W = $window->{window};
-$W->signal_connect(delete_event => sub { ugtk2->exit });
+my $w = ugtk2->new(N("Drakpxelinux"));
+#$w->{rwindow}->set_size_request(800, 500) unless $::isEmbedded;
my $treeview = Gtk2::TreeView->new_with_model($model);
$treeview->set_rules_hint(TRUE);
@@ -970,72 +977,53 @@ gtkpack($w->{window},
gtknew('Notebook', children => [
gtknew('Label', text => N("PXE configuration file")),
gtknew('VBox', spacing => 0, children => [
- 1, gtknew('HBox', spacing => 0, children => [
+ 1, gtknew('HBox', spacing => 1, children => [
1, gtknew('ScrolledWindow', width => 500, height => 300, child => $treeview),
- 0, gtknew('VBox', children_loose => [
- gtknew('Label', text => N("Profiles")),
- gtknew('ScrolledWindow', child => $profiles),
- gtknew('VButtonBox', children_loose => [
- gtksignal_connect(gtknew('Button', text => N("Add profile")), clicked => \&add_profile),
- gtksignal_connect(gtknew('Button', text => N("Clone profile")), clicked => sub {
- network::pxe::clone_profile($profiles_conf, $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
- refresh_profiles();
- }),
- gtksignal_connect(gtknew('Button', text => N("Remove profile")), clicked => sub {
- network::pxe::remove_profile($profiles_conf, $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
- refresh_profiles();
- }),
- ]),
- gtknew('HSeparator'),
- gtknew('VButtonBox', children_loose => [
- gtksignal_connect($install_button = gtknew('Button', text => N("Edit installation settings")), clicked => sub {
- run_program::raw({ detach => 1 }, 'drakpxelinux', '--type=install', '--profile=' . $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
- }),
- gtksignal_connect(gtknew('Button', text => N("Edit boot settings")), clicked => sub {
- run_program::raw({ detach => 1 }, 'drakpxelinux', '--type=boot', '--profile=' . $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
- }),
- ]),
+ 0, gtknew('VBox', children => [
+ 0, gtknew('Label', text => N("Profiles")),
+ 0, gtknew('ScrolledWindow', child => $profiles),
+ 0, gtknew('VButtonBox', layout => 'start', children_loose => [
+ gtksignal_connect(gtknew('Button', text => N("Add profile")), clicked => \&add_profile),
+ gtksignal_connect(gtknew('Button', text => N("Clone profile")), clicked => sub {
+ network::pxe::clone_profile($profiles_conf, $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
+ refresh_profiles();
+ }),
+ gtksignal_connect(gtknew('Button', text => N("Remove profile")), clicked => sub {
+ network::pxe::remove_profile($profiles_conf, $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
+ refresh_profiles();
+ }),
+ ]),
+ 0, gtknew('HSeparator'),
+ 0, gtknew('VButtonBox', layout => 'start', children_loose => [
+ gtksignal_connect(gtknew('Button', text => N("Edit boot settings")), clicked => sub {
+ run_program::raw({ detach => 1 }, 'drakpxelinux', '--type=boot', '--profile=' . $profiles->{data}[$_][0]) foreach $profiles->get_selected_indices;
+ }),
+ ]),
]),
]
),
- 0, gtknew('HBox',
- children => [
- 0, gtknew('HButtonBox', children_loose => [
- gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Add PXE entry")), 'addpxe'), clicked => sub {
- eval { wizard_add_entry($model, $treeview) };
- my $err = $@;
- $::WizardWindow->destroy if defined $::WizardWindow;
- undef $::WizardWindow;
- if ($err && $err !~ /wizcancel/) {
- err_dialog(N("Error"), N("The PXE entry wizard has unexpectedly failed:") . "\n\n" . $err);
- }
- }),
- gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Remove")), 'removepxe'), clicked => sub { remove_item($model, $treeview) }),
- gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Edit")), 'editb'), clicked => sub {
- edit_box_item($model, $treeview) }),
- gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Apply")), 'apply'), clicked => sub { write_conf }),
- ],),
- 0, gtknew('VSeparator'),
- 0, gtknew('HButtonBox', children_loose => [
- gtknew('Label', text => N("Default boot:")),
- $labelscombo,
- ]),
- 0, gtknew('VSeparator'),
- 0, gtknew('HButtonBox', children_loose => [
- gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Reconfigure PXE Server")), 'wizardsrv'), clicked => sub {
- eval { wizard_pxe_server() };
- my $err = $@;
- $::WizardWindow->destroy if defined $::WizardWindow;
- undef $::WizardWindow;
- if ($err && $err !~ /wizcancel/) {
- err_dialog(N("Error"), N("The PXE server wizard has unexpectedly failed:")
- . "\n\n" . $err);
- }
- }),
- gtksignal_connect(new Gtk2::Button(N("Help")), clicked => \&show_help),
- ]),
+ 0, gtknew('VBox', spacing => 1, children => [
+ 0, gtknew('HButtonBox', layout => 'start', children => [
+ 0, gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Add PXE entry")), 'addpxe'), clicked => sub {
+ eval { wizard_add_entry($model, $treeview) };
+ my $err = $@;
+ $::WizardWindow->destroy if defined $::WizardWindow;
+ undef $::WizardWindow;
+ if ($err && $err !~ /wizcancel/) {
+ err_dialog(N("Error"), N("The PXE entry wizard has unexpectedly failed:") . "\n\n" . $err);
+ }
+ }),
+ 0, gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Remove")), 'removepxe'), clicked => sub { remove_item($model, $treeview) }),
+ 0, gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Edit")), 'editb'), clicked => sub {
+ edit_box_item($model, $treeview) }),
+ 0, gtksignal_connect(set_help_tip(Gtk2::Button->new(N("Apply")), 'apply'), clicked => sub { write_conf }),
+ #gtknew('Label', text => N("Default boot:")),
+ #1, $labelscombo,
+ ]
+ ),
]),
- ]),
+ ]
+ ),
gtknew('Label', text => N("Systems")),
gtknew('VBox', spacing => 1,
children => [