summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps_curses.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
commit126777bc019a54afb4ec51299f2cf9d2841698aa (patch)
tree97f76e571902ead55ba138f1156a4b4f00b9b779 /perl-install/install/steps_curses.pm
parentf1f67448efc714873378dfeb8279fae68054a90a (diff)
downloaddrakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.gz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.bz2
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.xz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.zip
re-sync after the big svn loss
Diffstat (limited to 'perl-install/install/steps_curses.pm')
-rw-r--r--perl-install/install/steps_curses.pm68
1 files changed, 68 insertions, 0 deletions
diff --git a/perl-install/install/steps_curses.pm b/perl-install/install/steps_curses.pm
new file mode 100644
index 000000000..213993839
--- /dev/null
+++ b/perl-install/install/steps_curses.pm
@@ -0,0 +1,68 @@
+package install::steps_curses; # $Id$
+
+use diagnostics;
+use strict;
+use vars qw(@ISA);
+
+@ISA = qw(install::steps_interactive interactive::curses);
+
+#-######################################################################################
+#- misc imports
+#-######################################################################################
+use install::steps_interactive;
+use interactive::curses;
+use install::any;
+use devices;
+use lang;
+use common;
+
+my $banner;
+sub banner {
+ my ($cui, $step) = @_;
+ my $text = N("Mandriva Linux Installation %s", $step);
+ $banner ||= do {
+ my $win = $cui->add(undef, 'Window', '-x' => 1, '-y' => 0, '-height' => 1);
+ $win->add(undef, 'Label');
+ };
+ $banner->text($text);
+}
+
+sub help_line {
+ my ($cui) = @_;
+ my $text = N("<Tab>/<Alt-Tab> between elements");
+ my $win = $cui->add(undef, 'Window', '-x' => 1, '-y' => -1, '-height' => 1);
+ $win->add(undef, 'Label', '-text' => $text);
+}
+
+sub new {
+ my ($type, $o) = @_;
+
+ add2hash($o, interactive::curses->new);
+
+ #- unset DISPLAY so that code testing wether DISPLAY is set can know we don't have or use X
+ delete $ENV{DISPLAY};
+
+ banner($o->{cui}, '');
+ help_line($o->{cui});
+
+ (bless {}, ref($type) || $type)->SUPER::new($o);
+}
+
+sub charsetChanged {
+ my ($o) = @_;
+ lang::load_console_font($o->{locale});
+}
+
+sub enteringStep {
+ my ($o, $step) = @_;
+ $o->SUPER::enteringStep($step);
+ banner($o->{cui}, translate($o->{steps}{$step}{text}));
+}
+
+sub exitInstall {
+ &install::steps_interactive::exitInstall;
+ interactive::curses::end();
+}
+
+1;
+