Move quit back to wxIDs. wxWidgets like to muck around with the location on OSX.
This commit is contained in:
parent
21c216556b
commit
2502bce987
|
@ -133,13 +133,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
|||
fileMenu->AddMenu( submenuExport, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
fileMenu->AddSeparator();
|
||||
fileMenu->AddItem( ACTIONS::pageSettings, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::pageSettings, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::print, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::plot, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
// Quit
|
||||
fileMenu->AddSeparator();
|
||||
fileMenu->AddItem( ACTIONS::quit, EE_CONDITIONS::ShowAlways );
|
||||
// Don't use ACTIONS::quit; wxWidgets moves this on OSX and expects to find it via wxID_EXIT
|
||||
fileMenu->AddItem( wxID_EXIT, _( "Quit" ), "", exit_xpm, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
//
|
||||
// Menu Edit:
|
||||
|
|
|
@ -222,6 +222,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
|
|||
EVT_MENU( ID_IMPORT_NON_KICAD_SCH, SCH_EDIT_FRAME::OnImportProject )
|
||||
|
||||
EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, EDA_DRAW_FRAME::CopyToClipboard )
|
||||
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 )
|
||||
|
@ -1067,6 +1068,12 @@ void SCH_EDIT_FRAME::OnEditComponentSymbolsId( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnExit( wxCommandEvent& event )
|
||||
{
|
||||
Close( false );
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::Print()
|
||||
{
|
||||
InvokeDialogPrintUsingPrinter( this );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-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
|
||||
|
@ -751,6 +751,7 @@ private:
|
|||
// Sets up the tool framework
|
||||
void setupTools();
|
||||
|
||||
void OnExit( wxCommandEvent& event );
|
||||
void OnAnnotate( wxCommandEvent& event );
|
||||
void OnErc( wxCommandEvent& event );
|
||||
void OnCreateNetlist( wxCommandEvent& event );
|
||||
|
|
|
@ -83,7 +83,8 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
|||
fileMenu->AddItem( ACTIONS::print, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
fileMenu->AddItem( ACTIONS::quit, SELECTION_CONDITIONS::ShowAlways );
|
||||
// Don't use ACTIONS::quit; wxWidgets moves this on OSX and expects to find it via wxID_EXIT
|
||||
fileMenu->AddItem( wxID_EXIT, _( "Quit" ), "", exit_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
//
|
||||
// Edit Menu:
|
||||
|
|
|
@ -236,9 +236,9 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
fileMenu->AddSeparator();
|
||||
fileMenu->AddMenu( submenuArchive, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
// Quit
|
||||
fileMenu->AddSeparator();
|
||||
fileMenu->AddItem( ACTIONS::quit, SELECTION_CONDITIONS::ShowAlways );
|
||||
// Don't use ACTIONS::quit; wxWidgets moves this on OSX and expects to find it via wxID_EXIT
|
||||
fileMenu->AddItem( wxID_EXIT, _( "Quit" ), "", exit_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
//----- Edit menu -----------------------------------------------------------
|
||||
CONDITIONAL_MENU* editMenu = new CONDITIONAL_MENU( false, selTool );
|
||||
|
|
|
@ -152,6 +152,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
|||
EVT_MENU( ID_MENU_ARCHIVE_MODULES_IN_LIBRARY, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||
EVT_MENU( ID_MENU_CREATE_LIBRARY_AND_ARCHIVE_MODULES, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||
|
||||
EVT_MENU( wxID_EXIT, PCB_EDIT_FRAME::OnQuit )
|
||||
|
||||
// menu Config
|
||||
EVT_MENU( ID_PCB_LIB_TABLE_EDIT, PCB_EDIT_FRAME::Process_Config )
|
||||
EVT_MENU( ID_PCB_3DSHAPELIB_WIZARD, PCB_EDIT_FRAME::Process_Config )
|
||||
|
@ -560,6 +562,12 @@ void PCB_EDIT_FRAME::ReFillLayerWidget()
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::OnQuit( wxCommandEvent& event )
|
||||
{
|
||||
Close( false );
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
||||
{
|
||||
m_canvas->SetAbortRequest( true );
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Jean-Pierre Charras, jp.charras@wanadoo.fr
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-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 as published by the
|
||||
|
@ -17,9 +17,6 @@
|
|||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* @file wxPcbStruct.h
|
||||
*/
|
||||
|
||||
#ifndef WXPCB_STRUCT_H_
|
||||
#define WXPCB_STRUCT_H_
|
||||
|
@ -300,6 +297,8 @@ public:
|
|||
*/
|
||||
void LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter );
|
||||
|
||||
void OnQuit( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Reload the Python plugins if they are newer than
|
||||
* the already loaded, and load new plugins if any
|
||||
|
|
Loading…
Reference in New Issue