Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt avnav #91

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ else ()
endif ()

IF(NOT WIN32)
ADD_DEFINITIONS( "-Wall -g -fexceptions -O2 -Wno-unused -fno-strict-aliasing ")
ADD_DEFINITIONS( "-Wall -g -fexceptions -Wno-unused -fno-strict-aliasing ")

IF(CMAKE_BUILD_TYPE MATCHES "Debug")
ADD_DEFINITIONS( " -O0")
Expand Down
2 changes: 1 addition & 1 deletion cmake/PluginConfigure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IF(NOT MSVC)
ADD_DEFINITIONS( "-Wall -g -fprofile-arcs -ftest-coverage -fexceptions" )
ELSE(PROFILING)
# ADD_DEFINITIONS( "-Wall -g -fexceptions" )
ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -O2 -fexceptions" )
ADD_DEFINITIONS( "-Wall -Wno-unused-result -g -fexceptions" )
ENDIF(PROFILING)

IF(NOT APPLE)
Expand Down
10 changes: 8 additions & 2 deletions src/ochartShop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3101,7 +3101,10 @@ bool shopPanel::doSystemNameWizard( bool *bnew )
if( g_systemName.Len() && (g_systemNameChoiceArray.Index(g_systemName) == wxNOT_FOUND))
g_systemNameChoiceArray.Insert(g_systemName, 0);

oeSENCSystemNameSelector dlg( GetOCPNCanvasWindow());
wxWindow *canvas=GetOCPNCanvasWindow();
if (canvas == NULL) return false;

oeSENCSystemNameSelector dlg( canvas);

wxSize dialogSize(500, -1);

Expand Down Expand Up @@ -3159,7 +3162,10 @@ bool shopPanel::doSystemNameWizard( bool *bnew )

wxString shopPanel::doGetNewSystemName( )
{
oeSENCGETSystemName dlg( GetOCPNCanvasWindow());
wxWindow *canvas=GetOCPNCanvasWindow();
if (canvas == NULL) return wxEmptyString;

oeSENCGETSystemName dlg( canvas);

wxSize dialogSize(500, -1);

Expand Down
19 changes: 14 additions & 5 deletions src/oesenc_pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2463,8 +2463,12 @@ Your oeSENC UserKey may be obtained from your chart provider.\n\n"),
return g_UserKey;
else
{
wxWindow *canvas=GetOCPNCanvasWindow();
if (canvas == NULL) return g_UserKey;

g_old_UserKey = g_UserKey;
SENCGetUserKeyDialog dlg( legendID, GetOCPNCanvasWindow());

SENCGetUserKeyDialog dlg( legendID, canvas);

wxSize dialogSize(500, -1);

Expand Down Expand Up @@ -4204,14 +4208,16 @@ void oesenc_pi_event_handler::OnClearSystemName( wxCommandEvent &event )
void oesenc_pi_event_handler::OnShowEULA( wxCommandEvent &event )
{
ChartSetEULA *CSE;
wxWindow *canvas=GetOCPNCanvasWindow();
if (canvas == NULL) return;

for(unsigned int i=0 ; i < g_EULAArray.GetCount() ; i++){
CSE = g_EULAArray.Item(i);
wxString file = CSE->fileName;
file.Replace('!', wxFileName::GetPathSeparator());

if(wxFileExists(file)){
oesenc_pi_about *pab = new oesenc_pi_about( GetOCPNCanvasWindow(), file );
oesenc_pi_about *pab = new oesenc_pi_about( canvas, file );
pab->SetOKMode();
pab->ShowModal();
pab->Destroy();
Expand Down Expand Up @@ -4618,12 +4624,13 @@ bool CheckEULA( void )

if(g_bEULA_OK && g_UserKey.Length())
return true;

wxWindow *canvas=GetOCPNCanvasWindow();
if (canvas == NULL) return true;
wxString shareLocn =*GetpSharedDataLocation() +
_T("plugins") + wxFileName::GetPathSeparator() +
_T("oesenc_pi") + wxFileName::GetPathSeparator();

oesenc_pi_about *pab = new oesenc_pi_about( GetOCPNCanvasWindow() );
oesenc_pi_about *pab = new oesenc_pi_about( canvas );
pab->ShowModal();
g_bEULA_OK = (pab->GetReturnCode() == 0);

Expand Down Expand Up @@ -4690,6 +4697,8 @@ wxString getEULASha1( wxString fileName)
bool ShowEULA( wxString fileName )
{
wxLogMessage(_T("ShowEULA"));
wxWindow *canvas=GetOCPNCanvasWindow();
if (canvas == NULL) return true;

wxString sha = getEULASha1(fileName);

Expand All @@ -4703,7 +4712,7 @@ bool ShowEULA( wxString fileName )
androidHideBusyIcon();
#endif

oesenc_pi_about *pab = new oesenc_pi_about( GetOCPNCanvasWindow(), fileName );
oesenc_pi_about *pab = new oesenc_pi_about( canvas, fileName );
pab->ShowModal();
bool bEULA_OK = (pab->GetReturnCode() == 0);

Expand Down