… | |
… | |
325 | $prompt = $LAST_QUERY unless length $prompt; |
325 | $prompt = $LAST_QUERY unless length $prompt; |
326 | $LAST_QUERY = $prompt; |
326 | $LAST_QUERY = $prompt; |
327 | |
327 | |
328 | my $dialog = new CFClient::UI::FancyFrame |
328 | my $dialog = new CFClient::UI::FancyFrame |
329 | title => "Query", |
329 | title => "Query", |
330 | child => my $vbox = new CFClient::UI::VBox; |
330 | child => my $vbox = new CFClient::UI::VBox, |
|
|
331 | on_visibility_change => sub { |
|
|
332 | my ($self, $visible) = @_; |
|
|
333 | $self->center if $visible; |
|
|
334 | }, |
|
|
335 | ; |
331 | |
336 | |
332 | $vbox->add (new CFClient::UI::Label |
337 | $vbox->add (new CFClient::UI::Label |
333 | max_w => $::WIDTH * 0.4, |
338 | max_w => $::WIDTH * 0.4, |
334 | ellipsise => 0, |
339 | ellipsise => 0, |
335 | text => $prompt); |
340 | text => $prompt); |
… | |
… | |
377 | ); |
382 | ); |
378 | |
383 | |
379 | $entry->focus_in; |
384 | $entry->focus_in; |
380 | } |
385 | } |
381 | |
386 | |
382 | $dialog->show_centered; |
387 | $dialog->show; |
383 | } |
388 | } |
384 | |
389 | |
385 | sub drawinfo { |
390 | sub drawinfo { |
386 | my ($self, $color, $text) = @_; |
391 | my ($self, $color, $text) = @_; |
387 | |
392 | |