kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #26451
[PATCH 2/2] Make MacOpenFile conditional build only on macOS
---
common/single_top.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/common/single_top.cpp b/common/single_top.cpp
index 72fc557..7644fbb 100644
--- a/common/single_top.cpp
+++ b/common/single_top.cpp
@@ -73,23 +73,20 @@ static struct PGM_SINGLE_TOP : public PGM_BASE
PGM_BASE::Destroy();
}
+#if defined( __WXMAC__ )
void MacOpenFile( const wxString& aFileName ) override
{
wxFileName filename( aFileName );
if( filename.FileExists() )
{
- #if 0
- // this pulls in EDA_DRAW_FRAME type info, which we don't want in
- // the single_top link image.
- KIWAY_PLAYER* frame = dynamic_cast<KIWAY_PLAYER*>( App().GetTopWindow() );
- #else
KIWAY_PLAYER* frame = (KIWAY_PLAYER*) App().GetTopWindow();
- #endif
+
if( frame )
frame->OpenProjectFiles( std::vector<wxString>( 1, aFileName ) );
}
}
+#endif // __WXMAC__
} program;
@@ -186,6 +183,7 @@ struct APP_SINGLE_TOP : public wxApp
return ret;
}
+#if defined( __WXMAC__ )
/**
* Function MacOpenFile
* is specific to MacOSX (not used under Linux or Windows).
@@ -196,6 +194,7 @@ struct APP_SINGLE_TOP : public wxApp
{
Pgm().MacOpenFile( aFileName );
}
+#endif // __WXMAC__
};
IMPLEMENT_APP( APP_SINGLE_TOP );
Follow ups
References