1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 package install_steps_newt; # $Id$ use diagnostics; use strict; use vars qw(@ISA); @ISA = qw(install_steps_interactive interactive::newt); #-###################################################################################### #- misc imports #-###################################################################################### use install_steps_interactive; use interactive::newt; use install_any; use devices; use lang; use common; my $banner = __(); sub banner { my $banner = translate(__("Mandrake Linux Installation %s")); my $l = first(Newt::GetScreenSize) - length($banner) - length($_[0]) + 1; Newt::DrawRootText(0, 0, sprintf($banner, ' ' x $l . $_[0])); Newt::Refresh; } sub new($$) { my ($type, $o) = @_; interactive::newt->new; banner(''); #-PO This string must fit in a 80-char wide text screen Newt::PushHelpLine(_(" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen ")); (bless {}, ref $type || $type)->SUPER::new($o); } sub enteringStep { my ($o, $step) = @_; $o->SUPER::enteringStep($step); banner(translate($o->{steps}{$step}{text})); } sub exitInstall { &install_steps_interactive::exitInstall; interactive::newt::end(); } #-###################################################################################### #- Steps Functions #-###################################################################################### sub selectLanguage { my ($o) = @_; $o->SUPER::selectLanguage; lang::load_console_font($o->{lang}); } 1;