summaryrefslogtreecommitdiff
path: root/lib/resources.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:19 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:19 +0200
commit0887aee8c54d0ed51bb2031431e2bcdafebb4c6e (patch)
tree69537ceb9787bb25ac363cc4e6cdaf0804d78363 /lib/resources.cpp
parent5.12 (diff)
downloadFreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.gz
FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.bz2
FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.zip
5.13
Diffstat (limited to 'lib/resources.cpp')
-rw-r--r--lib/resources.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/resources.cpp b/lib/resources.cpp
index 2f7daeaf..8a021475 100644
--- a/lib/resources.cpp
+++ b/lib/resources.cpp
@@ -10,6 +10,7 @@
#include <wx/zipstrm.h>
#include <wx/image.h>
#include <wx/mstream.h>
+#include <zen/utf.h>
#include "ffs_paths.h"
using namespace zen;
@@ -45,7 +46,7 @@ void loadAnimFromZip(wxZipInputStream& zipInput, wxAnimation& anim)
GlobalResources::GlobalResources()
{
- wxFFileInputStream input(toWx(zen::getResourceDir()) + L"Resources.zip");
+ wxFFileInputStream input(utfCvrtTo<wxString>(zen::getResourceDir()) + L"Resources.zip");
if (input.IsOk()) //if not... we don't want to react too harsh here
{
//activate support for .png files
@@ -57,7 +58,7 @@ GlobalResources::GlobalResources()
while (true)
{
std::unique_ptr<wxZipEntry> entry(resourceFile.GetNextEntry()); //take ownership!
- if (entry.get() == nullptr)
+ if (!entry)
break;
const wxString name = entry->GetName();
@@ -75,9 +76,10 @@ GlobalResources::GlobalResources()
#ifdef FFS_WIN
//for compatibility it seems we need to stick with a "real" icon
programIcon = wxIcon(L"A_PROGRAM_ICON");
-#else
+
+#elif defined FFS_LINUX || defined FFS_MAC
//use big logo bitmap for better quality
- programIcon.CopyFromBitmap(getImageInt(L"FreeFileSync.png"));
+ programIcon.CopyFromBitmap(getImageInt(L"FreeFileSync"));
//attention: this is the reason we need a member getImage -> it must not implicitly create static object instance!!!
//erroneously calling static object constructor twice will deadlock on Linux!!
#endif
bgstack15