Prevented some crashes from uncaught exceptions

Moved mse.ico to app.ico
Fixed the Linux version of load_resource_icon().


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@388 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-05-18 19:11:40 +00:00
parent 0b05d97ed6
commit 1c687fdc96
5 changed files with 18 additions and 13 deletions
+1 -1
View File
@@ -15,6 +15,6 @@ AM_LDFLAGS = @WX_LIBS@
magicseteditor_SOURCES =
# The script used to generate is MakeAM. " > Makefile.am;
# The script used to generate is MakeAM.sh " > Makefile.am;
find . -name *.cpp | sed "s/\./magicseteditor_SOURCES += ./" >> Makefile.am;
+1 -1
View File
@@ -116,7 +116,7 @@ wxIcon load_resource_icon(const String& name) {
#if defined(__WXMSW__)
return wxIcon(_("icon/") + name);
#else
static String path = wxStandardPaths::Get().GetDataDir() + _("/icon/");
static String path = wxStandardPaths::Get().GetDataDir() + _("/resource/icon/");
return wxIcon(path + name + _(".ico"), wxBITMAP_TYPE_ICO);
#endif
}

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

+2 -2
View File
@@ -8,7 +8,7 @@
// -------------------------------------------------------- : Icons
icon/app ICON "icon/mse.ico" // has to come first in alphabet!!
icon/app ICON "icon/app.ico" // has to come first in alphabet!!
icon/export ICON "icon/set.ico" //todo
icon/game ICON "icon/set.ico" //todo
icon/set ICON "icon/set.ico"
@@ -163,7 +163,7 @@ FILETYPE VFT_APP
VALUE "License", "GNU General Public License 2 or later; This is free software, and you are welcome to redistribute it under certain conditions; See the help file for details"
VALUE "FileDescription", "Magic Set Editor"
VALUE "InternalName", "mse2/8"
VALUE "LegalCopyright", "© 2001-2007 Twan van Laarhoven"
VALUE "LegalCopyright", " 2001-2007 Twan van Laarhoven"
VALUE "ProductName", "Magic Set Editor"
}
}
+14 -9
View File
@@ -33,16 +33,21 @@ Image ScriptableImage::generate(const GeneratedImage::Options& options, bool cac
// cached, so we are done
return cached;
}
// generate
Image image;
// generate blank image
Image image(1,1);
image.InitAlpha();
image.SetAlpha(0,0,0);
if (isReady()) {
image = value->generate(options);
} else {
// error, return blank image
Image i(1,1);
i.InitAlpha();
i.SetAlpha(0,0,0);
image = i;
try {
image = value->generate(options);
}
catch (FileNotFoundError e) {
handle_error (e);
return image;
}
}
else {
return image;
}
// resize?
int iw = image.GetWidth(), ih = image.GetHeight();