Skip to content

Commit

Permalink
Various fixes and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
TricksterGuy committed Mar 11, 2015
1 parent 9498e9e commit 2064d0d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gui/exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ void DoExport(int mode, const std::string& filename, std::vector<std::string>& f
else if (params.device == "3DS")
Do3DSExport(params.images, params.tileset_images);
}
// Catch FatalLogs from exporting. This is handled in wxlogger
catch (const char* e)
{
WarnLog("Export failed");
return;
}

Expand Down
3 changes: 2 additions & 1 deletion gui/nin10kit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,6 @@ void Nin10KitFrame::OnCloseView(wxCloseEvent& event)
void Nin10KitFrame::OnEditor(wxCommandEvent& event)
{
EventLog l(__func__);
wxMessageBox(_("Please pay me 20 dolla for the full version"), _("GET OUT MY STORE"));
wxMessageBox(_("Unfortunately this part of the program isn't implemented yet\n"
"This is a planned feature to have a bitmap/palette/tilemap editor\n"), _("Coming soon"));
}
14 changes: 8 additions & 6 deletions gui/nin10kitapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ bool Nin10KitApp::OnInit()
wxInitAllImageHandlers();
wxDialog::EnableLayoutAdaptation(true);
#ifndef _WIN32
//wxHandleFatalExceptions();
wxHandleFatalExceptions();
#endif

frame = new Nin10KitFrame();
Expand Down Expand Up @@ -74,14 +74,16 @@ bool Nin10KitApp::OnCmdLineParsed(wxCmdLineParser& parser)
return true;
}

//void Nin10KitApp::OnFatalException()
//{
// wxPuts("LOL");
//}
void Nin10KitApp::OnFatalException()
{
FatalLog("An Fatal exception occured\n"
"Please send the log messages to brandon - bwhitehead0308[AT]gmail[DOI]com");
}

void Nin10KitApp::OnUnhandledException()
{
wxPuts("LOL2");
FatalLog("An Unhandled exception occured\n"
"Please send the log messages to brandon - bwhitehead0308[AT]gmail[DOI]com");
}

int Nin10KitApp::OnExit()
Expand Down
2 changes: 1 addition & 1 deletion gui/nin10kitapp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Nin10KitApp : public wxApp
virtual int OnExit();
virtual void OnInitCmdLine(wxCmdLineParser& parser);
virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
//void OnFatalException();
void OnFatalException();
void OnUnhandledException();
Nin10KitFrame* GetFrame() {return frame;}
private:
Expand Down
2 changes: 1 addition & 1 deletion gui/nin10kitviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ bool Nin10KitViewerFrame::Set(int prog_mode, std::map<std::string, ImageInfo>& i
else if (mode == "SPRITES")
UpdateSprites(images, bpp);
}
// Catch FatalLogs from conversion. This is handled in wxlogger
catch (const char* e)
{
WarnLog("Conversion failed");
return false;
}
UpdateGraphicsWindow();
Expand Down
2 changes: 1 addition & 1 deletion gui/wxlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void LoggerWx::Log(LogLevel level, const char* format, va_list ap)
vsnprintf(buffer, 1024, format, ap);
if (level == LogLevel::WARNING || level == LogLevel::FATAL)
{
wxMessageBox(buffer, "");
wxMessageBox(buffer, level == LogLevel::WARNING ? "Warning!" : "Fatal!");
if (level == LogLevel::FATAL)
throw "Fatal exception occured";
}
Expand Down

0 comments on commit 2064d0d

Please sign in to comment.