my $w = 350; my $h = 200; # Abbruchsvariable resetten falls gesetzt $Config{abbr} &&= 0; my ($width,$height,$pos_x,$pos_y) = split /\+|x/,$Config{main_window}->geometry(); $Config{tl} = $Config{main_window}->Toplevel(-title=>'Startkriterien'); $Config{tl}->Icon(-image=>$Config{Icon}); $Config{tl}->minsize($w,$h); $Config{tl}->geometry('+' . int($width / 2 + $pos_x - $w / 2) . '+' . int($height / 2 + $pos_y - $h / 2) ); $Config{tl}->focusForce(); my $frame = $Config{tl}->Frame()->pack(-anchor=>'n'); $frame->Label(-text=>'') ->grid(-column=>0,-row=>0,-sticky=>'ew'); $frame->Label(-text=>'') ->grid(-column=>1,-row=>0,-sticky=>'ew'); $frame->Label(-text=>'Startpfad:',-anchor=>'w') ->grid(-column=>0,-row=>1,-sticky=>'ew'); $frame->Entry(-textvariable=>\$Config{start}) ->grid(-column=>1,-row=>1,-sticky=>'ew'); $frame->Label(-text=>'Suchtext:',-anchor=>'w') ->grid(-column=>0,-row=>2,-sticky=>'ew'); $frame->Entry(-textvariable=>\$Config{suche}) ->grid(-column=>1,-row=>2,-sticky=>'ew'); $frame->Label(-text=>'Ersetzung:',-anchor=>'w') ->grid(-column=>0,-row=>3,-sticky=>'ew'); $frame->Entry(-textvariable=>\$Config{ersetzung}) ->grid(-column=>1,-row=>3,-sticky=>'ew'); $frame->Label(-text=>'Versuchen das Ziel aufzulösen?:',-anchor=>'w') ->grid(-column=>0,-row=>4,-sticky=>'ew'); $frame->Checkbutton(-variable=>\$Config{resolve},-anchor=>'w') ->grid(-column=>1,-row=>4,-sticky=>'ew'); $frame->Label(-text=>'Bestätigung beim Auflösen?:',-anchor=>'w') ->grid(-column=>0,-row=>5,-sticky=>'ew'); $frame->Checkbutton(-variable=>\$Config{confirm},-anchor=>'w') ->grid(-column=>1,-row=>5,-sticky=>'ew'); $frame->Label(-text=>'') ->grid(-column=>0,-row=>6,-sticky=>'ew'); $frame->Label(-text=>'') ->grid(-column=>1,-row=>6,-sticky=>'ew'); $frame->Button(-text => 'Start', -command => \&_durchsuchen, -width => 20) ->grid(-column=>0,-row=>7); $frame->Button(-text => 'Abbrechen', -command => sub{$Config{tl}->destroy();}, -width => 20) ->grid(-column=>1,-row=>7); # Bindungen $Config{tl}->bind('',\&_durchsuchen);