summaryrefslogtreecommitdiff
path: root/library/resources.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 16:50:45 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 16:50:45 +0200
commiteca5f1c8831fd0776e57a174362b0515104174c2 (patch)
tree5cba4e6c74d1f5c78018eff1b09b1973c5b7604f /library/resources.cpp
parent1.6 (diff)
downloadFreeFileSync-eca5f1c8831fd0776e57a174362b0515104174c2.tar.gz
FreeFileSync-eca5f1c8831fd0776e57a174362b0515104174c2.tar.bz2
FreeFileSync-eca5f1c8831fd0776e57a174362b0515104174c2.zip
1.7
Diffstat (limited to 'library/resources.cpp')
-rw-r--r--library/resources.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/library/resources.cpp b/library/resources.cpp
index 73e11575..6e5feaf7 100644
--- a/library/resources.cpp
+++ b/library/resources.cpp
@@ -3,7 +3,7 @@
#include <wx/zipstrm.h>
#include <wx/image.h>
#include <wx/icon.h>
-#include <stdexcept> //for std::runtime_error
+#include "globalFunctions.h"
#ifdef FFS_WIN
wxChar GlobalResources::fileNameSeparator = '\\';
@@ -14,21 +14,21 @@ assert(false);
#endif
//these two global variables are language-dependent => cannot be set statically! See CustomLocale
-const wxChar* GlobalResources::decimalPoint = "";
-const wxChar* GlobalResources::thousandsSeparator = "";
+const wxChar* GlobalResources::decimalPoint = wxEmptyString;
+const wxChar* GlobalResources::thousandsSeparator = wxEmptyString;
//command line parameters
-const wxChar* GlobalResources::paramCompare = "cmp";
-const wxChar* GlobalResources::paramCfg = "cfg";
-const wxChar* GlobalResources::paramInclude = "incl";
-const wxChar* GlobalResources::paramExclude = "excl";
-const wxChar* GlobalResources::paramContinueError = "continue";
-const wxChar* GlobalResources::paramRecycler = "recycler";
-const wxChar* GlobalResources::paramSilent = "silent";
+const wxChar* GlobalResources::paramCompare = wxT("cmp");
+const wxChar* GlobalResources::paramCfg = wxT("cfg");
+const wxChar* GlobalResources::paramInclude = wxT("incl");
+const wxChar* GlobalResources::paramExclude = wxT("excl");
+const wxChar* GlobalResources::paramContinueError = wxT("continue");
+const wxChar* GlobalResources::paramRecycler = wxT("recycler");
+const wxChar* GlobalResources::paramSilent = wxT("silent");
-const wxChar* GlobalResources::valueSizeDate = "SIZEDATE";
-const wxChar* GlobalResources::valueContent = "CONTENT";
+const wxChar* GlobalResources::valueSizeDate = wxT("SIZEDATE");
+const wxChar* GlobalResources::valueContent = wxT("CONTENT");
map<wxString, wxBitmap*> GlobalResources::bitmapResource;
@@ -90,57 +90,57 @@ wxIcon* GlobalResources::programIcon = 0;
void GlobalResources::loadResourceFiles()
{
//map, allocate and initialize pictures
- bitmapResource["left arrow.png"] = (bitmapLeftArrow = new wxBitmap(wxNullBitmap));
- bitmapResource["right arrow.png"] = (bitmapRightArrow = new wxBitmap(wxNullBitmap));
- bitmapResource["no arrow.png"] = (bitmapNoArrow = new wxBitmap(wxNullBitmap));
- bitmapResource["start sync.png"] = (bitmapStartSync = new wxBitmap(wxNullBitmap));
- bitmapResource["start sync dis.png"] = (bitmapStartSyncDis = new wxBitmap(wxNullBitmap));
- bitmapResource["delete.png"] = (bitmapDelete = new wxBitmap(wxNullBitmap));
- bitmapResource["email.png"] = (bitmapEmail = new wxBitmap(wxNullBitmap));
- bitmapResource["about.png"] = (bitmapAbout = new wxBitmap(wxNullBitmap));
- bitmapResource["website.png"] = (bitmapWebsite = new wxBitmap(wxNullBitmap));
- bitmapResource["exit.png"] = (bitmapExit = new wxBitmap(wxNullBitmap));
- bitmapResource["sync.png"] = (bitmapSync = new wxBitmap(wxNullBitmap));
- bitmapResource["compare.png"] = (bitmapCompare = new wxBitmap(wxNullBitmap));
- bitmapResource["sync disabled.png"] = (bitmapSyncDisabled = new wxBitmap(wxNullBitmap));
- bitmapResource["swap.png"] = (bitmapSwap = new wxBitmap(wxNullBitmap));
- bitmapResource["help.png"] = (bitmapHelp = new wxBitmap(wxNullBitmap));
- bitmapResource["leftOnly.png"] = (bitmapLeftOnly = new wxBitmap(wxNullBitmap));
- bitmapResource["leftNewer.png"] = (bitmapLeftNewer = new wxBitmap(wxNullBitmap));
- bitmapResource["different.png"] = (bitmapDifferent = new wxBitmap(wxNullBitmap));
- bitmapResource["rightNewer.png"] = (bitmapRightNewer = new wxBitmap(wxNullBitmap));
- bitmapResource["rightOnly.png"] = (bitmapRightOnly = new wxBitmap(wxNullBitmap));
- bitmapResource["leftOnlyDeact.png"] = (bitmapLeftOnlyDeact = new wxBitmap(wxNullBitmap));
- bitmapResource["leftNewerDeact.png"] = (bitmapLeftNewerDeact = new wxBitmap(wxNullBitmap));
- bitmapResource["differentDeact.png"] = (bitmapDifferentDeact = new wxBitmap(wxNullBitmap));
- bitmapResource["rightNewerDeact.png"] = (bitmapRightNewerDeact = new wxBitmap(wxNullBitmap));
- bitmapResource["rightOnlyDeact.png"] = (bitmapRightOnlyDeact = new wxBitmap(wxNullBitmap));
- bitmapResource["equal.png"] = (bitmapEqual = new wxBitmap(wxNullBitmap));
- bitmapResource["equalDeact.png"] = (bitmapEqualDeact = new wxBitmap(wxNullBitmap));
- bitmapResource["include.png"] = (bitmapInclude = new wxBitmap(wxNullBitmap));
- bitmapResource["exclude.png"] = (bitmapExclude = new wxBitmap(wxNullBitmap));
- bitmapResource["filter active.png"] = (bitmapFilterOn = new wxBitmap(wxNullBitmap));
- bitmapResource["filter not active.png"] = (bitmapFilterOff = new wxBitmap(wxNullBitmap));
- bitmapResource["warning.png"] = (bitmapWarning = new wxBitmap(wxNullBitmap));
- bitmapResource["small arrow up.png"] = (bitmapSmallUp = new wxBitmap(wxNullBitmap));
- bitmapResource["small arrow down.png"] = (bitmapSmallDown = new wxBitmap(wxNullBitmap));
- bitmapResource["save.png"] = (bitmapSave = new wxBitmap(wxNullBitmap));
- bitmapResource["FFS.png"] = (bitmapFFS = new wxBitmap(wxNullBitmap));
- bitmapResource["deleteFile.png"] = (bitmapDeleteFile = new wxBitmap(wxNullBitmap));
- bitmapResource["gpl.png"] = (bitmapGPL = new wxBitmap(wxNullBitmap));
- bitmapResource["statusPause.png"] = (bitmapStatusPause = new wxBitmap(wxNullBitmap));
- bitmapResource["statusError.png"] = (bitmapStatusError = new wxBitmap(wxNullBitmap));
- bitmapResource["statusSuccess.png"] = (bitmapStatusSuccess = new wxBitmap(wxNullBitmap));
- bitmapResource["statusWarning.png"] = (bitmapStatusWarning = new wxBitmap(wxNullBitmap));
- bitmapResource["statusScanning.png"] = (bitmapStatusScanning = new wxBitmap(wxNullBitmap));
- bitmapResource["statusComparing.png"] = (bitmapStatusComparing = new wxBitmap(wxNullBitmap));
- bitmapResource["statusSyncing.png"] = (bitmapStatusSyncing = new wxBitmap(wxNullBitmap));
- bitmapResource["logo.png"] = (bitmapLogo = new wxBitmap(wxNullBitmap));
- bitmapResource["finished.png"] = (bitmapFinished = new wxBitmap(wxNullBitmap));
- bitmapResource["statusEdge.png"] = (bitmapStatusEdge = new wxBitmap(wxNullBitmap));
-
- wxFileInputStream input("Resources.dat");
- if (!input.IsOk()) throw runtime_error(_("Unable to load Resources.dat!"));
+ bitmapResource[wxT("left arrow.png")] = (bitmapLeftArrow = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("right arrow.png")] = (bitmapRightArrow = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("no arrow.png")] = (bitmapNoArrow = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("start sync.png")] = (bitmapStartSync = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("start sync dis.png")] = (bitmapStartSyncDis = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("delete.png")] = (bitmapDelete = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("email.png")] = (bitmapEmail = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("about.png")] = (bitmapAbout = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("website.png")] = (bitmapWebsite = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("exit.png")] = (bitmapExit = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("sync.png")] = (bitmapSync = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("compare.png")] = (bitmapCompare = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("sync disabled.png")] = (bitmapSyncDisabled = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("swap.png")] = (bitmapSwap = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("help.png")] = (bitmapHelp = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("leftOnly.png")] = (bitmapLeftOnly = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("leftNewer.png")] = (bitmapLeftNewer = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("different.png")] = (bitmapDifferent = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("rightNewer.png")] = (bitmapRightNewer = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("rightOnly.png")] = (bitmapRightOnly = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("leftOnlyDeact.png")] = (bitmapLeftOnlyDeact = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("leftNewerDeact.png")] = (bitmapLeftNewerDeact = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("differentDeact.png")] = (bitmapDifferentDeact = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("rightNewerDeact.png")] = (bitmapRightNewerDeact = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("rightOnlyDeact.png")] = (bitmapRightOnlyDeact = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("equal.png")] = (bitmapEqual = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("equalDeact.png")] = (bitmapEqualDeact = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("include.png")] = (bitmapInclude = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("exclude.png")] = (bitmapExclude = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("filter active.png")] = (bitmapFilterOn = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("filter not active.png")] = (bitmapFilterOff = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("warning.png")] = (bitmapWarning = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("small arrow up.png"]) = (bitmapSmallUp = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("small arrow down.png")] = (bitmapSmallDown = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("save.png")] = (bitmapSave = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("FFS.png")] = (bitmapFFS = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("deleteFile.png")] = (bitmapDeleteFile = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("gpl.png")] = (bitmapGPL = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusPause.png")] = (bitmapStatusPause = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusError.png")] = (bitmapStatusError = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusSuccess.png")] = (bitmapStatusSuccess = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusWarning.png")] = (bitmapStatusWarning = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusScanning.png")] = (bitmapStatusScanning = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusComparing.png")] = (bitmapStatusComparing = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusSyncing.png")] = (bitmapStatusSyncing = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("logo.png")] = (bitmapLogo = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("finished.png")] = (bitmapFinished = new wxBitmap(wxNullBitmap));
+ bitmapResource[wxT("statusEdge.png")] = (bitmapStatusEdge = new wxBitmap(wxNullBitmap));
+
+ wxFileInputStream input(wxT("Resources.dat"));
+ if (!input.IsOk()) throw RuntimeException(_("Unable to load Resources.dat!"));
wxZipInputStream resourceFile(input);
@@ -159,11 +159,11 @@ void GlobalResources::loadResourceFiles()
animationMoney = new wxAnimation(wxNullAnimation);
animationSync = new wxAnimation(wxNullAnimation);
- animationMoney->LoadFile("Resources.a01");
- animationSync->LoadFile("Resources.a02");
+ animationMoney->LoadFile(wxT("Resources.a01"));
+ animationSync->LoadFile(wxT("Resources.a02"));
#ifdef FFS_WIN
- programIcon = new wxIcon("winIcon");
+ programIcon = new wxIcon(wxT("winIcon"));
#else
#include "FreeFileSync.xpm"
programIcon = new wxIcon(FreeFileSync_xpm);
bgstack15