summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-16 21:29:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-16 21:29:21 +0000
commitfcf878eabd2895a3e0d3146d30426ff1115a1a87 (patch)
tree9958540a6b88bf02a6d796a675cd0c8e333825ce
parent2a90638c1978c69b0d00120bf6a686a5ac3c186d (diff)
downloaddrakx-fcf878eabd2895a3e0d3146d30426ff1115a1a87.tar
drakx-fcf878eabd2895a3e0d3146d30426ff1115a1a87.tar.gz
drakx-fcf878eabd2895a3e0d3146d30426ff1115a1a87.tar.bz2
drakx-fcf878eabd2895a3e0d3146d30426ff1115a1a87.tar.xz
drakx-fcf878eabd2895a3e0d3146d30426ff1115a1a87.zip
summary written in gtk, isn't it nice (?)
-rw-r--r--perl-install/install_steps_gtk.pm44
1 files changed, 44 insertions, 0 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 8aee1b171..54f3d1d5a 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -618,4 +618,48 @@ N("There was an error installing packages:"), $1, N("Go on anyway?") ], 1) and r
$install_result;
}
+sub summary_prompt {
+ my ($o, $l, $check_complete) = @_;
+
+ my $w = ugtk2->new('');
+
+ my $set_entry_labels;
+ my @table;
+ my %group;
+ foreach my $e (@$l) {
+ $group{$e->{group}} ||= do {
+ push @table, [ gtkpack__(Gtk2::HBox->new(0, 0), $e->{group}), '' ];
+ };
+ $e->{widget} = Gtk2::Label->new;
+ push @table, [], [ gtkpack__(Gtk2::HBox->new(0, 20), '', $e->{widget}),
+ gtksignal_connect(Gtk2::Button->new(N("Configure")), clicked => sub {
+ $w->{rwindow}->hide;
+ $e->{clicked}();
+ $w->{rwindow}->show;
+ $set_entry_labels->();
+ }) ];
+ }
+
+ $set_entry_labels = sub {
+ foreach (@$l) {
+ my $t = $_->{val}() || '<span foreground="red">' . N("not configured") . '</span>';
+ $_->{widget}->set_markup($_->{label} . ' - ' . $t);
+ }
+ };
+ $set_entry_labels->();
+
+ my $help_sub = $o->interactive_help_sub_display_id('summary');
+
+ gtkadd($w->{window},
+ gtkpack_(Gtk2::VBox->new(0,5),
+ 1, create_packtable({ mcc => 1 }, @table),
+ 0, $w->create_okcancel(undef, '', '', if_($help_sub, [ N("Help"), $help_sub, 1 ]))
+ ));
+
+ while (1) {
+ $w->main;
+ last if $check_complete->();
+ }
+}
+
1;