From b39061855ef0718041c5a8fe66754dc2543e487c Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 1 Jan 2019 21:44:44 -0700 Subject: [PATCH] pcbnew: Translate scripting test window --- pcbnew/dialogs/dialog_scripting_base.cpp | 22 +++--- pcbnew/dialogs/dialog_scripting_base.fbp | 98 +++--------------------- pcbnew/dialogs/dialog_scripting_base.h | 28 +++---- 3 files changed, 37 insertions(+), 111 deletions(-) diff --git a/pcbnew/dialogs/dialog_scripting_base.cpp b/pcbnew/dialogs/dialog_scripting_base.cpp index 23b074c593..24afc9b20d 100644 --- a/pcbnew/dialogs/dialog_scripting_base.cpp +++ b/pcbnew/dialogs/dialog_scripting_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version Nov 23 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -12,25 +12,25 @@ DIALOG_SCRIPTING_BASE::DIALOG_SCRIPTING_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - + wxBoxSizer* bSizerMain; bSizerMain = new wxBoxSizer( wxVERTICAL ); - + m_txScript = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE ); m_txScript->SetMinSize( wxSize( 480,500 ) ); - + bSizerMain->Add( m_txScript, 1, wxALL|wxEXPAND, 5 ); - - m_btRun = new wxButton( this, wxID_ANY, wxT("&Run"), wxDefaultPosition, wxDefaultSize, 0 ); + + m_btRun = new wxButton( this, wxID_ANY, _("&Run"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerMain->Add( m_btRun, 0, wxALL, 5 ); - - + + this->SetSizer( bSizerMain ); this->Layout(); bSizerMain->Fit( this ); - + this->Centre( wxBOTH ); - + // Connect Events m_btRun->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCRIPTING_BASE::OnRunButtonClick ), NULL, this ); } @@ -39,5 +39,5 @@ DIALOG_SCRIPTING_BASE::~DIALOG_SCRIPTING_BASE() { // Disconnect Events m_btRun->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCRIPTING_BASE::OnRunButtonClick ), NULL, this ); - + } diff --git a/pcbnew/dialogs/dialog_scripting_base.fbp b/pcbnew/dialogs/dialog_scripting_base.fbp index 6b36eb246c..55be1eafa8 100644 --- a/pcbnew/dialogs/dialog_scripting_base.fbp +++ b/pcbnew/dialogs/dialog_scripting_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,7 +14,8 @@ dialog_scripting_base 1000 none - 0 + + 1 DIALOG_SCRIPTING_BASE . @@ -53,41 +54,6 @@ wxTAB_TRAVERSAL 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMain @@ -155,33 +121,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -199,25 +138,31 @@ + 1 0 1 1 + 0 0 + Dock 0 Left 1 1 + 0 0 wxID_ANY &Run + + 0 0 @@ -232,6 +177,8 @@ protected 1 + + Resizable 1 @@ -247,29 +194,6 @@ OnRunButtonClick - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pcbnew/dialogs/dialog_scripting_base.h b/pcbnew/dialogs/dialog_scripting_base.h index 373060ba76..9c679451ad 100644 --- a/pcbnew/dialogs/dialog_scripting_base.h +++ b/pcbnew/dialogs/dialog_scripting_base.h @@ -1,21 +1,24 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version Nov 23 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_SCRIPTING_BASE_H__ -#define __DIALOG_SCRIPTING_BASE_H__ +#pragma once #include #include +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include @@ -26,24 +29,23 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_SCRIPTING_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_SCRIPTING_BASE : public wxFrame +class DIALOG_SCRIPTING_BASE : public wxFrame { private: - + protected: wxTextCtrl* m_txScript; wxButton* m_btRun; - + // Virtual event handlers, overide them in your derived class virtual void OnRunButtonClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_SCRIPTING_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Scripting Test Window"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - + + DIALOG_SCRIPTING_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Scripting Test Window"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + ~DIALOG_SCRIPTING_BASE(); - + }; -#endif //__DIALOG_SCRIPTING_BASE_H__