Changeset 10575


Ignore:
Timestamp:
02/07/10 03:31:29 (2 years ago)
Author:
tsee
Message:

submersible_toaster: I think this might resolve the issue with catching events from main

Location:
trunk/Padre/lib/Padre
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/SlaveDriver.pm

    r10569 r10575  
    162162 
    163163    # Set the thread-specific main-window pointer 
    164     my $main = Wx::wxTheApp->GetTopWindow(); 
    165     $Padre::TaskManager::_main = $main; 
     164    my $main = Padre->ide->wx;  
    166165 
    167166    #warn threads->tid() . " -- Hi, I'm a thread."; 
  • trunk/Padre/lib/Padre/Task.pm

    r10574 r10575  
    169169        if (not $event_hooks_initialized) { 
    170170            $event_hooks_initialized = 1; 
    171             my $main = Padre->ide->wx->main; 
     171            my $main = Padre->ide->wx; 
    172172            Wx::Event::EVT_COMMAND( 
    173173                $main, 
     
    425425# The main-thread stdout hook 
    426426sub _on_stdout { 
    427     my ( $main, $event ) = @_; 
     427    my ( $wx, $event ) = @_; 
    428428    @_ = (); # hack to avoid "Scalars leaked" 
     429    my $main = $wx->main; 
    429430    my $out = $main->output(); 
    430431    $main->show_output(1); 
     
    436437# The main-thread stderr hook 
    437438sub _on_stderr { 
    438     my ( $main, $event ) = @_; 
     439    my ( $wx, $event ) = @_; 
    439440    @_ = (); # hack to avoid "Scalars leaked" 
     441    my $main = $wx->main; 
    440442    my $out = $main->output(); 
    441443    $main->show_output(1); 
     
    532534 
    533535    Wx::PostEvent( 
    534         $Padre::TaskManager::_main, 
     536        Padre->ide->wx, 
    535537        Wx::PlThreadEvent->new( -1, $eventid, $data ), 
    536538    ); 
  • trunk/Padre/lib/Padre/TaskManager.pm

    r10573 r10575  
    132132    } 
    133133 
    134     my $main = Padre->ide->wx->main; 
     134    my $main = Padre->ide->wx; 
    135135    _init_events($main); 
    136136 
     
    556556 
    557557sub on_task_start_event { 
    558     my ( $main, $event ) = @_; @_ = (); # hack to avoid "Scalars leaked" 
     558    my ( $wx, $event ) = @_; @_ = (); # hack to avoid "Scalars leaked" 
    559559                                        # TO DO/FIXME: 
    560560                                        # This should somehow get at the specific TaskManager object 
    561561                                        # instead of going through the Padre globals! 
     562    my $main = $wx->main; 
    562563    my $manager           = Padre->ide->task_manager; 
    563564    my $tid_and_task_type = $event->GetData(); 
Note: See TracChangeset for help on using the changeset viewer.