Changeset 2468 for trunk/wx/xmission.cc


Ignore:
Timestamp:
Jul 23, 2007, 5:36:34 PM (15 years ago)
Author:
charles
Message:

more image work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wx/xmission.cc

    r2467 r2468  
    1616#include <stdint.h>
    1717#include <wx/artprov.h>
     18#include <wx/bitmap.h>
    1819#include <wx/defs.h>
    1920#include <wx/config.h>
     21#include <wx/image.h>
    2022#include <wx/listctrl.h>
     23#include <wx/notebook.h>
     24#include <wx/splitter.h>
    2125#include <wx/taskbar.h>
    2226#include <wx/toolbar.h>
    23 #include <wx/splitter.h>
    24 #include <wx/notebook.h>
    2527#include <wx/wx.h>
    2628#if wxCHECK_VERSION(2,8,0)
     
    203205    myPulseTimer( this, ID_Pulse )
    204206{
    205     wxImage transmission_logo ( transmission_xpm );
    206     myLogoIcon = new wxIcon;
    207     myLogoIcon->CopyFromBitmap( wxBitmap( transmission_logo ) );
     207    myLogoIcon = new wxIcon( transmission_xpm );
    208208    SetIcon( *myLogoIcon );
    209 #if wxCHECK_VERSION(2,8,0)
     209
     210/*#if wxCHECK_VERSION(2,8,0)
    210211    transmission_logo.Rescale( 24, 24, wxIMAGE_QUALITY_HIGH );
    211212#else
     
    213214#endif
    214215    myTrayLogo = new wxIcon;
    215     myTrayLogo->CopyFromBitmap( wxBitmap( transmission_logo ) );
     216    myTrayLogo->CopyFromBitmap( wxBitmap( transmission_logo ) );*/
     217    myTrayLogo = myLogoIcon;
    216218
    217219
     
    252254    **/
    253255
    254     wxImage open_image( fileopen_xpm );
    255     wxImage exec_image( exec_xpm );
    256     wxImage stop_image( stop_xpm );
    257     wxImage drop_image( gtk_remove_xpm );
    258     wxImage info_image( gtk_properties_xpm );
     256    wxIcon open_icon( fileopen_xpm );
     257    wxIcon exec_icon( exec_xpm );
     258    wxIcon stop_icon( stop_xpm );
     259    wxIcon drop_icon( gtk_remove_xpm );
     260    wxIcon info_icon( gtk_properties_xpm );
     261    wxBitmap bitmap;
    259262
    260263    wxToolBar* toolbar = CreateToolBar( wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT | wxTB_TEXT );
    261264    toolbar->SetToolBitmapSize( wxSize( 16, 16 ) );
    262     toolbar->AddTool( wxID_OPEN,   _T("Open"), open_image );
    263     toolbar->AddTool( ID_START,    _T("Start"), exec_image );
    264     toolbar->AddTool( wxID_STOP,   _T("Stop"), stop_image );
    265     toolbar->AddTool( wxID_REMOVE, _T("Remove"), drop_image );
     265    bitmap.CopyFromIcon( open_icon );
     266    toolbar->AddTool( wxID_OPEN,   _T("Open"), bitmap );
     267    bitmap.CopyFromIcon( exec_icon );
     268    toolbar->AddTool( ID_START,    _T("Start"), bitmap );
     269    bitmap.CopyFromIcon( stop_icon );
     270    toolbar->AddTool( wxID_STOP,   _T("Stop"), bitmap );
     271    bitmap.CopyFromIcon( drop_icon );
     272    toolbar->AddTool( wxID_REMOVE, _T("Remove"), bitmap );
    266273    toolbar->AddSeparator();
    267     toolbar->AddTool( ID_TORRENT_INFO, _("Torrent Info"), info_image );
     274    bitmap.CopyFromIcon( info_icon );
     275    toolbar->AddTool( ID_TORRENT_INFO, _("Torrent Info"), bitmap );
    268276    toolbar->Realize();
    269277
     
    347355void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
    348356{
    349     wxImage transmission_logo ( transmission_xpm );
    350     wxIcon ico;
    351     ico.CopyFromBitmap( wxBitmap( transmission_logo ) );
     357    wxIcon ico( transmission_xpm );
    352358
    353359#if wxCHECK_VERSION(2,8,0)
Note: See TracChangeset for help on using the changeset viewer.