Mercurial > mplayer.hg
view debian/config @ 9009:f2d4324561b2
1) Removed the code to remove {} from sub_read_line_ssa
2) Put this code in a separated function: sub_pp_ssa
3) After recoding added a call to sub_pp_ssa. To be more acqurate: I
added a pointer to function to hold a postprocessing function to be
invoked after using iconv. There are one pointer for each format, if
this pointer isn.t NULL the post processing function is called.
patch by Salvador Eduardo Tropea <salvador@inti.gov.ar>
help by <hephooey@fastmail.fm>
author | arpi |
---|---|
date | Sun, 19 Jan 2003 00:54:55 +0000 |
parents | 6746866a94c6 |
children | a5bef61f49bf |
line wrap: on
line source
#!/usr/bin/perl -w # Script to configure mplayer # based on etherconf by John Goerzen <jgoerzen@progenylinux.com> use Debconf::Client::ConfModule qw(:all); my $version = version(2.0); title('MPlayer Configuration'); my $PRIORITY = 'high'; #TODO: 'medium' my $next = 'mainmenu'; my $isediting = 0; my @nextargs = (); checkupgrade(); # Find out if we have to upgrade. mainloop(letsgo()); sub checkupgrade { open(MCFG, "</etc/mplayer/mplayer.conf") || return 1; my $line = <MCFG>; return 1 if ($line =~ /mplayer DEBCONF AREA/); exit(0) if (input($PRIORITY, 'mplayer/replace-existing-files') eq "question skipped"); go(); if (get('mplayer/replace-existing-files') eq 'false') { input($PRIORITY, 'mplayer/replace-existing-files-bail'); go(); exit(); } close MCFG; } sub mainloop { $next = shift @_; do { my @retval = &$next(@nextargs); # if ($retval[0] eq 'BACK') { # $retval[0] = $backups{$next}; # } ($next, @nextargs) = @retval; } while ($next ne 'Exit'); } sub letsgo { #useless! return "configure"; } sub configure { subst("mplayer/voutput", "vochoices", "xv, xmga, mga, x11, gl, sdl, xvidix"); # db_subst mplayer/output vo xc,xmga,mga,x11,gl,sdl exit(0) if (input($PRIORITY, "mplayer/voutput") eq "question skipped"); go(); exit 0 unless (get("mplayer/voutput") eq 'true'); #return 'audioout'; return 'mainmenu'; } sub mainmenu { go(); # To catch spare things from before my @choices = ( 'Video Output: ' . scalar(get("mplayer/voutput"))); #, $choices = join(', ', @choices); $isediting = 1; subst('mplayer/mainmenu', 'choices', $choices); input($PRIORITY, 'mplayer/mainmenu'); go(); my $selection = get('mplayer/mainmenu'); if ($selection =~ /^Exit/) { return 'Exit'; } # Set to redisplay. fset('mplayer/mainmenu', 'isdefault', 'true'); $_ = $selection; return 'configure' if /^Video/; # return 'aoutput' if /^Aoutput/; return 'Exit'; } sub editreturn { my @args = @_; return 'mainmenu' if $isediting; return @args; } sub editfix { my $template = shift @_; if ($isediting) { fset($template, 'isdefault', 'true'); } }