Changeset 5597


Ignore:
Timestamp:
06/26/09 07:52:29 (3 years ago)
Author:
submersible_toaster
Message:

add default service to Swarm (Chat) , which will multicast announce when started.
add listener.pl - to watch the transport data
more icon vanity
enable/disable Swarm should send announce/farewell
still no user interface
still no _reading_ from multicast channels and firing Wx::Events

Location:
trunk/Padre-Plugin-Swarm
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Swarm/lib/Padre/Plugin/Swarm.pm

    r5596 r5597  
    88use Padre::Plugin   (); 
    99use Padre::Wx::Icon (); 
    10 use Padre::Swarm::Transport::Multicast (); 
     10use Padre::Swarm::Service::Chat (); 
    1111use File::Spec      (); 
    1212 
     
    1515        get_config => 'config', 
    1616        get_services => 'services', 
    17         get_transports=>'transports', 
    1817    } 
    1918    , 
     
    2120        set_config => 'config', 
    2221        set_services=>'services', 
    23         set_transports=>'transports', 
    2422    }; 
    2523 
     
    4341    'Swarm!'; 
    4442} 
     43 
     44sub plugin_icons_directory { 
     45    return File::Spec->catdir( shift->plugin_share_directory(@_), 'icons'); 
     46} 
     47 
    4548 
    4649sub plugin_icon { 
     
    5356    Padre::Wx::Icon::find(  
    5457            'status/padre-plugin-swarm', 
     58            { icons => $class->plugin_icons_directory }, 
    5559    ); 
    5660} 
     61 
     62 
    5763 
    5864sub menu_plugins_simple { 
     
    6975     
    7076    $self->_load_everything; 
    71      
    72     $self->_start_transports; 
    7377    $self->_start_services; 
    7478     
     
    7983    my $self = shift; 
    8084    $self->_shutdown_services; 
    81     $self->_shutdown_transports; 
    8285} 
    8386 
     
    9497Surrender to the Swarm! 
    9598END_MESSAGE 
    96     $about->SetIcon( Padre::Wx::Icon::find( 'status/padre-plugin-swarm' ) ); 
     99    $about->SetIcon(  
     100        Padre::Wx::Icon::find( 'status/padre-plugin-swarm', 
     101            {size => '128x128', icons=>$self->plugin_icons_directory }  
     102        )  
     103    ); 
    97104    # Show the About dialog 
    98105    Wx::AboutBox($about); 
     
    109116    my $config = $self->get_config;  
    110117    # TODO bootstrap some config and construct 
    111     # services/transports. for now just multicast 
    112      
    113     $self->set_transports( 
    114         { 
    115             Padre::Swarm::Transport::Multicast->transport_name 
    116                 => Padre::Swarm::Transport::Multicast->new 
    117         } 
    118     ); 
    119      
     118    # services/transports. for now just chat 
     119 
     120    my $chat = Padre::Swarm::Service::Chat->new(); 
    120121    $self->set_services( 
    121122        { 
     123            $chat->service_name => $chat, 
    122124        # Chat, remote cursor/editor damage  
    123125        #  , watch this space. 
Note: See TracChangeset for help on using the changeset viewer.