Changeset 2483


Ignore:
Timestamp:
Jul 24, 2007, 8:12:56 PM (15 years ago)
Author:
charles
Message:

fix systray icon size and "exit" command.

Location:
trunk/wx
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wx/images/Makefile.am

    r2467 r2483  
    1010    stop.png \
    1111    stop.xpm \
     12    systray.xpm \
    1213    transmission.png \
    1314    transmission.xpm
  • trunk/wx/xmission.cc

    r2476 r2483  
    4141  #include <images/gtk-remove.xpm>
    4242  #include <images/stop.xpm>
     43  #include <images/systray.xpm>
    4344  #include <images/transmission.xpm>
    4445}
     
    6667
    6768public:
    68     void OnQuit( wxCommandEvent& );
     69    void OnExit( wxCommandEvent& );
    6970    void OnAbout( wxCommandEvent& );
    7071    void OnOpen( wxCommandEvent& );
     
    8485    TorrentListCtrl * myTorrentList;
    8586    wxListCtrl * myFilters;
    86     wxTaskBarIcon * myTaskBarIcon;
    87     wxIcon * myLogoIcon;
    88     wxIcon * myTrayLogo;
     87    wxTaskBarIcon myTrayIcon;
     88    wxIcon myLogoIcon;
     89    wxIcon myTrayIconIcon;
    8990    torrents_v myTorrents;
    9091    torrents_v mySelectedTorrents;
     
    154155    frame->Connect( wxID_OPEN, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) &MyFrame::OnOpen );
    155156    frame->Connect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) &MyFrame::OnAbout );
    156     frame->Connect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) &MyFrame::OnQuit );
     157    frame->Connect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) &MyFrame::OnExit );
    157158    frame->Connect( ID_Pulse, wxEVT_TIMER, (wxObjectEventFunction) &MyFrame::OnTimer );
    158159
     
    254255    s +=_("Upload: ");
    255256    s +=  getReadableSpeed( ul );
    256     myTaskBarIcon->SetIcon( *myTrayLogo, s );
     257    myTrayIcon.SetIcon( myTrayIconIcon, s );
    257258}
    258259
     
    268269    wxFrame((wxFrame*)NULL,-1,title,pos,size),
    269270    myConfig( new wxConfig( _T("xmission") ) ),
    270     myPulseTimer( this, ID_Pulse )
    271 {
    272     myLogoIcon = new wxIcon( transmission_xpm );
    273     SetIcon( *myLogoIcon );
    274 
    275 /*#if wxCHECK_VERSION(2,8,0)
    276     transmission_logo.Rescale( 24, 24, wxIMAGE_QUALITY_HIGH );
    277 #else
    278     transmission_logo.Rescale( 24, 24 );
    279 #endif
    280     myTrayLogo = new wxIcon;
    281     myTrayLogo->CopyFromBitmap( wxBitmap( transmission_logo ) );*/
    282     myTrayLogo = myLogoIcon;
    283 
    284 
     271    myPulseTimer( this, ID_Pulse ),
     272    myLogoIcon( transmission_xpm ),
     273    myTrayIconIcon( systray_xpm )
     274{
    285275    /**
    286276    ***  Menu
     
    397387    myPulseTimer.Start( 1500 );
    398388
    399     myTaskBarIcon = new wxTaskBarIcon( );
    400 
    401389    /**
    402390    ***  Load the torrents
     
    415403}
    416404
    417 void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
    418 {
    419     Close( true );
     405void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
     406{
     407    Destroy( );
    420408}
    421409
Note: See TracChangeset for help on using the changeset viewer.