Fixed many resource file names, removed raw-char matches input-char requirement for Linux operation.

WARNING: This version is unstable. High possibility of encountering a complete processor lockup (likely an infinite loop).

Known bugs on Linux: Some fields are being drawn off-target (such as text) and they need to be fixed in order to allow compatibility. Different style files on different platforms would not be a good idea. The combined-editors are not working. When a text-replacement is made via "~", the cursor is placed before it and attempting to remove or select it causes a lockup. Symbol editor seems to be working fine. The symbol selection dialog causes a crash when used.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@194 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-02-02 04:23:35 +00:00
parent ed5ac758f9
commit 3c4790cac9
16 changed files with 105 additions and 103 deletions
+8 -6
View File
@@ -91,11 +91,12 @@ Image load_resource_image(const String& name) {
#elif defined(__linux__)
static String path = wxStandardPaths::Get().GetDataDir() + _("/resource/");
String file = path + name.Lower();
wxImage resource (file + _(".png"), wxBITMAP_TYPE_PNG);
if (!resource.Ok()) resource.LoadFile (file + _(".bmp"), wxBITMAP_TYPE_BMP);
if (!resource.Ok()) resource.LoadFile (file + _(".ico"), wxBITMAP_TYPE_ICO);
if (!resource.Ok()) resource.LoadFile (file + _(".cur"), wxBITMAP_TYPE_CUR);
if (!resource.Ok()) throw InternalError(String::Format(_("Resource not found: %s"), name.c_str()));
wxImage resource;
if (wxFileExists(file + _(".png"))) resource.LoadFile(file + _(".png"));
else if (wxFileExists(file + _(".bmp"))) resource.LoadFile(file + _(".bmp"));
else if (wxFileExists(file + _(".ico"))) resource.LoadFile(file + _(".ico"));
else if (wxFileExists(file + _(".cur"))) resource.LoadFile(file + _(".cur"));
if (!resource.Ok()) handle_error(InternalError(String(_("Cannot find resource file at ")) + file));
return resource;
#else
#error Handling of resource loading needs to be declared.
@@ -114,7 +115,8 @@ wxIcon load_resource_icon(const String& name) {
#if defined(__WXMSW__)
return wxIcon(_("icon/") + name);
#else
return wxIcon(_("icon/") + name + _(".ico"), wxBITMAP_TYPE_ICO);
static String path = wxStandardPaths::Get().GetDataDir() + _("/icon/");
return wxIcon(path + name + _(".ico"), wxBITMAP_TYPE_ICO);
#endif
}