Changeset 10972
- Timestamp:
- 03/02/10 04:39:03 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Wx/Dialog/HelpSearch.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Wx/Dialog/HelpSearch.pm
r10971 r10972 276 276 sub { 277 277 $self->_index(undef); 278 $self->_update_list_box; 279 $self->_search_text->Enable(1); 280 $self->_topic_selector->Enable(1); 281 $self->_list->Enable(1); 282 $self->_search_text->SetFocus(); 278 if( $self->_update_list_box ) { 279 $self->_search_text->Enable(1); 280 $self->_topic_selector->Enable(1); 281 $self->_list->Enable(1); 282 $self->_search_text->SetFocus(); 283 } else { 284 $self->_search_text->ChangeValue(''); 285 } 283 286 Wx::Event::EVT_IDLE( $self, undef ); 284 287 } … … 296 299 my $self = shift; 297 300 298 # a default..299 my @empty = ();300 $self->_index( \@empty );301 302 # TODO: If the _help_provide call crashes then this _search seem to be called in a recursive loop303 # until the whole applications freezes.304 301 # Generate a sorted file-list based on filename 305 302 if ( not $self->_help_provider ) { … … 371 368 my $self = shift; 372 369 373 if ( not $self->_index ) { 374 $self->_search; 375 } 370 # Clear the list 371 $self->_list->Clear(); 372 373 # Try to fetch a help index and return nothing if otherwise 374 $self->_search unless $self->_index; 375 return unless $self->_index; 376 376 377 377 my $search_expr = $self->_search_text->GetValue(); … … 379 379 380 380 #Populate the list box now 381 $self->_list->Clear();382 381 my $pos = 0; 383 382 foreach my $target ( @{ $self->_index } ) { … … 396 395 $self->_display_help_in_viewer; 397 396 398 return ;397 return 1; 399 398 } 400 399
Note: See TracChangeset
for help on using the changeset viewer.
