Menu consistence (add Config Paths to LibEdit).
This commit is contained in:
parent
8411ef04d0
commit
d0d9bb25c0
|
@ -323,6 +323,9 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
Raise();
|
Raise();
|
||||||
Show( true );
|
Show( true );
|
||||||
|
|
||||||
|
Bind( wxEVT_COMMAND_MENU_SELECTED, &LIB_EDIT_FRAME::OnConfigurePaths, this,
|
||||||
|
ID_PREFERENCES_CONFIGURE_PATHS );
|
||||||
|
|
||||||
Bind( wxEVT_COMMAND_MENU_SELECTED, &LIB_EDIT_FRAME::OnEditSymbolLibTable, this,
|
Bind( wxEVT_COMMAND_MENU_SELECTED, &LIB_EDIT_FRAME::OnEditSymbolLibTable, this,
|
||||||
ID_EDIT_SYM_LIB_TABLE );
|
ID_EDIT_SYM_LIB_TABLE );
|
||||||
|
|
||||||
|
|
|
@ -670,7 +670,7 @@ static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu
|
||||||
// Path configuration edit dialog.
|
// Path configuration edit dialog.
|
||||||
AddMenuItem( aParentMenu,
|
AddMenuItem( aParentMenu,
|
||||||
ID_PREFERENCES_CONFIGURE_PATHS,
|
ID_PREFERENCES_CONFIGURE_PATHS,
|
||||||
_( "Configure &Paths..." ),
|
_( "Configure Pa&ths..." ),
|
||||||
_( "Edit path configuration environment variables" ),
|
_( "Edit path configuration environment variables" ),
|
||||||
KiBitmap( path_xpm ) );
|
KiBitmap( path_xpm ) );
|
||||||
|
|
||||||
|
|
|
@ -285,6 +285,13 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
// Menu Preferences:
|
// Menu Preferences:
|
||||||
wxMenu* preferencesMenu = new wxMenu;
|
wxMenu* preferencesMenu = new wxMenu;
|
||||||
|
|
||||||
|
// Environment varialbes
|
||||||
|
AddMenuItem( preferencesMenu,
|
||||||
|
ID_PREFERENCES_CONFIGURE_PATHS,
|
||||||
|
_( "Configure Pa&ths..." ),
|
||||||
|
_( "Edit path configuration environment variables" ),
|
||||||
|
KiBitmap( path_xpm ) );
|
||||||
|
|
||||||
// Library list
|
// Library list
|
||||||
AddMenuItem( preferencesMenu,
|
AddMenuItem( preferencesMenu,
|
||||||
ID_EDIT_SYM_LIB_TABLE,
|
ID_EDIT_SYM_LIB_TABLE,
|
||||||
|
@ -292,6 +299,8 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
_( "Edit the global and project symbol library tables." ),
|
_( "Edit the global and project symbol library tables." ),
|
||||||
KiBitmap( library_table_xpm ) );
|
KiBitmap( library_table_xpm ) );
|
||||||
|
|
||||||
|
preferencesMenu->AppendSeparator();
|
||||||
|
|
||||||
// Default values and options
|
// Default values and options
|
||||||
AddMenuItem( preferencesMenu,
|
AddMenuItem( preferencesMenu,
|
||||||
wxID_PREFERENCES,
|
wxID_PREFERENCES,
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include <viewlib_frame.h>
|
#include <viewlib_frame.h>
|
||||||
#include <sch_base_frame.h>
|
#include <sch_base_frame.h>
|
||||||
#include <symbol_lib_table.h>
|
#include <symbol_lib_table.h>
|
||||||
|
#include <pgm_base.h>
|
||||||
#include "dialogs/dialog_sym_lib_table.h"
|
#include "dialogs/dialog_sym_lib_table.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -260,6 +261,12 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SCH_BASE_FRAME::OnConfigurePaths( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
Pgm().ConfigurePaths( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_BASE_FRAME::OnEditSymbolLibTable( wxCommandEvent& aEvent )
|
void SCH_BASE_FRAME::OnEditSymbolLibTable( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
DIALOG_SYMBOL_LIB_TABLE dlg( this, &SYMBOL_LIB_TABLE::GetGlobalLibTable(),
|
DIALOG_SYMBOL_LIB_TABLE dlg( this, &SYMBOL_LIB_TABLE::GetGlobalLibTable(),
|
||||||
|
|
|
@ -204,6 +204,8 @@ public:
|
||||||
const LIB_ID* aHighlight = nullptr,
|
const LIB_ID* aHighlight = nullptr,
|
||||||
bool aAllowFields = true );
|
bool aAllowFields = true );
|
||||||
|
|
||||||
|
void OnConfigurePaths( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
virtual void OnEditSymbolLibTable( wxCommandEvent& aEvent );
|
virtual void OnEditSymbolLibTable( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1502,12 +1502,6 @@ void SCH_EDIT_FRAME::UpdateTitle()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDIT_FRAME::OnConfigurePaths( wxCommandEvent& aEvent )
|
|
||||||
{
|
|
||||||
Pgm().ConfigurePaths( this );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int SCH_EDIT_FRAME::GetIconScale()
|
int SCH_EDIT_FRAME::GetIconScale()
|
||||||
{
|
{
|
||||||
int scale = 0;
|
int scale = 0;
|
||||||
|
|
|
@ -905,7 +905,6 @@ private:
|
||||||
// another library
|
// another library
|
||||||
void OnEditComponentSymbolsId( wxCommandEvent& aEvent );
|
void OnEditComponentSymbolsId( wxCommandEvent& aEvent );
|
||||||
void OnPreferencesOptions( wxCommandEvent& event );
|
void OnPreferencesOptions( wxCommandEvent& event );
|
||||||
void OnConfigurePaths( wxCommandEvent& aEvent );
|
|
||||||
void OnCancelCurrentCommand( wxCommandEvent& aEvent );
|
void OnCancelCurrentCommand( wxCommandEvent& aEvent );
|
||||||
|
|
||||||
void OnSelectItem( wxCommandEvent& aEvent );
|
void OnSelectItem( wxCommandEvent& aEvent );
|
||||||
|
|
Loading…
Reference in New Issue