Skip to content

Commit

Permalink
added optional app name param to NewApp()
Browse files Browse the repository at this point in the history
  • Loading branch information
rakslice committed Dec 29, 2016
1 parent ccd2625 commit c2eb845
Show file tree
Hide file tree
Showing 9 changed files with 21,134 additions and 20,950 deletions.
15 changes: 13 additions & 2 deletions src/wxApp.i
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@
#include "wx/display.h"

class wxGoApp : public wxApp{
private:
char * m_tempProgName;
public:
wxGoApp(){
wxGoApp("wxGo");
}
wxGoApp(const char * progName) : m_tempProgName(NULL){
m_tempProgName = new char[strlen(progName) + 1];
if (m_tempProgName) {
strcpy(m_tempProgName, progName);
}
wxApp::SetInstance(this);
SetExitOnFrameDelete(true);
char progName[] = {"wxGo"};
char* argv[] = {progName, NULL};
char* argv[] = {m_tempProgName, NULL};
int argc = 1;
wxEntryStart(argc, argv);
CallOnInit();
}

~wxGoApp(){
wxEntryCleanup();
if (m_tempProgName) {
delete[] m_tempProgName;
}
}
};
%}
Expand Down
1 change: 1 addition & 0 deletions src/wxGoInterface/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class wxGoApp
{
public:
wxGoApp();
wxGoApp(const char *);
~wxGoApp();
bool Initialize(int& argc, wxChar **argv);
bool OnInitGui();
Expand Down
1 change: 1 addition & 0 deletions src/wxGoInterface_original/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class wxGoApp
public:

wxGoApp();
wxGoApp(const char *);
~wxGoApp();

bool Initialize(int& argc, wxChar **argv);
Expand Down
Loading

0 comments on commit c2eb845

Please sign in to comment.