Commit e7cd29ec authored by jerryjacobs's avatar jerryjacobs

Beautify code for kicad.cpp, kicad/mainframe.cpp, treeprj_frame.cpp

parent 365dbe15
This diff is collapsed.
......@@ -21,16 +21,19 @@
#include "kicad.h"
/****************/
/* Constructor */
/****************/
// Constructor
/*****************************************************************************/
WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
wxWindow* parent, const wxString& title,
const wxPoint& pos, const wxSize& size ) :
WinEDA_BasicFrame( parent, KICAD_MAIN_FRAME, eda_app, title, pos, size )
wxWindow* parent,
const wxString& title,
const wxPoint& pos,
const wxSize& size ) :
WinEDA_BasicFrame( parent, KICAD_MAIN_FRAME, eda_app, title, pos, size )
/*****************************************************************************/
{
wxString msg;
wxString line;
wxSize clientsize;
m_FrameName = wxT( "KicadFrame" );
......@@ -44,8 +47,10 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
GetSettings();
if( m_Parent->m_EDA_Config )
{
m_Parent->m_EDA_Config->Read( wxT( "LeftWinWidth" ), &m_LeftWin_Width );
m_Parent->m_EDA_Config->Read( wxT( "CommandWinWidth" ), &m_CommandWin_Height );
m_Parent->m_EDA_Config->Read( wxT( "LeftWinWidth" ),
&m_LeftWin_Width );
m_Parent->m_EDA_Config->Read( wxT( "CommandWinWidth" ),
&m_CommandWin_Height );
}
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
......@@ -78,7 +83,7 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
wxNO_BORDER | wxSW_3D );
m_BottomWin->SetDefaultSize( wxSize( clientsize.x, 150 ) );
m_BottomWin->SetOrientation( wxLAYOUT_HORIZONTAL );
m_BottomWin->SetAlignment( wxLAYOUT_BOTTOM );
m_BottomWin->SetAlignment ( wxLAYOUT_BOTTOM );
m_BottomWin->SetSashVisible( wxSASH_TOP, TRUE );
m_BottomWin->SetSashVisible( wxSASH_LEFT, TRUE );
m_BottomWin->SetExtraBorderSize( 2 );
......@@ -91,28 +96,27 @@ WinEDA_MainFrame::WinEDA_MainFrame( WinEDA_App* eda_app,
m_DialogWin->SetFont( *g_StdFont );
// m_CommandWin is the box with buttons which launch eechema, pcbnew ...
m_CommandWin = new WinEDA_CommandFrame( this, ID_MAIN_COMMAND,
m_CommandWin = new WinEDA_CommandFrame( this,
ID_MAIN_COMMAND,
wxPoint( m_LeftWin_Width,
0 ),
wxSize( clientsize.x, m_CommandWin_Height ),
wxSize( clientsize.x,
m_CommandWin_Height ),
wxNO_BORDER | wxSW_3D );
wxString line;
msg = wxGetCwd();
line.Printf( _( "Ready\nWorking dir: %s\n" ), msg.GetData() );
PrintMsg( line );
#ifdef KICAD_PYTHON
#ifdef KICAD_PYTHON
PyHandler::GetInstance()->DeclareEvent( wxT( "kicad::LoadProject" ) );
#endif
#endif
}
/***************/
/* Destructor */
/***************/
/*****************************************************************************/
WinEDA_MainFrame::~WinEDA_MainFrame()
/*****************************************************************************/
{
if( m_Parent->m_EDA_Config )
{
......@@ -127,7 +131,6 @@ WinEDA_MainFrame::~WinEDA_MainFrame()
/*******************************************************/
void WinEDA_MainFrame::PrintMsg( const wxString& text )
/*******************************************************/
/*
* Put text in the dialog frame
*/
......@@ -394,6 +397,7 @@ void WinEDA_MainFrame::OnRefresh( wxCommandEvent& event )
}
/*********************************/
void WinEDA_MainFrame::ClearMsg()
/*********************************/
......@@ -401,11 +405,13 @@ void WinEDA_MainFrame::ClearMsg()
m_DialogWin->Clear();
}
#ifdef KICAD_PYTHON
/*****************************************************************************/
void WinEDA_MainFrame::OnRefreshPy()
/*****************************************************************************/
{
m_LeftWin->ReCreateTreePrj();
}
#endif
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment