summaryrefslogtreecommitdiff
path: root/library/resources.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:10:11 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:10:11 +0200
commitc0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch)
tree4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /library/resources.cpp
parent3.13 (diff)
downloadFreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz
FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2
FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip
3.14
Diffstat (limited to 'library/resources.cpp')
-rw-r--r--library/resources.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/library/resources.cpp b/library/resources.cpp
index 5ef33826..d07e66a8 100644
--- a/library/resources.cpp
+++ b/library/resources.cpp
@@ -18,7 +18,7 @@
using namespace ffs3;
-const GlobalResources& GlobalResources::getInstance()
+const GlobalResources& GlobalResources::instance()
{
static GlobalResources instance;
return instance;
@@ -31,6 +31,8 @@ GlobalResources::GlobalResources()
animationMoney = new wxAnimation(wxNullAnimation);
animationSync = new wxAnimation(wxNullAnimation);
programIcon = new wxIcon(wxNullIcon);
+
+ load();
}
@@ -65,7 +67,7 @@ void loadAnimFromZip(wxZipInputStream& zipInput, wxAnimation* animation)
}
-void GlobalResources::load() const
+void GlobalResources::load()
{
wxFFileInputStream input(ffs3::getResourceDir() + wxT("Resources.dat"));
if (input.IsOk()) //if not... we don't want to react too harsh here
@@ -104,16 +106,16 @@ void GlobalResources::load() const
//*programIcon = wxIcon(FreeFileSync_xpm);
//use big logo bitmap for better quality
- programIcon->CopyFromBitmap(getImageByName(wxT("FreeFileSync.png")));
+ programIcon->CopyFromBitmap(getImage(wxT("FreeFileSync.png")));
#endif
}
-const wxBitmap& GlobalResources::getImageByName(const wxString& imageName) const
+const wxBitmap& GlobalResources::getImage(const wxString& imageName) const
{
const std::map<wxString, wxBitmap*>::const_iterator bmp = imageName.Find(wxChar('.')) == wxNOT_FOUND ? //assume .png ending if nothing else specified
- bitmapResource.find(imageName + wxT(".png")) :
- bitmapResource.find(imageName);
+ bitmapResource.find(imageName + wxT(".png")) :
+ bitmapResource.find(imageName);
if (bmp != bitmapResource.end())
return *bmp->second;
bgstack15