Commit 9b3ca068 authored by stambaughw's avatar stambaughw

EESchema dialog box updates.

* Replace schematic editor options dialog with wxFormBuilder version.
* Fix ugly wxGTK sizer hack in pin properties dialog.
* Set dialog minimum size after initial fit to prevent dialog controls
  from being obscured when resizing.
* Move bitmaps in annotate dialog for cleaner control alignment.
parent 9a878b0b
...@@ -52,6 +52,8 @@ set(EESCHEMA_SRCS ...@@ -52,6 +52,8 @@ set(EESCHEMA_SRCS
dialog_edit_libentry_fields_in_lib_base.cpp dialog_edit_libentry_fields_in_lib_base.cpp
dialog_eeschema_config.cpp dialog_eeschema_config.cpp
dialog_eeschema_config_fbp.cpp dialog_eeschema_config_fbp.cpp
dialog_eeschema_options_base.cpp
dialog_eeschema_options.cpp
dialog_erc.cpp dialog_erc.cpp
dialog_erc_base.cpp dialog_erc_base.cpp
# dialog_find.cpp # dialog_find.cpp
...@@ -61,7 +63,6 @@ set(EESCHEMA_SRCS ...@@ -61,7 +63,6 @@ set(EESCHEMA_SRCS
dialog_lib_edit_pin_base.cpp dialog_lib_edit_pin_base.cpp
dialog_lib_new_component.cpp dialog_lib_new_component.cpp
dialog_lib_new_component_base.cpp dialog_lib_new_component_base.cpp
dialog_options.cpp
dialog_print_using_printer_base.cpp dialog_print_using_printer_base.cpp
dialog_print_using_printer.cpp dialog_print_using_printer.cpp
dialog_SVG_print.cpp dialog_SVG_print.cpp
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 21 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -23,25 +23,25 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con ...@@ -23,25 +23,25 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
m_staticTextScope->Wrap( -1 ); m_staticTextScope->Wrap( -1 );
m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bupperSizer->Add( m_staticTextScope, 0, wxALL, 5 ); bupperSizer->Add( m_staticTextScope, 0, wxALL, 6 );
wxBoxSizer* bscopeOptSizer; wxBoxSizer* bscopeOptSizer;
bscopeOptSizer = new wxBoxSizer( wxVERTICAL ); bscopeOptSizer = new wxBoxSizer( wxVERTICAL );
m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 5 ); bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 3 );
m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 ); m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 );
bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 5 ); bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 3 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 5 ); bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 3 );
m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 ); m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 5 ); bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 3 );
bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 ); bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 );
...@@ -52,7 +52,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con ...@@ -52,7 +52,7 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
m_staticTextOrder->Wrap( -1 ); m_staticTextOrder->Wrap( -1 );
m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bupperSizer->Add( m_staticTextOrder, 0, wxALL, 5 ); bupperSizer->Add( m_staticTextOrder, 0, wxALL, 6 );
wxBoxSizer* b_orderOptSizer; wxBoxSizer* b_orderOptSizer;
b_orderOptSizer = new wxBoxSizer( wxVERTICAL ); b_orderOptSizer = new wxBoxSizer( wxVERTICAL );
...@@ -60,42 +60,49 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con ...@@ -60,42 +60,49 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
wxBoxSizer* bSizerXpos; wxBoxSizer* bSizerXpos;
bSizerXpos = new wxBoxSizer( wxHORIZONTAL ); bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxRIGHT|wxLEFT, 5 );
m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort Components by &X Position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort Components by &X Position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 5 ); bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 3 );
bSizerXpos->Add( 0, 0, 1, wxEXPAND, 5 );
annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 );
b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND, 5 ); b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bSizerYpos; wxBoxSizer* bSizerYpos;
bSizerYpos = new wxBoxSizer( wxHORIZONTAL ); bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxRIGHT|wxLEFT, 5 );
m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort Components by &Y Position"), wxDefaultPosition, wxDefaultSize, 0 ); m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort Components by &Y Position"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 5 ); bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 3 );
bSizerYpos->Add( 0, 0, 1, wxEXPAND, 5 );
b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND, 5 ); annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bSizerValuepos; wxBoxSizer* bSizerValuepos;
bSizerValuepos = new wxBoxSizer( wxHORIZONTAL ); bSizerValuepos = new wxBoxSizer( wxHORIZONTAL );
annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxRIGHT|wxLEFT, 5 );
rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort Components by &Value"), wxDefaultPosition, wxDefaultSize, 0 ); rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort Components by &Value"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( rbSortByValue, 0, wxALL, 5 ); bSizerValuepos->Add( rbSortByValue, 0, wxALL, 3 );
b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND, 5 );
bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 ); bSizerValuepos->Add( 0, 0, 1, wxEXPAND, 5 );
bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxLEFT, 5 ); annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 );
b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND|wxRIGHT, 5 );
bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 );
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bmainSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 ); bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* bButtonsSizer; wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
...@@ -109,10 +116,13 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con ...@@ -109,10 +116,13 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 ); m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 ); bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 );
bmainSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); bupperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 6 );
bmainSizer->Add( bupperSizer, 1, wxALL|wxEXPAND, 6 );
this->SetSizer( bmainSizer ); this->SetSizer( bmainSizer );
this->Layout(); this->Layout();
bmainSizer->Fit( this );
// Connect Events // Connect Events
m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this ); m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this );
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Apr 21 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -53,12 +53,15 @@ class DIALOG_ANNOTATE_BASE : public wxDialog ...@@ -53,12 +53,15 @@ class DIALOG_ANNOTATE_BASE : public wxDialog
wxRadioButton* m_rbResetAnnotation; wxRadioButton* m_rbResetAnnotation;
wxStaticLine* m_staticline2; wxStaticLine* m_staticline2;
wxStaticText* m_staticTextOrder; wxStaticText* m_staticTextOrder;
wxStaticBitmap* annotate_down_right_bitmap;
wxRadioButton* m_rbSortBy_X_Position; wxRadioButton* m_rbSortBy_X_Position;
wxStaticBitmap* annotate_right_down_bitmap;
wxStaticBitmap* annotate_down_right_bitmap;
wxRadioButton* m_rbSortBy_Y_Position; wxRadioButton* m_rbSortBy_Y_Position;
wxStaticBitmap* annotate_by_value_bitmap;
wxStaticBitmap* annotate_right_down_bitmap;
wxRadioButton* rbSortByValue; wxRadioButton* rbSortByValue;
wxStaticBitmap* annotate_by_value_bitmap;
wxStaticLine* m_staticline5; wxStaticLine* m_staticline5;
wxButton* m_btnClose; wxButton* m_btnClose;
wxButton* m_btnClear; wxButton* m_btnClear;
...@@ -71,7 +74,7 @@ class DIALOG_ANNOTATE_BASE : public wxDialog ...@@ -71,7 +74,7 @@ class DIALOG_ANNOTATE_BASE : public wxDialog
public: public:
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 331,338 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ANNOTATE_BASE(); ~DIALOG_ANNOTATE_BASE();
}; };
......
#include "fctsys.h"
#include "class_base_screen.h"
#include "dialog_eeschema_options.h"
DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
DIALOG_EESCHEMA_OPTIONS_BASE( parent )
{
}
void DIALOG_EESCHEMA_OPTIONS::SetUnits( const wxArrayString& units, int select )
{
wxASSERT( units.GetCount() > 0
&& ( select >= 0 && (size_t) select < units.GetCount() ) );
m_choiceUnits->Append( units );
m_choiceUnits->SetSelection( select );
}
void DIALOG_EESCHEMA_OPTIONS::SetGridSizes( const GridArray& grid_sizes,
int grid_id )
{
wxASSERT( grid_sizes.GetCount() > 0 );
int select = wxNOT_FOUND;
for( size_t i = 0; i < grid_sizes.GetCount(); i++ )
{
wxString tmp;
tmp.Printf( wxT( "%0.1f" ), grid_sizes[i].m_Size.x );
m_choiceGridSize->Append( tmp );
if( grid_sizes[i].m_Id == grid_id )
select = (int) i;
}
m_choiceGridSize->SetSelection( select );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef __dialog_eeschema_options__
#define __dialog_eeschema_options__
/**
* @file
* Subclass of DIALOG_EESCHEMA_OPTIONS_BASE, which is generated by wxFormBuilder.
*/
#include "dialog_eeschema_options_base.h"
class DIALOG_EESCHEMA_OPTIONS : public DIALOG_EESCHEMA_OPTIONS_BASE
{
public:
DIALOG_EESCHEMA_OPTIONS( wxWindow* parent );
void SetUnits( const wxArrayString& units, int select = 0 );
int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
void SetGridSelection( int select )
{
m_choiceGridSize->SetSelection( select );
}
int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
void SetGridSizes( const GridArray& grid_sizes, int grid_id );
void SetLineWidth( int line_width )
{
m_spinLineWidth->SetValue( line_width );
}
int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }
void SetTextSize( int text_size )
{
m_spinTextSize->SetValue( text_size );
}
int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
void SetRepeatHorizontal( int displacement )
{
m_spinRepeatHorizontal->SetValue( displacement );
}
int GetRepeatHorizontal( void )
{
return m_spinRepeatHorizontal->GetValue();
}
void SetRepeatVertical( int displacement )
{
m_spinRepeatVertical->SetValue( displacement );
}
int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
void SetRepeatLabel( int increment )
{
m_spinRepeatLabel->SetValue( increment );
}
int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
void SetShowHiddenPins( bool show )
{
m_checkShowHiddenPins->SetValue( show );
}
bool GetShowHiddenPins( void )
{
return m_checkShowHiddenPins->GetValue();
}
void SetEnableAutoPan( bool enable )
{
m_checkAutoPan->SetValue( enable );
}
bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
void SetEnableAnyBusOrientation( bool enable )
{
m_checkAnyOrientation->SetValue( enable );
}
bool GetEnableAnyBusOrientation( void )
{
return m_checkAnyOrientation->GetValue();
}
void SetShowPageLimits( bool show )
{
m_checkPageLimits->SetValue( show );
}
bool GetShowPageLimits( void )
{
return m_checkPageLimits->GetValue();
}
};
#endif // __dialog_eeschema_options__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_eeschema_options_base.h"
///////////////////////////////////////////////////////////////////////////
BEGIN_EVENT_TABLE( DIALOG_EESCHEMA_OPTIONS_BASE, wxDialog )
EVT_CHOICE( wxID_ANY, DIALOG_EESCHEMA_OPTIONS_BASE::_wxFB_OnChooseUnits )
END_EVENT_TABLE()
DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* mainSizer;
mainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 7, 3, 0, 0 );
fgSizer1->AddGrowableCol( 0 );
fgSizer1->AddGrowableCol( 1 );
fgSizer1->AddGrowableCol( 2 );
fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Mesurement &units:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
fgSizer1->Add( m_staticText2, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceUnitsChoices;
m_choiceUnits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitsChoices, 0 );
m_choiceUnits->SetSelection( 0 );
fgSizer1->Add( m_choiceUnits, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 );
m_staticText3 = new wxStaticText( this, wxID_ANY, _("&Grid size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
fgSizer1->Add( m_staticText3, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
wxArrayString m_choiceGridSizeChoices;
m_choiceGridSize = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceGridSizeChoices, 0 );
m_choiceGridSize->SetSelection( 0 );
fgSizer1->Add( m_choiceGridSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticGridUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticGridUnits->Wrap( -1 );
fgSizer1->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Default &line width:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 );
fgSizer1->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinLineWidth = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 );
fgSizer1->Add( m_spinLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticLineWidthUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticLineWidthUnits->Wrap( -1 );
fgSizer1->Add( m_staticLineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText7 = new wxStaticText( this, wxID_ANY, _("Default text &size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7->Wrap( -1 );
fgSizer1->Add( m_staticText7, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinTextSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 1000, 0 );
fgSizer1->Add( m_spinTextSize, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSizeUnits->Wrap( -1 );
fgSizer1->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Repeat draw item &horizontal displacement:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9->Wrap( -1 );
fgSizer1->Add( m_staticText9, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinRepeatHorizontal = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2000, 1 );
fgSizer1->Add( m_spinRepeatHorizontal, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticRepeatXUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticRepeatXUnits->Wrap( -1 );
fgSizer1->Add( m_staticRepeatXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Repeat draw item &vertical displacement:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
fgSizer1->Add( m_staticText12, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinRepeatVertical = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 2000, 1 );
fgSizer1->Add( m_spinRepeatVertical, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
m_staticRepeatYUnits = new wxStaticText( this, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticRepeatYUnits->Wrap( -1 );
fgSizer1->Add( m_staticRepeatYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText16 = new wxStaticText( this, wxID_ANY, _("&Repeat label increment:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
fgSizer1->Add( m_staticText16, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_spinRepeatLabel = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -100, 100, 1 );
fgSizer1->Add( m_spinRepeatLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 3 );
bSizer3->Add( fgSizer1, 0, wxALIGN_CENTER|wxEXPAND, 0 );
wxBoxSizer* bSizer2;
bSizer2 = new wxBoxSizer( wxVERTICAL );
m_checkShowGrid = new wxCheckBox( this, wxID_ANY, _("Show g&rid"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkShowGrid, 0, wxALL|wxEXPAND, 3 );
m_checkShowHiddenPins = new wxCheckBox( this, wxID_ANY, _("Show hi&dden pins"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkShowHiddenPins, 0, wxALL|wxEXPAND, 3 );
m_checkAutoPan = new wxCheckBox( this, wxID_ANY, _("Enable automatic &panning"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkAutoPan, 0, wxALL|wxEXPAND, 3 );
m_checkAnyOrientation = new wxCheckBox( this, wxID_ANY, _("Allow buses and wires to be placed in any &orientation"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkAnyOrientation, 0, wxALL|wxEXPAND, 3 );
m_checkPageLimits = new wxCheckBox( this, wxID_ANY, _("Show p&age limits"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer2->Add( m_checkPageLimits, 0, wxALL|wxEXPAND, 3 );
bSizer3->Add( bSizer2, 0, wxEXPAND, 0 );
bSizer3->Add( 0, 0, 1, wxALL|wxEXPAND, 10 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bSizer3->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 0 );
mainSizer->Add( bSizer3, 1, wxALL|wxEXPAND, 12 );
this->SetSizer( mainSizer );
this->Layout();
mainSizer->Fit( this );
this->Centre( wxBOTH );
}
DIALOG_EESCHEMA_OPTIONS_BASE::~DIALOG_EESCHEMA_OPTIONS_BASE()
{
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_eeschema_options_base__
#define __dialog_eeschema_options_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/choice.h>
#include <wx/spinctrl.h>
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EESCHEMA_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
{
DECLARE_EVENT_TABLE()
private:
// Private event handlers
void _wxFB_OnChooseUnits( wxCommandEvent& event ){ OnChooseUnits( event ); }
protected:
wxStaticText* m_staticText2;
wxChoice* m_choiceUnits;
wxStaticText* m_staticText3;
wxChoice* m_choiceGridSize;
wxStaticText* m_staticGridUnits;
wxStaticText* m_staticText5;
wxSpinCtrl* m_spinLineWidth;
wxStaticText* m_staticLineWidthUnits;
wxStaticText* m_staticText7;
wxSpinCtrl* m_spinTextSize;
wxStaticText* m_staticTextSizeUnits;
wxStaticText* m_staticText9;
wxSpinCtrl* m_spinRepeatHorizontal;
wxStaticText* m_staticRepeatXUnits;
wxStaticText* m_staticText12;
wxSpinCtrl* m_spinRepeatVertical;
wxStaticText* m_staticRepeatYUnits;
wxStaticText* m_staticText16;
wxSpinCtrl* m_spinRepeatLabel;
wxCheckBox* m_checkShowGrid;
wxCheckBox* m_checkShowHiddenPins;
wxCheckBox* m_checkAutoPan;
wxCheckBox* m_checkAnyOrientation;
wxCheckBox* m_checkPageLimits;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnChooseUnits( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Schematic Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EESCHEMA_OPTIONS_BASE();
};
#endif //__dialog_eeschema_options_base__
...@@ -5,14 +5,6 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) : ...@@ -5,14 +5,6 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
{ {
/* Required to make escape key work correctly in wxGTK. */ /* Required to make escape key work correctly in wxGTK. */
m_textName->SetFocus(); m_textName->SetFocus();
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier
* versions for the flex grid sizer in wxGTK that prevents the last
* column from being sized correctly.
*/
#ifdef __WXGTK__
m_staticNameTextSizeUnits->SetMinSize( wxSize( 75, -1 ) );
#endif
} }
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_options.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 31/01/2006 13:27:33
// RCS-ID:
// Copyright: GNU License
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 31/01/2006 13:27:33
#ifndef _DIALOG_OPTIONS_H_
#define _DIALOG_OPTIONS_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dialog_options.h"
#endif
/*!
* Includes
*/
////@begin includes
#include "wx/spinctrl.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class wxBoxSizer;
class wxSpinCtrl;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_CHECKBOX1 10001
#define ID_RADIOBOX 10003
#define ID_RADIOBOX1 10004
#define ID_CHECKBOX 10002
#define ID_RADIOBOX2 10005
#define ID_RADIOBOX3 10006
#define ID_RADIOBOX4 10007
#define ID_TEXTCTRL 10008
#define ID_TEXTCTRL1 10009
#define ID_SPINCTRL 10010
#define SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE _("General Options")
#define SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_SetOptionsFrame class declaration
*/
class WinEDA_SetOptionsFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_SetOptionsFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_SetOptionsFrame( );
WinEDA_SetOptionsFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_SetOptionsFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
////@end WinEDA_SetOptionsFrame event handler declarations
////@begin WinEDA_SetOptionsFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_SetOptionsFrame member function declarations
void Accept(wxCommandEvent& event);
/// Should we show tooltips?
static bool ShowToolTips();
WinEDA_SchematicFrame * m_Parent;
////@begin WinEDA_SetOptionsFrame member variables
wxStaticBoxSizer* m_DrawOptionsSizer;
wxCheckBox* m_ShowGridOpt;
wxRadioBox* m_SelGridSize;
wxRadioBox* m_SelShowPins;
wxCheckBox* m_AutoPANOpt;
wxRadioBox* m_Selunits;
wxBoxSizer* m_LabelSizeCtrlSizer;
wxRadioBox* m_SelDirWires;
wxRadioBox* m_Show_Page_Limits;
wxButton* m_btClose;
wxStaticText* m_DeltaStepXTitle;
wxTextCtrl* m_DeltaStepCtrl_X;
wxStaticText* m_DeltaStepYTitle;
wxTextCtrl* m_DeltaStepCtrl_Y;
wxStaticText* m_DeltaIncTitle;
wxSpinCtrl* m_DeltaLabelCtrl;
////@end WinEDA_SetOptionsFrame member variables
WinEDA_ValueCtrl * m_DefaultDrawLineWidthCtrl;
WinEDA_ValueCtrl * m_DefaultLabelSizeCtrl;
};
#endif
// _DIALOG_OPTIONS_H_
This diff is collapsed.
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "program.h" #include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "eeschema_config.h" #include "eeschema_config.h"
#include "worksheet.h" #include "worksheet.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "dialog_eeschema_options.h"
#define HOTKEY_FILENAME wxT( "eeschema" ) #define HOTKEY_FILENAME wxT( "eeschema" )
...@@ -42,12 +42,6 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event ) ...@@ -42,12 +42,6 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
InstallConfigFrame( pos ); InstallConfigFrame( pos );
break; break;
case ID_OPTIONS_SETUP:
DisplayOptionFrame( this, pos );
// Redraw, because grid settings may have changed.
DrawPanel->Refresh( TRUE );
break;
case ID_CONFIG_SAVE: case ID_CONFIG_SAVE:
SaveProjectFile( this ); SaveProjectFile( this );
break; break;
...@@ -107,6 +101,54 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event ) ...@@ -107,6 +101,54 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
} }
void WinEDA_SchematicFrame::OnSetOptions( wxCommandEvent& event )
{
wxArrayString units;
GridArray& grid_list = GetBaseScreen()->m_GridList;
DIALOG_EESCHEMA_OPTIONS dlg( this );
wxLogDebug( _( "Current grid array index %d." ),
grid_list.Index( GetBaseScreen()->GetGrid() ) );
units.Add( GetUnitsLabel( INCHES ) );
units.Add( GetUnitsLabel( MILLIMETRE ) );
dlg.SetUnits( units, g_UnitMetric );
dlg.SetGridSizes( grid_list, GetBaseScreen()->GetGridId() );
dlg.SetLineWidth( g_DrawDefaultLineThickness );
dlg.SetTextSize( g_DefaultTextLabelSize );
dlg.SetRepeatHorizontal( g_RepeatStep.x );
dlg.SetRepeatVertical( g_RepeatStep.y );
dlg.SetRepeatLabel( g_RepeatDeltaLabel );
dlg.SetShowGrid( m_Draw_Grid );
dlg.SetShowHiddenPins( m_ShowAllPins );
dlg.SetEnableAutoPan( DrawPanel->m_AutoPAN_Enable );
dlg.SetEnableAnyBusOrientation( g_HVLines );
dlg.SetShowPageLimits( g_ShowPageLimits );
dlg.Layout();
dlg.Fit();
dlg.SetMinSize( dlg.GetSize() );
if( dlg.ShowModal() == wxID_CANCEL )
return;
g_UnitMetric = dlg.GetUnitsSelection();
GetBaseScreen()->SetGrid(
grid_list[ (size_t) dlg.GetGridSelection() ].m_Size );
g_DrawDefaultLineThickness = dlg.GetLineWidth();
g_DefaultTextLabelSize = dlg.GetTextSize();
g_RepeatStep.x = dlg.GetRepeatHorizontal();
g_RepeatStep.y = dlg.GetRepeatVertical();
g_RepeatDeltaLabel = dlg.GetRepeatLabel();
m_Draw_Grid = dlg.GetShowGrid();
m_ShowAllPins = dlg.GetShowHiddenPins();
DrawPanel->m_AutoPAN_Enable = dlg.GetEnableAutoPan();
g_HVLines = dlg.GetEnableAnyBusOrientation();
g_ShowPageLimits = dlg.GetShowPageLimits();
DrawPanel->Refresh( true );
}
/* /*
* Read the hotkey files config for eeschema and libedit * Read the hotkey files config for eeschema and libedit
*/ */
...@@ -116,7 +158,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose ) ...@@ -116,7 +158,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice ); g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME; FullFileName += HOTKEY_FILENAME;
FullFileName += wxT("."); FullFileName += wxT( "." );
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT; FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
frame->ReadHotkeyConfigFile( FullFileName, frame->ReadHotkeyConfigFile( FullFileName,
s_Eeschema_Hokeys_Descr, s_Eeschema_Hokeys_Descr,
...@@ -288,7 +330,6 @@ void WinEDA_SchematicFrame::SaveProjectFile( wxWindow* displayframe ) ...@@ -288,7 +330,6 @@ void WinEDA_SchematicFrame::SaveProjectFile( wxWindow* displayframe )
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
/* ecriture de la configuration */
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
GetProjectFileParameters() ); GetProjectFileParameters() );
} }
...@@ -415,7 +456,8 @@ void WinEDA_SchematicFrame::LoadSettings() ...@@ -415,7 +456,8 @@ void WinEDA_SchematicFrame::LoadSettings()
wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() ); wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry, (long) 6 ); g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry,
(long) 6 );
cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false ); cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false );
cfg->Read( HorzVertLinesOnlyEntry, &g_HVLines, true ); cfg->Read( HorzVertLinesOnlyEntry, &g_HVLines, true );
} }
......
...@@ -501,6 +501,8 @@ lost!\n\nClear the current component from the screen?" ) ) ) ...@@ -501,6 +501,8 @@ lost!\n\nClear the current component from the screen?" ) ) )
m_drawItem = NULL; m_drawItem = NULL;
DIALOG_LIB_NEW_COMPONENT dlg( this ); DIALOG_LIB_NEW_COMPONENT dlg( this );
dlg.SetMinSize( dlg.GetSize() );
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
......
...@@ -71,6 +71,16 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event ) ...@@ -71,6 +71,16 @@ void WinEDA_LibeditFrame::OnEditPin( wxCommandEvent& event )
dlg.SetAddToAllBodyStyles( pin->m_Convert == 0 ); dlg.SetAddToAllBodyStyles( pin->m_Convert == 0 );
dlg.SetVisible( pin->IsVisible() ); dlg.SetVisible( pin->IsVisible() );
/* This ugly hack fixes a bug in wxWidgets 2.8.7 and likely earlier
* versions for the flex grid sizer in wxGTK that prevents the last
* column from being sized correctly. It doesn't cause any problems
* on win32 so it doesn't need to wrapped in ugly #ifdef __WXGTK__
* #endif.
*/
dlg.Layout();
dlg.Fit();
dlg.SetMinSize( dlg.GetSize() );
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
{ {
if( pin->IsNew() ) if( pin->IsNew() )
......
...@@ -66,7 +66,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame ) ...@@ -66,7 +66,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
ID_CONFIG_AND_PREFERENCES_END, ID_CONFIG_AND_PREFERENCES_END,
WinEDA_SchematicFrame::Process_Config ) WinEDA_SchematicFrame::Process_Config )
EVT_TOOL( ID_COLORS_SETUP, WinEDA_SchematicFrame::Process_Config ) EVT_TOOL( ID_COLORS_SETUP, WinEDA_SchematicFrame::Process_Config )
EVT_TOOL( ID_OPTIONS_SETUP, WinEDA_SchematicFrame::Process_Config ) EVT_TOOL( ID_OPTIONS_SETUP, WinEDA_SchematicFrame::OnSetOptions )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
WinEDA_DrawFrame::SetLanguage ) WinEDA_DrawFrame::SetLanguage )
......
...@@ -265,6 +265,7 @@ private: ...@@ -265,6 +265,7 @@ private:
void OnOpenCvpcb( wxCommandEvent& event ); void OnOpenCvpcb( wxCommandEvent& event );
void OnOpenLibraryViewer( wxCommandEvent& event ); void OnOpenLibraryViewer( wxCommandEvent& event );
void OnOpenLibraryEditor( wxCommandEvent& event ); void OnOpenLibraryEditor( wxCommandEvent& event );
void OnSetOptions( wxCommandEvent& event );
/* User interface update event handlers. */ /* User interface update event handlers. */
void OnUpdateBlockSelected( wxUpdateUIEvent& event ); void OnUpdateBlockSelected( wxUpdateUIEvent& event );
......
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