spek

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

commit a380a77bdd942e9c94d22e95244855695c876210
parent 969b13b80f3fcbcfa5a73cc86f2f2d89b3556548
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Wed,  5 Sep 2012 21:11:14 -0700

Tidy

Diffstat:
MAUTHORS.md | 2+-
Mlib/spek-audio.c | 2+-
Msrc/spek-artwork.cc | 62++++++++++++++++++++++++++++++--------------------------------
3 files changed, 32 insertions(+), 34 deletions(-)

diff --git a/AUTHORS.md b/AUTHORS.md @@ -23,7 +23,7 @@ Translators: * Tiago Rinaldi * Wouter Bolsterlee -Artist: +Artists: * Olga Vasylevska * Silvestre Herrera diff --git a/lib/spek-audio.c b/lib/spek-audio.c @@ -196,7 +196,7 @@ int spek_audio_read(struct spek_audio_context *cx) { } } -void spek_audio_close (struct spek_audio_context *cx) +void spek_audio_close(struct spek_audio_context *cx) { if (cx->properties.codec_name != NULL) { free(cx->properties.codec_name); diff --git a/src/spek-artwork.cc b/src/spek-artwork.cc @@ -25,7 +25,7 @@ class SpekArtProvider : public wxArtProvider { protected: virtual wxBitmap CreateBitmap(const wxArtID& id, const wxArtClient& client, const wxSize& size); -#if ART_HAS_ICON_BUNDLES +#if wxCHECK_VERSION(2, 9, 0) virtual wxIconBundle CreateIconBundle(const wxArtID& id, const wxArtClient& client); #endif }; @@ -33,74 +33,72 @@ protected: wxBitmap SpekArtProvider::CreateBitmap( const wxArtID& id, const wxArtClient& client, const wxSize& size) { - if (id == ART_SPEK) { #ifdef OS_UNIX + if (id == ART_SPEK) { return wxArtProvider::GetBitmap(wxT("spek"), client, size); -#endif } if (id == ART_ABOUT) { -#ifdef OS_UNIX return wxArtProvider::GetBitmap(wxT("gtk-about"), client, size); -#endif -#ifdef OS_WIN - return wxIcon(wxT("about"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); -#endif -#ifdef OS_OSX - return wxBitmap(wxT("about"), wxBITMAP_TYPE_PNG_RESOURCE); -#endif } if (id == ART_OPEN) { -#ifdef OS_UNIX return wxArtProvider::GetBitmap(wxT("gtk-open"), client, size); -#endif -#ifdef OS_WIN - return wxIcon(wxT("open"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); -#endif -#ifdef OS_OSX - return wxBitmap(wxT("open"), wxBITMAP_TYPE_PNG_RESOURCE); -#endif } if (id == ART_SAVE) { -#ifdef OS_UNIX return wxArtProvider::GetBitmap(wxT("gtk-save"), client, size); -#endif -#ifdef OS_WIN - return wxIcon(wxT("save"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); -#endif -#ifdef OS_OSX - return wxBitmap(wxT("save"), wxBITMAP_TYPE_PNG_RESOURCE); -#endif } if (id == ART_CLOSE) { -#ifdef OS_UNIX return wxArtProvider::GetBitmap(wxT("gtk-close"), client, size); + } #endif #ifdef OS_WIN + if (id == ART_ABOUT) { + return wxIcon(wxT("about"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); + } + if (id == ART_OPEN) { + return wxIcon(wxT("open"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); + } + if (id == ART_SAVE) { + return wxIcon(wxT("save"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24); + } + if (id == ART_CLOSE) { return wxIcon(wxT("close"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16); + } #endif #ifdef OS_OSX + if (id == ART_ABOUT) { + return wxBitmap(wxT("about"), wxBITMAP_TYPE_PNG_RESOURCE); + } + if (id == ART_OPEN) { + return wxBitmap(wxT("open"), wxBITMAP_TYPE_PNG_RESOURCE); + } + if (id == ART_SAVE) { + return wxBitmap(wxT("save"), wxBITMAP_TYPE_PNG_RESOURCE); + } + if (id == ART_CLOSE) { return wxBitmap(wxT("close"), wxBITMAP_TYPE_PNG_RESOURCE); -#endif } +#endif return wxNullBitmap; } -#if ART_HAS_ICON_BUNDLES +#if wxCHECK_VERSION(2, 9, 0) wxIconBundle SpekArtProvider::CreateIconBundle(const wxArtID& id, const wxArtClient& client) { - if (id == ART_SPEK) { #ifdef OS_UNIX + if (id == ART_SPEK) { return wxArtProvider::GetIconBundle(wxT("spek"), client); + } #endif #ifdef OS_WIN + if (id == ART_SPEK) { wxIconBundle bundle; bundle.AddIcon(wxIcon(wxT("aaaa"), wxBITMAP_TYPE_ICO_RESOURCE, 16, 16)); bundle.AddIcon(wxIcon(wxT("aaaa"), wxBITMAP_TYPE_ICO_RESOURCE, 24, 24)); bundle.AddIcon(wxIcon(wxT("aaaa"), wxBITMAP_TYPE_ICO_RESOURCE, 32, 32)); bundle.AddIcon(wxIcon(wxT("aaaa"), wxBITMAP_TYPE_ICO_RESOURCE, 48, 48)); return bundle; -#endif } +#endif return wxNullIconBundle; } #endif