diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 392b5a1997..b67ed855bf 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -28,26 +28,17 @@ * @brief EDA_BASE_FRAME class implementation. */ -#include -#include -#include -#include -#include + #include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include +#include -#include -#include /// The default auto save interval is 10 minutes. #define DEFAULT_AUTO_SAVE_INTERVAL 600 @@ -94,10 +85,6 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, m_FramePos.x = m_FramePos.y = 0; - Connect( ID_HELP_COPY_VERSION_STRING, - wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler( EDA_BASE_FRAME::CopyVersionInfoToClipboard ) ); - Connect( ID_AUTO_SAVE_TIMER, wxEVT_TIMER, wxTimerEventHandler( EDA_BASE_FRAME::onAutoSaveTimer ) ); @@ -484,145 +471,6 @@ void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event ) } -void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu ) -{ - wxASSERT( aMenu != NULL ); - - // Copy version string to clipboard for bug report purposes. - AddMenuItem( aMenu, ID_HELP_COPY_VERSION_STRING, - _( "Copy &Version Information" ), - _( "Copy the version string to clipboard to send with bug reports" ), - KiBitmap( copy_button_xpm ) ); -} - - -// This is an enhanced version of the compiler build macro provided by wxWidgets -// in . Please do not make any of these strings translatable. They -// are used for conveying troubleshooting information to developers. - -#if defined(__GXX_ABI_VERSION) - #define __ABI_VERSION ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION) -#else - #define __ABI_VERSION ",compiler without C++ ABI " -#endif - -#if defined(__INTEL_COMPILER) - #define __BO_COMPILER ",Intel C++" -#elif defined(__GNUG__) - #define __BO_COMPILER ",GCC " \ - __WX_BO_STRINGIZE(__GNUC__) "." \ - __WX_BO_STRINGIZE(__GNUC_MINOR__) "." \ - __WX_BO_STRINGIZE(__GNUC_PATCHLEVEL__) -#elif defined(__VISUALC__) - #define __BO_COMPILER ",Visual C++" -#elif defined(__BORLANDC__) - #define __BO_COMPILER ",Borland C++" -#elif defined(__DIGITALMARS__) - #define __BO_COMPILER ",DigitalMars" -#elif defined(__WATCOMC__) - #define __BO_COMPILER ",Watcom C++" -#else - #define __BO_COMPILER ",unknown" -#endif - - -static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE() -{ - return -#ifdef __WXDEBUG__ - " (debug," -#else - " (release," -#endif - __WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL - __WX_BO_WXWIN_COMPAT_2_8 ")" - ; -} - - -void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event ) -{ - if( !wxTheClipboard->Open() ) - { - wxMessageBox( _( "Could not open clipboard to write version information." ), - _( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this ); - return; - } - - wxString msg_version; - wxPlatformInfo info; - - msg_version = wxT( "Application: " ) + Pgm().App().GetAppName() + wxT( "\n" ); - msg_version << wxT( "Version: " ) << GetBuildVersion() -#ifdef DEBUG - << wxT( " debug" ) -#else - << wxT( " release" ) -#endif - << wxT( " build\n" ); - msg_version << wxT( "wxWidgets: Version " ) << FROM_UTF8( wxVERSION_NUM_DOT_STRING ) - << FROM_UTF8( KICAD_BUILD_OPTIONS_SIGNATURE() ) << wxT( "\n" ) - << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " ) - << info.GetArchName() << wxT( ", " ) << info.GetEndiannessName() - << wxT( ", " ) << info.GetPortIdName() << wxT( "\n" ); - - // Just in case someone builds KiCad with the platform native of Boost instead of - // the version included with the KiCad source. - msg_version << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." ) - << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) - << ( BOOST_VERSION % 100 ) << wxT( "\n" ); - - msg_version << wxT( " USE_WX_GRAPHICS_CONTEXT=" ); -#ifdef USE_WX_GRAPHICS_CONTEXT - msg_version << wxT( "ON\n" ); -#else - msg_version << wxT( "OFF\n" ); -#endif - - msg_version << wxT( " USE_WX_OVERLAY=" ); -#ifdef USE_WX_OVERLAY - msg_version << wxT( "ON\n" ); -#else - msg_version << wxT( "OFF\n" ); -#endif - - msg_version << wxT( " KICAD_SCRIPTING=" ); -#ifdef KICAD_SCRIPTING - msg_version << wxT( "ON\n" ); -#else - msg_version << wxT( "OFF\n" ); -#endif - - msg_version << wxT( " KICAD_SCRIPTING_MODULES=" ); -#ifdef KICAD_SCRIPTING_MODULES - msg_version << wxT( "ON\n" ); -#else - msg_version << wxT( "OFF\n" ); -#endif - - msg_version << wxT( " KICAD_SCRIPTING_WXPYTHON=" ); -#ifdef KICAD_SCRIPTING_WXPYTHON - msg_version << wxT( "ON\n" ); -#else - msg_version << wxT( "OFF\n" ); -#endif - - msg_version << wxT( " USE_FP_LIB_TABLE=HARD_CODED_ON\n" ); - - msg_version << wxT( " BUILD_GITHUB_PLUGIN=" ); -#ifdef BUILD_GITHUB_PLUGIN - msg_version << wxT( "ON\n" ); -#else - msg_version << wxT( "OFF\n" ); -#endif - - wxTheClipboard->SetData( new wxTextDataObject( msg_version ) ); - wxTheClipboard->Close(); - - wxMessageBox( msg_version, _( "Version Information (copied to the clipboard)" ) ); -} - - bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName ) { wxString msg; @@ -734,4 +582,3 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName, wxRemoveFile( autoSaveFileName.GetFullPath() ); } } - diff --git a/common/dialog_about/AboutDialog_main.cpp b/common/dialog_about/AboutDialog_main.cpp index 890f897def..35907e83cf 100644 --- a/common/dialog_about/AboutDialog_main.cpp +++ b/common/dialog_about/AboutDialog_main.cpp @@ -22,12 +22,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include -#include #include - +#include +#include +#include +#include /* Used icons: * lang_xx_xpm[]; // Icons of various national flags @@ -36,13 +35,15 @@ * icon_kicad_xpm[]; // Icon of the application */ #include -#include +#include #include #include -#include +#include + +#include "aboutinfo.h" +#include "dialog_about.h" -#include WX_DEFINE_OBJARRAY( Contributors ) // Helper functions: @@ -74,14 +75,14 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) } /* Set title */ - info.SetAppName( wxT( ".: " ) + Pgm().App().GetAppName() + wxT( " :." ) ); + info.SetAppName( Pgm().App().GetAppName() ); /* Copyright information */ - info.SetCopyright( wxT( "(C) 1992-2015 KiCad Developers Team" ) ); + info.SetCopyright( wxT( "(C) 1992-2016 KiCad Developers Team" ) ); /* KiCad build version */ wxString version; - version << wxT( "Version: " ) << GetBuildVersion() + version << GetBuildVersion() #ifdef DEBUG << wxT( ", debug" ) #else @@ -93,16 +94,13 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) /* wxWidgets version */ wxString libVersion; - libVersion << wxT( "wxWidgets " ) - << wxMAJOR_VERSION << wxT( "." ) - << wxMINOR_VERSION << wxT( "." ) - << wxRELEASE_NUMBER + libVersion << wxGetLibraryVersionInfo().GetVersionString(); /* Unicode or ANSI version */ #if wxUSE_UNICODE - << wxT( " Unicode " ); + libVersion << wxT( " Unicode " ); #else - << wxT( " ANSI " ); + libVersion << wxT( " ANSI " ); #endif // Just in case someone builds KiCad with the platform native of Boost instead of diff --git a/common/dialog_about/dialog_about.cpp b/common/dialog_about/dialog_about.cpp index e947c871c5..5fd7b50cb8 100644 --- a/common/dialog_about/dialog_about.cpp +++ b/common/dialog_about/dialog_about.cpp @@ -22,7 +22,36 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include + +#include + +// kicad_curl.h must be included before wx headers, to avoid +// conflicts for some defines, at least on Windows +#ifdef BUILD_GITHUB_PLUGIN +#include +#include +#endif + +#include +#include +#include + +/* Pixel information of icons in XPM format. + * All KiCad icons are linked into shared library 'libbitmaps.a'. + * Icons: + * preference_xpm[]; // Icon for 'Developers' tab + * editor_xpm[]; // Icon for 'Doc Writers' tab + * palette_xpm[]; // Icon for 'Artists' tab + * language_xpm[]; // Icon for 'Translators' tab + * right_xpm[]; // Right arrow icon for list items + * info_xpm[]; // Bulb for description tab + * tools_xpm[]; // Sheet of paper icon for license info tab + */ +#include +#include + +#include "dialog_about.h" + /////////////////////////////////////////////////////////////////////////////// /// Class dialog_about methods @@ -43,7 +72,7 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo) m_staticTextAppTitle->SetLabel( info.GetAppName() ); m_staticTextCopyright->SetLabel( info.GetCopyright() ); - m_staticTextBuildVersion->SetLabel( info.GetBuildVersion() ); + m_staticTextBuildVersion->SetLabel( "Version: " + info.GetBuildVersion() ); m_staticTextLibVersion->SetLabel( info.GetLibVersion() ); DeleteNotebooks(); @@ -53,6 +82,8 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo) m_auiNotebook->Update(); SetFocus(); Centre(); + + Connect( wxID_COPY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_about::OnCopyVersionInfo ) ); } @@ -397,3 +428,112 @@ void dialog_about::OnHtmlLinkClicked( wxHtmlLinkEvent& event ) { ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() ); } + +void dialog_about::OnCopyVersionInfo( wxCommandEvent& event ) +{ + if( !wxTheClipboard->Open() ) + { + wxMessageBox( _( "Could not open clipboard to write version information." ), + _( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this ); + return; + } + + wxPlatformInfo platform; + + // DO NOT translate information in the msg_version string + wxString msg_version; + msg_version << "Application: " << info.GetAppName() << "\n"; + msg_version << "Version: " << info.GetBuildVersion() << "\n"; + msg_version << "Libraries: " << wxGetLibraryVersionInfo().GetVersionString() << "\n"; +#ifdef BUILD_GITHUB_PLUGIN + msg_version << " " << KICAD_CURL::GetVersion() << "\n"; +#endif + msg_version << "Platform: " << wxGetOsDescription() << ", " + << platform.GetArchName() << ", " + << platform.GetEndiannessName() << ", " + << platform.GetPortIdName() << "\n"; + + msg_version << "- Build Info -\n"; + msg_version << "wxWidgets: " << wxVERSION_NUM_DOT_STRING << " ("; + msg_version << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")\n"; + + msg_version << "Boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." ) + << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) + << ( BOOST_VERSION % 100 ) << wxT( "\n" ); + +#ifdef BUILD_GITHUB_PLUGIN + msg_version << "Curl: " << LIBCURL_VERSION << "\n"; +#endif + + msg_version << "KiCad - Compiler: "; +#if defined(__clang__) + msg_version << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__; +#elif defined(__GNUG__) + msg_version << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__; +#elif defined(_MSC_VER) + msg_version << "Visual C++ " << _MSC_VER; +#elif defined(__INTEL_COMPILER) + msg_version << "Intel C++ " << __INTEL_COMPILER; +#else + msg_version << "Other Compiler "; +#endif + +#if defined(__GXX_ABI_VERSION) + msg_version << " with C++ ABI " << __GXX_ABI_VERSION << "\n"; +#else + msg_version << " without C++ ABI\n"; +#endif + + msg_version << " Settings: "; + + #define ON "ON\n" + #define OFF "OFF\n" + + msg_version << "USE_WX_GRAPHICS_CONTEXT="; +#ifdef USE_WX_GRAPHICS_CONTEXT + msg_version << ON; +#else + msg_version << OFF; +#endif + + msg_version << " USE_WX_OVERLAY="; +#ifdef USE_WX_OVERLAY + msg_version << ON; +#else + msg_version << OFF; +#endif + + msg_version << " KICAD_SCRIPTING="; +#ifdef KICAD_SCRIPTING + msg_version << ON; +#else + msg_version << OFF; +#endif + + msg_version << " KICAD_SCRIPTING_MODULES="; +#ifdef KICAD_SCRIPTING_MODULES + msg_version << ON; +#else + msg_version << OFF; +#endif + + msg_version << " KICAD_SCRIPTING_WXPYTHON="; +#ifdef KICAD_SCRIPTING_WXPYTHON + msg_version << ON; +#else + msg_version << OFF; +#endif + + msg_version << " USE_FP_LIB_TABLE=HARD_CODED_ON\n"; + + msg_version << " BUILD_GITHUB_PLUGIN="; +#ifdef BUILD_GITHUB_PLUGIN + msg_version << ON; +#else + msg_version << OFF; +#endif + + wxTheClipboard->SetData( new wxTextDataObject( msg_version ) ); + wxTheClipboard->Close(); + copyVersionInfo->SetLabel( _( "Copied..." ) ); +} diff --git a/common/dialog_about/dialog_about.h b/common/dialog_about/dialog_about.h index 067ee63225..6d3c1a9073 100644 --- a/common/dialog_about/dialog_about.h +++ b/common/dialog_about/dialog_about.h @@ -30,21 +30,8 @@ #include #include -#include -#include - -/* Pixel information of icons in XPM format. - * All KiCad icons are linked into shared library 'libbitmaps.a'. - * Icons: - * preference_xpm[]; // Icon for 'Developers' tab - * editor_xpm[]; // Icon for 'Doc Writers' tab - * palette_xpm[]; // Icon for 'Artists' tab - * language_xpm[]; // Icon for 'Translators' tab - * right_xpm[]; // Right arrow icon for list items - * info_xpm[]; // Bulb for description tab - * tools_xpm[]; // Sheet of paper icon for license info tab - */ -#include +#include "aboutinfo.h" +#include "dialog_about_base.h" /** * About dialog to show application specific information. @@ -74,6 +61,7 @@ private: virtual void OnClose( wxCloseEvent& event ); virtual void OnOkClick( wxCommandEvent& event ); virtual void OnHtmlLinkClicked( wxHtmlLinkEvent& event ); + virtual void OnCopyVersionInfo( wxCommandEvent &event ); // Notebook pages wxFlexGridSizer* CreateFlexGridSizer(); diff --git a/common/dialog_about/dialog_about_base.cpp b/common/dialog_about/dialog_about_base.cpp index 19b9db7a43..95aa29893a 100644 --- a/common/dialog_about/dialog_about_base.cpp +++ b/common/dialog_about/dialog_about_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Aug 23 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -44,10 +44,10 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS m_staticTextLibVersion = new wxStaticText( this, wxID_ANY, _("Lib Version Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); m_staticTextLibVersion->Wrap( -1 ); - b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT, 5 ); + b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 ); - bSizer3->Add( b_apptitleSizer, 10, wxEXPAND, 5 ); + bSizer3->Add( b_apptitleSizer, 10, wxALL|wxEXPAND, 5 ); bSizer3->Add( 0, 0, 2, wxEXPAND, 5 ); @@ -55,22 +55,27 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS bSizer1->Add( bSizer3, 0, wxEXPAND, 5 ); - wxStaticLine* m_staticline1; - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); - m_auiNotebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH ); m_auiNotebook->SetMinSize( wxSize( 750,350 ) ); - bSizer1->Add( m_auiNotebook, 2, wxEXPAND | wxALL, 5 ); + bSizer1->Add( m_auiNotebook, 2, wxALL|wxEXPAND, 5 ); - m_sdbSizer = new wxStdDialogButtonSizer(); - m_sdbSizerOK = new wxButton( this, wxID_OK ); - m_sdbSizer->AddButton( m_sdbSizerOK ); - m_sdbSizer->Realize(); + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxHORIZONTAL ); - bSizer1->Add( m_sdbSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + + bSizer4->Add( 0, 0, 1, wxEXPAND, 5 ); + + copyVersionInfo = new wxButton( this, wxID_COPY, _("Copy Version Info"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( copyVersionInfo, 0, wxALL, 5 ); + + ok = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + ok->SetDefault(); + bSizer4->Add( ok, 0, wxALL, 5 ); + + + bSizer1->Add( bSizer4, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); this->SetSizer( bSizer1 ); diff --git a/common/dialog_about/dialog_about_base.fbp b/common/dialog_about/dialog_about_base.fbp index e776d48c0d..1338970a04 100644 --- a/common/dialog_about/dialog_about_base.fbp +++ b/common/dialog_about/dialog_about_base.fbp @@ -44,10 +44,10 @@ -1,-1 dialog_about_base - 750,437 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP + 750,471 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - About... + About @@ -93,11 +93,11 @@ bSizer1 wxVERTICAL none - + 5 wxEXPAND 0 - + bSizer3 wxHORIZONTAL @@ -193,11 +193,11 @@ - + 5 - wxEXPAND + wxALL|wxEXPAND 10 - + b_apptitleSizer wxVERTICAL @@ -453,7 +453,7 @@ 5 - wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT + wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP 0 1 @@ -550,88 +550,7 @@ 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - none - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL + wxALL|wxEXPAND 2 1 @@ -722,28 +641,199 @@ 5 - wxALL|wxALIGN_CENTER_HORIZONTAL + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 - - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 + - m_sdbSizer - protected - - - - - - - - + bSizer4 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_COPY + Copy Version Info + + 0 + + + 0 + + 1 + copyVersionInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_OK + OK + + 0 + + + 0 + + 1 + ok + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/dialog_about/dialog_about_base.h b/common/dialog_about/dialog_about_base.h index 909898445a..d1e584ca48 100644 --- a/common/dialog_about/dialog_about_base.h +++ b/common/dialog_about/dialog_about_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Aug 23 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -43,12 +42,12 @@ class dialog_about_base : public wxDialog wxStaticText* m_staticTextBuildVersion; wxStaticText* m_staticTextLibVersion; wxAuiNotebook* m_auiNotebook; - wxStdDialogButtonSizer* m_sdbSizer; - wxButton* m_sdbSizerOK; + wxButton* copyVersionInfo; + wxButton* ok; public: - dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,437 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP ); + dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,471 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~dialog_about_base(); }; diff --git a/common/kicad_curl/kicad_curl.cpp b/common/kicad_curl/kicad_curl.cpp index fe899603ea..a5670a7fc7 100644 --- a/common/kicad_curl/kicad_curl.cpp +++ b/common/kicad_curl/kicad_curl.cpp @@ -23,7 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -// kicad_curl.h must be included before xw headers, to avoid +// kicad_curl.h must be included before wx headers, to avoid // conflicts for some defines, at least on Windows #include diff --git a/cvpcb/menubar.cpp b/cvpcb/menubar.cpp index a8cc333d7a..6d6ff3aaa2 100644 --- a/cvpcb/menubar.cpp +++ b/cvpcb/menubar.cpp @@ -26,16 +26,15 @@ * @file cvpcb/menubar.cpp * @brief (Re)Create the menubar for CvPcb */ -#include -#include -#include -#include - -#include -#include -#include #include +#include +#include +#include + +#include "cvpcb.h" +#include "cvpcb_id.h" +#include "cvpcb_mainframe.h" /** @@ -111,9 +110,6 @@ void CVPCB_MAINFRAME::ReCreateMenuBar() // Menu Help: wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Manual Contents AddMenuItem( helpMenu, wxID_HELP, _( "CvPcb &Manual" ), _( "Open CvPcb Manual" ), diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 1900519954..2f9425e764 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -28,18 +28,16 @@ * @brief (Re)Create the main menubar for the schematic frame */ -#include + #include -#include -#include - -#include -#include -#include #include +#include -#include - +#include "eeschema_id.h" +#include "general.h" +#include "help_common_strings.h" +#include "hotkeys.h" +#include "schframe.h" void SCH_EDIT_FRAME::ReCreateMenuBar() { @@ -497,9 +495,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Help Menu: wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - AddMenuItem( helpMenu, wxID_HELP, _( "Eeschema &Manual" ), diff --git a/eeschema/menubar_libedit.cpp b/eeschema/menubar_libedit.cpp index ed3abe68f7..8e5adcb810 100644 --- a/eeschema/menubar_libedit.cpp +++ b/eeschema/menubar_libedit.cpp @@ -27,16 +27,16 @@ * @file eeschema/menubar_libedit.cpp * @brief (Re)Create the main menubar for the component editor frame (LibEdit) */ -#include + +#include #include -#include -#include -#include -#include +#include "eeschema_id.h" +#include "general.h" +#include "help_common_strings.h" +#include "hotkeys.h" +#include "libeditframe.h" -#include -#include /** * @brief (Re)Create the menubar for the component editor frame @@ -247,9 +247,6 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() // Menu Help: wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index 79a50bdb8d..d2ad687008 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -28,17 +28,17 @@ * @brief Build the toolbars for the library browser. */ -#include -#include -#include -#include -#include -#include -#include #include +#include #include -#include + +#include "class_library.h" +#include "eeschema_id.h" +#include "general.h" +#include "help_common_strings.h" +#include "hotkeys.h" +#include "viewlib_frame.h" void LIB_VIEW_FRAME::ReCreateHToolbar() @@ -242,9 +242,6 @@ void LIB_VIEW_FRAME::ReCreateMenuBar( void ) // Menu Help: wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, _( "Eeschema &Manual" ), diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index e9ad2bd2fc..6afd531697 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -27,15 +27,16 @@ * @file gerbview/menubar.cpp * @brief (Re)Create the main menubar for GerbView */ -#include -#include + #include -#include -#include -#include -#include #include +#include + +#include "gerbview.h" +#include "gerbview_frame.h" +#include "gerbview_id.h" +#include "hotkeys.h" void GERBVIEW_FRAME::ReCreateMenuBar() @@ -215,9 +216,6 @@ void GERBVIEW_FRAME::ReCreateMenuBar() // Menu Help wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, diff --git a/include/id.h b/include/id.h index ef2803700b..069c4751e4 100644 --- a/include/id.h +++ b/include/id.h @@ -118,8 +118,6 @@ enum main_id ID_OPT_TOOLBAR, ID_AUX_TOOLBAR, - ID_HELP_COPY_VERSION_STRING, - ID_EDIT, ID_NO_TOOL_SELECTED, ID_SEL_BG_COLOR, diff --git a/include/wxstruct.h b/include/wxstruct.h index ab5ff7c3e3..a6eb79ca9d 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -219,21 +219,8 @@ public: void GetKicadAbout( wxCommandEvent& event ); - /** - * Function CopyVersionInfoToClipboard - * copies the version information to the clipboard for bug reporting purposes. - */ - void CopyVersionInfoToClipboard( wxCommandEvent& event ); - void PrintMsg( const wxString& text ); - /** - * Append the copy version information to clipboard help menu entry to \a aMenu. - * - * @param aMenu - The menu to append. - */ - void AddHelpVersionInfoMenuEntry( wxMenu* aMenu ); - /** * Function LoadSettings * loads common frame parameters from a configuration file. diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index e6a8980f44..8d7b72ecfe 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -402,9 +402,6 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // Menu Help: wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, _( "KiCad &Manual" ), diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index 53dc15d7c8..baa44c7a86 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -1,8 +1,3 @@ -/** - * @file pagelayout_editor/menubar.cpp - * @brief (Re)Create the main menubar for Pl_Editor - */ - /* * This program source code file is part of KiCad, a free EDA CAD application. * @@ -27,14 +22,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +/** + * @file pagelayout_editor/menubar.cpp + * @brief (Re)Create the main menubar for Pl_Editor + */ + -#include #include -#include -#include -#include #include +#include + +#include "hotkeys.h" +#include "pl_editor_frame.h" +#include "pl_editor_id.h" void PL_EDITOR_FRAME::ReCreateMenuBar() @@ -142,9 +142,6 @@ void PL_EDITOR_FRAME::ReCreateMenuBar() // Menu Help wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, diff --git a/pcbnew/menubar_modedit.cpp b/pcbnew/menubar_modedit.cpp index 55ceccc8ad..f8668c3734 100644 --- a/pcbnew/menubar_modedit.cpp +++ b/pcbnew/menubar_modedit.cpp @@ -29,17 +29,17 @@ * @file pcbnew/menubar_modedit.cpp * @brief (Re)Create the main menubar for the module editor */ -#include -#include -#include -#include -#include + #include +#include +#include -#include -#include -#include +#include "help_common_strings.h" +#include "hotkeys.h" +#include "module_editor_frame.h" +#include "pcbnew.h" +#include "pcbnew_id.h" void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() @@ -333,9 +333,6 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() //----- Help menu -------------------- wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, _( "Pcbnew &Manual" ), diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 1f03c0d3e7..c7c580c6f7 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -28,16 +28,18 @@ * @file menubar_pcbframe.cpp * Pcbnew editor menu bar */ -#include -#include -#include -#include -#include -#include -#include -#include + #include +#include +#include +#include + +#include "help_common_strings.h" +#include "hotkeys.h" +#include "pcbnew.h" +#include "pcbnew_id.h" + void PCB_EDIT_FRAME::ReCreateMenuBar() { @@ -652,8 +654,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() wxMenu* helpMenu = new wxMenu; - AddHelpVersionInfoMenuEntry( helpMenu ); - AddMenuItem( helpMenu, wxID_HELP, _( "Pcbnew &Manual" ), _( "Open the Pcbnew Manual" ), diff --git a/pcbnew/tool_modview.cpp b/pcbnew/tool_modview.cpp index 5a56a35ae8..0ec00d82b5 100644 --- a/pcbnew/tool_modview.cpp +++ b/pcbnew/tool_modview.cpp @@ -29,17 +29,17 @@ * @brief Build the toolbars for the library browser. */ -#include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include +#include + +#include "help_common_strings.h" +#include "hotkeys.h" +#include "modview_frame.h" +#include "pcbnew.h" +#include "pcbnew_id.h" void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar() @@ -181,9 +181,6 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar( void ) // Menu Help: wxMenu* helpMenu = new wxMenu; - // Version info - AddHelpVersionInfoMenuEntry( helpMenu ); - // Contents AddMenuItem( helpMenu, wxID_HELP, _( "Pcbnew &Manual" ),