spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit e63c3db43d706dc74b33b4ad6a18708bcc708480
parent 76d0109dc847bdcc3d808783903c9b0cab2d945e
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Tue,  4 Sep 2012 22:53:00 -0700

win: Bundle the close icon, refs #21

Diffstat:
Adist/win/close.ico | 0
Mdist/win/spek.rc | 1+
Msrc/spek-artwork.cc | 8++++++++
Msrc/spek-window.cc | 2+-
4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/dist/win/close.ico b/dist/win/close.ico Binary files differ. diff --git a/dist/win/spek.rc b/dist/win/spek.rc @@ -2,3 +2,4 @@ aaaa ICON "spek.ico" about ICON "about.ico" open ICON "open.ico" save ICON "save.ico" +close ICON "close.ico" diff --git a/src/spek-artwork.cc b/src/spek-artwork.cc @@ -62,6 +62,14 @@ wxBitmap SpekArtProvider::CreateBitmap( return wxIcon(wxT("save"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); #endif } + if (id == ART_CLOSE) { +#ifdef OS_UNIX + return wxArtProvider::GetBitmap(wxT("gtk-close"), client, size); +#endif +#ifdef OS_WIN + return wxIcon(wxT("close"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); +#endif + } return wxNullBitmap; } diff --git a/src/spek-window.cc b/src/spek-window.cc @@ -147,7 +147,7 @@ SpekWindow::SpekWindow(const wxString& path) : info_bar->Connect(wxEVT_LEFT_DOWN, wxCommandEventHandler(SpekWindow::on_visit)); info_sizer->Add(label, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6); wxBitmapButton *button = new wxBitmapButton( - info_bar, -1, wxArtProvider::GetBitmap(wxT("gtk-close")), + info_bar, -1, wxArtProvider::GetBitmap(ART_CLOSE, wxART_BUTTON), wxDefaultPosition, wxDefaultSize, wxNO_BORDER); button->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SpekWindow::on_close)); info_sizer->Add(button, 0, wxALIGN_CENTER_VERTICAL);