Browse Source

Cleanup.

pull/15/head
Jeff Young 6 years ago
parent
commit
b3e30e50c8
  1. 58
      eeschema/eeschema_config.cpp
  2. 3
      eeschema/sch_edit_frame.cpp
  3. 2
      eeschema/sch_edit_frame.h
  4. 4
      include/id.h

58
eeschema/eeschema_config.cpp

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2018 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2014-2019 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -21,26 +21,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file eeschema_config.cpp
*/
#include <fctsys.h>
#include <pgm_base.h>
#include <kiface_i.h>
#include <sch_draw_panel.h>
#include <confirm.h>
#include <gestfich.h>
#include <sch_edit_frame.h>
#include <sch_sheet.h>
#include <invoke_sch_dialog.h>
#include <lib_edit_frame.h>
#include <eeschema_config.h>
#include <ws_draw_item.h>
#include <ws_data_model.h>
#include <class_library.h>
#include <symbol_lib_table.h>
#include <dialog_erc.h>
#include <wildcards_and_files_ext.h>
#include <widgets/paged_dialog.h>
#include <dialogs/panel_eeschema_template_fieldnames.h>
@ -120,59 +112,13 @@ COLOR4D GetItemSelectedColor()
}
// Color to draw items flagged invisible, in libedit (they are invisible
// in Eeschema
// Color to draw items flagged invisible, in libedit (they are invisible in Eeschema)
COLOR4D GetInvisibleItemColor()
{
return COLOR4D( DARKGRAY );
}
void SCH_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{
int id = event.GetId();
wxFileName fn;
switch( id )
{
// JEY TODO: are these still active?
case ID_CONFIG_SAVE:
SaveProjectSettings( true );
break;
case ID_CONFIG_READ:
{
fn = g_RootSheet->GetScreen()->GetFileName();
fn.SetExt( ProjectFileExtension );
wxFileDialog dlg( this, _( "Load Project File" ), fn.GetPath(), fn.GetFullName(),
ProjectFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
if( dlg.ShowModal() == wxID_CANCEL )
break;
wxString chosen = dlg.GetPath();
if( chosen == Prj().GetProjectFullName() )
LoadProjectFile();
else
{
// Read library list and library path list
Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH,
GetProjectFileParameters() );
// Read schematic editor setup
Prj().ConfigLoad( Kiface().KifaceSearch(), GROUP_SCH_EDIT,
GetProjectFileParameters() );
}
}
break;
default:
DisplayError( this, wxT( "SCH_EDIT_FRAME::Process_Config error" ) );
}
}
void SCH_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
PANEL_HOTKEYS_EDITOR* aHotkeysPanel )
{

3
eeschema/sch_edit_frame.cpp

@ -224,9 +224,6 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, SCH_EDIT_FRAME::DrawCurrentSheetToClipboard )
EVT_MENU( wxID_EXIT, SCH_EDIT_FRAME::OnExit )
EVT_MENU( ID_CONFIG_SAVE, SCH_EDIT_FRAME::Process_Config )
EVT_MENU( ID_CONFIG_READ, SCH_EDIT_FRAME::Process_Config )
EVT_TOOL( ID_RESCUE_CACHED, SCH_EDIT_FRAME::OnRescueProject )
EVT_MENU( ID_REMAP_SYMBOLS, SCH_EDIT_FRAME::OnRemapSymbols )

2
eeschema/sch_edit_frame.h

@ -229,8 +229,6 @@ public:
const wxString& GetPlotDirectoryName() const { return m_plotDirectoryName; }
void SetPlotDirectoryName( const wxString& aDirName ) { m_plotDirectoryName = aDirName; }
void Process_Config( wxCommandEvent& event );
/**
* Return the project file parameter list for Eeschema.
*

4
include/id.h

@ -83,10 +83,6 @@ enum main_id
ID_SAVE_BOARD_AS,
ID_AUTO_SAVE_TIMER,
ID_CONFIG_REQ,
ID_CONFIG_SAVE,
ID_CONFIG_READ,
// ID for menuitems used in our file history management,
// when we do not use wxFILE_ID (restricted to 9 items)
ID_FILE,

Loading…
Cancel
Save