mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Bitmaps are now identified by an enum class instead of by pointers. Bitmap loading and caching is now handled by a class in common, and we no longer compile most bitmaps into the binary, so there is no longer a bitmaps static library. Instead, bitmaps are archived to a .tar.gz file which is installed in ${KICAD_DATA}/resources/images.tar.gz The source PNGs are checked in to Git as the original CPP files were, so that people can build without the required dependencies to convert SVGs to PNGs. Initial support is also added for dark theme icons, although this is not yet exposed in the GUI. Stubs are present for multi-resolution image resources, but this is not fully-baked yet and could use some refinement.
78 lines
2.2 KiB
C++
78 lines
2.2 KiB
C++
/*
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
*
|
|
* Copyright (C) 2020 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 Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, you may find one here:
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#include <dialogs/dialog_locked_items_query.h>
|
|
#include <bitmaps.h>
|
|
|
|
DIALOG_LOCKED_ITEMS_QUERY::DIALOG_LOCKED_ITEMS_QUERY( wxWindow* aParent, int aLockedItemCount ) :
|
|
DIALOG_LOCKED_ITEMS_QUERY_BASE( aParent )
|
|
{
|
|
m_icon->SetBitmap( KiBitmap( BITMAPS::locked ) );
|
|
|
|
m_messageLine1->SetLabel( wxString::Format( m_messageLine1->GetLabel(), aLockedItemCount ) );
|
|
|
|
m_sdbSizerOK->SetDefault();
|
|
|
|
Layout();
|
|
|
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
|
finishDialogSettings();
|
|
}
|
|
|
|
|
|
void DIALOG_LOCKED_ITEMS_QUERY::onOverrideLocks( wxCommandEvent& event )
|
|
{
|
|
EndModal( wxID_APPLY );
|
|
}
|
|
|
|
|
|
void DIALOG_LOCKED_ITEMS_QUERY::onOkClick( wxCommandEvent& event )
|
|
{
|
|
EndModal( wxID_OK );
|
|
}
|
|
|
|
|
|
void DIALOG_LOCKED_ITEMS_QUERY::onCancelClick( wxCommandEvent& event )
|
|
{
|
|
EndModal( wxID_CANCEL );
|
|
}
|
|
|
|
|
|
int DIALOG_LOCKED_ITEMS_QUERY::ShowModal()
|
|
{
|
|
static int doNotShowValue = wxID_ANY;
|
|
|
|
if( doNotShowValue != wxID_ANY )
|
|
return doNotShowValue;
|
|
|
|
int ret = DIALOG_SHIM::ShowModal();
|
|
|
|
// Has the user asked not to show the dialog again
|
|
if( m_doNotShowBtn->IsChecked() && ret != wxID_CANCEL )
|
|
doNotShowValue = ret;
|
|
|
|
return ret;
|
|
}
|
|
|
|
|