aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop/migration_tips.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-03-15 17:32:07 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-03-15 17:32:07 +0100
commit9be5405e5bcce7fc3f7e51a6b2912d07ed652b2d (patch)
tree9c18bd24951b490de91b55265775599756de0220 /phpBB/develop/migration_tips.php
parent873b5686a1e361cded1c9310829035579168b227 (diff)
downloadforums-9be5405e5bcce7fc3f7e51a6b2912d07ed652b2d.tar
forums-9be5405e5bcce7fc3f7e51a6b2912d07ed652b2d.tar.gz
forums-9be5405e5bcce7fc3f7e51a6b2912d07ed652b2d.tar.bz2
forums-9be5405e5bcce7fc3f7e51a6b2912d07ed652b2d.tar.xz
forums-9be5405e5bcce7fc3f7e51a6b2912d07ed652b2d.zip
[prep-release-3.1.0-b1] Update build version to 3.1.0-b2-dev
Diffstat (limited to 'phpBB/develop/migration_tips.php')
0 files changed, 0 insertions, 0 deletions
/a> 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
package interactive_newt;

use diagnostics;
use strict;
use vars qw(@ISA);

@ISA = qw(interactive);

use interactive;
use common qw(:common :functional);
use log;
use Newt::Newt; #- !! provides Newt and not Newt::Newt

my $width = 80;
my $height = 25;
my @wait_messages;

sub new() {
    Newt::Init;
    Newt::Cls;
    Newt::SetSuspendCallback;
    open STDERR,">/dev/null" if $::isStandalone;
    bless {}, $_[0];
}

sub suspend { Newt::Suspend }
sub resume { Newt::Resume }
sub end() { Newt::Finished }
sub exit() { end; exit($_[0]) }
END { end() }

sub myTextbox {
    my @l = map { split "\n" } @_;
    my $mess = Newt::Component::Textbox(1, 0, my $w = max(map { length } @l) + 1, my $h = @l, 1 << 6);
    $mess->TextboxSetText(join("\n", @_));
    $mess, $w + 1, $h;
}

sub separator($$) {
    my $blank = Newt::Component::Form(\undef, '', 0);
    $blank->FormSetWidth ($_[0]);
    $blank->FormSetHeight($_[1]);
    $blank;
}
sub checkval($) { $_[0] && $_[0] ne ' '  ? '*' : ' ' }

sub ask_from_listW {
    my ($o, $title_, $messages, $l, $def) = @_;
    my ($title, @okcancel) = ref $title_ ? @$title_ : ($title_, _("Ok"), _("Cancel"));

    my $mesg = join("\n", @$messages);
    my $len = 0; $len += length($_) foreach @$l;

    if (@$l == 1) {
	Newt::WinMessage($title, @$l, $mesg);
	$l->[0];
#- because newt will not try to remove window if bigger than screen !
    } elsif (@$l == 2 && $len < 64) {
	$l->[Newt::WinChoice($title, @$l, $mesg) - 1];