Changeset 10575
- Timestamp:
- 02/07/10 03:31:29 (7 months ago)
- Location:
- trunk/Padre/lib/Padre
- Files:
-
- 3 modified
-
SlaveDriver.pm (modified) (1 diff)
-
Task.pm (modified) (4 diffs)
-
TaskManager.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/SlaveDriver.pm
r10569 r10575 162 162 163 163 # Set the thread-specific main-window pointer 164 my $main = Wx::wxTheApp->GetTopWindow(); 165 $Padre::TaskManager::_main = $main; 164 my $main = Padre->ide->wx; 166 165 167 166 #warn threads->tid() . " -- Hi, I'm a thread."; -
trunk/Padre/lib/Padre/Task.pm
r10574 r10575 169 169 if (not $event_hooks_initialized) { 170 170 $event_hooks_initialized = 1; 171 my $main = Padre->ide->wx ->main;171 my $main = Padre->ide->wx; 172 172 Wx::Event::EVT_COMMAND( 173 173 $main, … … 425 425 # The main-thread stdout hook 426 426 sub _on_stdout { 427 my ( $ main, $event ) = @_;427 my ( $wx, $event ) = @_; 428 428 @_ = (); # hack to avoid "Scalars leaked" 429 my $main = $wx->main; 429 430 my $out = $main->output(); 430 431 $main->show_output(1); … … 436 437 # The main-thread stderr hook 437 438 sub _on_stderr { 438 my ( $ main, $event ) = @_;439 my ( $wx, $event ) = @_; 439 440 @_ = (); # hack to avoid "Scalars leaked" 441 my $main = $wx->main; 440 442 my $out = $main->output(); 441 443 $main->show_output(1); … … 532 534 533 535 Wx::PostEvent( 534 $Padre::TaskManager::_main,536 Padre->ide->wx, 535 537 Wx::PlThreadEvent->new( -1, $eventid, $data ), 536 538 ); -
trunk/Padre/lib/Padre/TaskManager.pm
r10573 r10575 132 132 } 133 133 134 my $main = Padre->ide->wx ->main;134 my $main = Padre->ide->wx; 135 135 _init_events($main); 136 136 … … 556 556 557 557 sub on_task_start_event { 558 my ( $ main, $event ) = @_; @_ = (); # hack to avoid "Scalars leaked"558 my ( $wx, $event ) = @_; @_ = (); # hack to avoid "Scalars leaked" 559 559 # TO DO/FIXME: 560 560 # This should somehow get at the specific TaskManager object 561 561 # instead of going through the Padre globals! 562 my $main = $wx->main; 562 563 my $manager = Padre->ide->task_manager; 563 564 my $tid_and_task_type = $event->GetData();
