Commit d6f348f4 authored by jean-pierre charras's avatar jean-pierre charras

Remove duplicate icon apply.svg (use ckecked_ok.svg instead which is the same icon).

Add a workaround to fix a new bug in wxWidgets 3.0 ( Windows specific ) which shows icons only with a size = 16x16 in menus which have attribute wxITEM_CHECK
parent c441c287
...@@ -151,7 +151,6 @@ set( BMAPS_MID ...@@ -151,7 +151,6 @@ set( BMAPS_MID
annotate_down_right annotate_down_right
annotate_right_down annotate_right_down
annotate annotate
apply
auto_associe auto_associe
auto_delete_track auto_delete_track
auto_track_width auto_track_width
......
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x04, 0x34, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x96, 0x5b, 0x4c, 0x1c,
0x65, 0x18, 0x86, 0xdf, 0x99, 0xd9, 0x93, 0x7b, 0x5e, 0x18, 0x76, 0x61, 0x61, 0x17, 0x58, 0x76,
0xcb, 0x61, 0x43, 0xc9, 0xd2, 0x0a, 0xb6, 0xa5, 0x07, 0x11, 0x50, 0xd3, 0x2a, 0x49, 0x63, 0x10,
0xab, 0x89, 0x4d, 0x49, 0x6d, 0x34, 0xc6, 0x28, 0x68, 0xbc, 0x28, 0x89, 0x69, 0x8c, 0x51, 0x13,
0x63, 0xe2, 0x8d, 0xa9, 0xc6, 0x4a, 0x4c, 0x31, 0x95, 0xa4, 0x9a, 0xda, 0xb4, 0x52, 0x82, 0x8d,
0x12, 0xf0, 0x50, 0x5b, 0x1a, 0x52, 0x6c, 0x88, 0x4a, 0x09, 0xb4, 0x85, 0x5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 0xaf, 0xf3, 0x5f, 0xf3,
0x07, 0xff, 0x95, 0xe2, 0x09, 0x21, 0xb7, 0x0d, 0x82, 0xd0, 0x99, 0x6b, 0xcd, 0x33, 0x6d, 0x47,
0x36, 0x90, 0xea, 0xe7, 0x7c, 0xc4, 0xd0, 0x60, 0x78, 0x73, 0xb9, 0x9e, 0xc5, 0xb2, 0xa2, 0x7d,
0x44, 0x35, 0x52, 0x96, 0x7c, 0x2d, 0x7b, 0x5c, 0x50, 0x93, 0x3d, 0xd3, 0x5f, 0x71, 0xef, 0xdc,
0xd1, 0x5b, 0xe2, 0xff, 0xe7, 0xd6, 0x9d, 0xd6, 0x5f, 0x63, 0x4d, 0x14, 0x46, 0x86, 0xf4, 0x75,
0x7d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE apply_xpm[1] = {{ png, sizeof( png ), "apply_xpm" }};
//EOF
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2014 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -216,7 +216,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) ...@@ -216,7 +216,7 @@ bool LIB_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
if( item->IsNew() ) if( item->IsNew() )
{ {
AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_END_CREATE_ITEM, _( "Line End" ), AddMenuItem( PopMenu, ID_POPUP_LIBEDIT_END_CREATE_ITEM, _( "Line End" ),
KiBitmap( apply_xpm ) ); KiBitmap( checked_ok_xpm ) );
} }
msg = AddHotkeyName( _( "Edit Line Options" ), s_Libedit_Hokeys_Descr, HK_EDIT ); msg = AddHotkeyName( _( "Edit Line Options" ), s_Libedit_Hokeys_Descr, HK_EDIT );
...@@ -328,7 +328,7 @@ void AddMenusForBlock( wxMenu* PopMenu, LIB_EDIT_FRAME* frame ) ...@@ -328,7 +328,7 @@ void AddMenusForBlock( wxMenu* PopMenu, LIB_EDIT_FRAME* frame )
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( apply_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( checked_ok_xpm ) );
if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE ) if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE )
{ {
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2013 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2014 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2014 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -270,7 +270,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) ...@@ -270,7 +270,7 @@ bool SCH_EDIT_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
default: default:
if( is_new ) if( is_new )
AddMenuItem( PopMenu, ID_POPUP_END_LINE, _( "End Drawing" ), AddMenuItem( PopMenu, ID_POPUP_END_LINE, _( "End Drawing" ),
KiBitmap( apply_xpm ) ); KiBitmap( checked_ok_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Drawing" ), AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Drawing" ),
KiBitmap( delete_xpm ) ); KiBitmap( delete_xpm ) );
...@@ -677,7 +677,7 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame ) ...@@ -677,7 +677,7 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame )
if( is_new ) if( is_new )
{ {
msg = AddHotkeyName( _( "Wire End" ), s_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS ); msg = AddHotkeyName( _( "Wire End" ), s_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS );
AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( apply_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) );
return; return;
} }
...@@ -727,7 +727,7 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame ) ...@@ -727,7 +727,7 @@ void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame )
if( is_new ) if( is_new )
{ {
msg = AddHotkeyName( _( "Bus End" ), s_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS ); msg = AddHotkeyName( _( "Bus End" ), s_Schematic_Hokeys_Descr, HK_END_CURR_LINEWIREBUS );
AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( apply_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_END_LINE, msg, KiBitmap( checked_ok_xpm ) );
return; return;
} }
...@@ -768,7 +768,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet ) ...@@ -768,7 +768,7 @@ void AddMenusForHierchicalSheet( wxMenu* PopMenu, SCH_SHEET* Sheet )
if( Sheet->GetFlags() ) if( Sheet->GetFlags() )
{ {
AddMenuItem( PopMenu, ID_POPUP_SCH_END_SHEET, _( "Place Sheet" ), KiBitmap( apply_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_SCH_END_SHEET, _( "Place Sheet" ), KiBitmap( checked_ok_xpm ) );
} }
else else
{ {
...@@ -823,7 +823,7 @@ void AddMenusForBlock( wxMenu* PopMenu, SCH_EDIT_FRAME* frame ) ...@@ -823,7 +823,7 @@ void AddMenusForBlock( wxMenu* PopMenu, SCH_EDIT_FRAME* frame )
if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE ) if( frame->GetScreen()->m_BlockLocate.GetCommand() == BLOCK_MOVE )
AddMenuItem( PopMenu, ID_POPUP_ZOOM_BLOCK, _( "Window Zoom" ), KiBitmap( zoom_area_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_ZOOM_BLOCK, _( "Window Zoom" ), KiBitmap( zoom_area_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( apply_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( checked_ok_xpm ) );
// After a block move (that is also a block selection) one can reselect // After a block move (that is also a block selection) one can reselect
// a block function. // a block function.
......
...@@ -53,7 +53,7 @@ bool GERBVIEW_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu ) ...@@ -53,7 +53,7 @@ bool GERBVIEW_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* PopMenu )
_( "Cancel Block" ), KiBitmap( cancel_xpm ) ); _( "Cancel Block" ), KiBitmap( cancel_xpm ) );
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK,
_( "Place Block" ), KiBitmap( apply_xpm ) ); _( "Place Block" ), KiBitmap( checked_ok_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK, AddMenuItem( PopMenu, ID_POPUP_DELETE_BLOCK,
_( "Delete Block (ctrl + drag mouse)" ), KiBitmap( delete_xpm ) ); _( "Delete Block (ctrl + drag mouse)" ), KiBitmap( delete_xpm ) );
} }
......
...@@ -78,7 +78,6 @@ EXTERN_BITMAP( anchor_xpm ) ...@@ -78,7 +78,6 @@ EXTERN_BITMAP( anchor_xpm )
EXTERN_BITMAP( annotate_down_right_xpm ) EXTERN_BITMAP( annotate_down_right_xpm )
EXTERN_BITMAP( annotate_right_down_xpm ) EXTERN_BITMAP( annotate_right_down_xpm )
EXTERN_BITMAP( annotate_xpm ) EXTERN_BITMAP( annotate_xpm )
EXTERN_BITMAP( apply_xpm )
EXTERN_BITMAP( auto_associe_xpm ) EXTERN_BITMAP( auto_associe_xpm )
EXTERN_BITMAP( auto_delete_track_xpm ) EXTERN_BITMAP( auto_delete_track_xpm )
EXTERN_BITMAP( auto_track_width_xpm ) EXTERN_BITMAP( auto_track_width_xpm )
......
...@@ -3,6 +3,29 @@ ...@@ -3,6 +3,29 @@
* @brief Usefull macros and inline functions to create menus items * @brief Usefull macros and inline functions to create menus items
* in menubars or popup menus * in menubars or popup menus
*/ */
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-2014 KiCad Developers.
*
* 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 <bitmaps.h> #include <bitmaps.h>
...@@ -13,7 +36,7 @@ ...@@ -13,7 +36,7 @@
* @param aImage is the image to add the menu item. * @param aImage is the image to add the menu item.
*/ */
#if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ ) #if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ )
# define SETBITMAPS( aImage ) item->SetBitmaps( KiBitmap( apply_xpm ), KiBitmap( aImage ) ) # define SETBITMAPS( aImage ) item->SetBitmaps( KiBitmap( checked_ok_xpm ), KiBitmap( aImage ) )
#else #else
# define SETBITMAPS( aImage ) # define SETBITMAPS( aImage )
#endif #endif
...@@ -55,7 +78,11 @@ static inline wxMenuItem* AddMenuItem( wxMenu* aMenu, ...@@ -55,7 +78,11 @@ static inline wxMenuItem* AddMenuItem( wxMenu* aMenu,
if( aType == wxITEM_CHECK ) if( aType == wxITEM_CHECK )
{ {
#if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ ) #if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ )
item->SetBitmaps( KiBitmap( apply_xpm ), aImage ); item->SetBitmaps( KiBitmap( checked_ok_xpm ), aImage );
// A workaround to a strange bug on Windows, wx Widgets 3.0:
// size of bitmaps is not taken in account for wxITEM_CHECK menu
// unless we call SetFont
item->SetFont(*wxNORMAL_FONT);
#endif #endif
} }
else else
...@@ -96,7 +123,11 @@ static inline wxMenuItem* AddMenuItem( wxMenu* aMenu, ...@@ -96,7 +123,11 @@ static inline wxMenuItem* AddMenuItem( wxMenu* aMenu,
if( aType == wxITEM_CHECK ) if( aType == wxITEM_CHECK )
{ {
#if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ ) #if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ )
item->SetBitmaps( KiBitmap( apply_xpm ), aImage ); item->SetBitmaps( KiBitmap( checked_ok_xpm ), aImage );
// A workaround to a strange bug on Windows, wx Widgets 3.0:
// size of bitmaps is not taken in account for wxITEM_CHECK menu
// unless we call SetFont
item->SetFont(*wxNORMAL_FONT);
#endif #endif
} }
else else
......
...@@ -230,7 +230,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() ...@@ -230,7 +230,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
AddMenuItem( SubMenuPdfBrowserChoice, ID_SELECT_PREFERED_PDF_BROWSER, AddMenuItem( SubMenuPdfBrowserChoice, ID_SELECT_PREFERED_PDF_BROWSER,
_( "&Favourite" ), _( "&Favourite" ),
_( "Use your favourite PDF viewer used to browse datasheets" ), _( "Use your favourite PDF viewer used to browse datasheets" ),
KiBitmap( preference_xpm ), KiBitmap( datasheet_xpm ),
wxITEM_CHECK ); wxITEM_CHECK );
SubMenuPdfBrowserChoice->Check( ID_SELECT_PREFERED_PDF_BROWSER, SubMenuPdfBrowserChoice->Check( ID_SELECT_PREFERED_PDF_BROWSER,
!wxGetApp().UseSystemPdfBrowser() ); !wxGetApp().UseSystemPdfBrowser() );
...@@ -239,7 +239,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() ...@@ -239,7 +239,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Append PDF Viewer submenu to preferences // Append PDF Viewer submenu to preferences
AddMenuItem( SubMenuPdfBrowserChoice, AddMenuItem( SubMenuPdfBrowserChoice,
ID_SELECT_PREFERED_PDF_BROWSER_NAME, ID_SELECT_PREFERED_PDF_BROWSER_NAME,
_( "&PDF Viewer" ), _( "Select &PDF Viewer" ),
_( "Select your favourite PDF viewer used to browse datasheets" ), _( "Select your favourite PDF viewer used to browse datasheets" ),
KiBitmap( datasheet_xpm ) ); KiBitmap( datasheet_xpm ) );
......
...@@ -223,7 +223,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen ...@@ -223,7 +223,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
KiBitmap( zoom_area_xpm ) ); KiBitmap( zoom_area_xpm ) );
PopMenu->AppendSeparator(); PopMenu->AppendSeparator();
AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK, AddMenuItem( PopMenu, ID_POPUP_PLACE_BLOCK,
_( "Place Block" ), KiBitmap( apply_xpm ) ); _( "Place Block" ), KiBitmap( checked_ok_xpm ) );
AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK, AddMenuItem( PopMenu, ID_POPUP_COPY_BLOCK,
_( "Copy Block (shift + drag mouse)" ), _( "Copy Block (shift + drag mouse)" ),
KiBitmap( copyblock_xpm ) ); KiBitmap( copyblock_xpm ) );
...@@ -327,7 +327,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen ...@@ -327,7 +327,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
{ {
if( (flags & IS_NEW) ) if( (flags & IS_NEW) )
AddMenuItem( PopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING, _( "End edge" ), AddMenuItem( PopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING, _( "End edge" ),
KiBitmap( apply_xpm ) ); KiBitmap( checked_ok_xpm ) );
if( !flags ) if( !flags )
{ {
...@@ -337,7 +337,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen ...@@ -337,7 +337,7 @@ bool FOOTPRINT_EDIT_FRAME::OnRightClick( const wxPoint& MousePos, wxMenu* PopMen
if( ( flags & (IS_NEW | IS_MOVED) ) == IS_MOVED ) if( ( flags & (IS_NEW | IS_MOVED) ) == IS_MOVED )
AddMenuItem( PopMenu, ID_POPUP_PCB_PLACE_EDGE, _( "Place edge" ), AddMenuItem( PopMenu, ID_POPUP_PCB_PLACE_EDGE, _( "Place edge" ),
KiBitmap( apply_xpm ) ); KiBitmap( checked_ok_xpm ) );
msg = AddHotkeyName( _("Edit" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM ); msg = AddHotkeyName( _("Edit" ), g_Module_Editor_Hokeys_Descr, HK_EDIT_ITEM );
AddMenuItem( PopMenu, ID_POPUP_MODEDIT_EDIT_BODY_ITEM, AddMenuItem( PopMenu, ID_POPUP_MODEDIT_EDIT_BODY_ITEM,
......
...@@ -195,7 +195,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -195,7 +195,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
if( (flags & IS_NEW) ) if( (flags & IS_NEW) )
{ {
AddMenuItem( aPopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING, AddMenuItem( aPopMenu, ID_POPUP_PCB_STOP_CURRENT_DRAWING,
_( "End Drawing" ), KiBitmap( apply_xpm ) ); _( "End Drawing" ), KiBitmap( checked_ok_xpm ) );
} }
if( !flags ) if( !flags )
...@@ -225,7 +225,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -225,7 +225,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
if( flags & IS_NEW ) if( flags & IS_NEW )
{ {
AddMenuItem( aPopMenu, ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE, AddMenuItem( aPopMenu, ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE,
_( "Close Zone Outline" ), KiBitmap( apply_xpm ) ); _( "Close Zone Outline" ), KiBitmap( checked_ok_xpm ) );
AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER, AddMenuItem( aPopMenu, ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER,
_( "Delete Last Corner" ), KiBitmap( delete_xpm ) ); _( "Delete Last Corner" ), KiBitmap( delete_xpm ) );
} }
...@@ -452,7 +452,7 @@ void PCB_EDIT_FRAME::createPopUpBlockMenu( wxMenu* menu ) ...@@ -452,7 +452,7 @@ void PCB_EDIT_FRAME::createPopUpBlockMenu( wxMenu* menu )
KiBitmap( cancel_xpm ) ); KiBitmap( cancel_xpm ) );
AddMenuItem( menu, ID_POPUP_ZOOM_BLOCK, _( "Zoom Block" ), KiBitmap( zoom_area_xpm ) ); AddMenuItem( menu, ID_POPUP_ZOOM_BLOCK, _( "Zoom Block" ), KiBitmap( zoom_area_xpm ) );
menu->AppendSeparator(); menu->AppendSeparator();
AddMenuItem( menu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( apply_xpm ) ); AddMenuItem( menu, ID_POPUP_PLACE_BLOCK, _( "Place Block" ), KiBitmap( checked_ok_xpm ) );
AddMenuItem( menu, ID_POPUP_COPY_BLOCK, _( "Copy Block" ), KiBitmap( copyblock_xpm ) ); AddMenuItem( menu, ID_POPUP_COPY_BLOCK, _( "Copy Block" ), KiBitmap( copyblock_xpm ) );
AddMenuItem( menu, ID_POPUP_FLIP_BLOCK, _( "Flip Block" ), KiBitmap( invert_module_xpm ) ); AddMenuItem( menu, ID_POPUP_FLIP_BLOCK, _( "Flip Block" ), KiBitmap( invert_module_xpm ) );
AddMenuItem( menu, ID_POPUP_ROTATE_BLOCK, _( "Rotate Block" ), KiBitmap( rotate_ccw_xpm ) ); AddMenuItem( menu, ID_POPUP_ROTATE_BLOCK, _( "Rotate Block" ), KiBitmap( rotate_ccw_xpm ) );
...@@ -517,7 +517,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) ...@@ -517,7 +517,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
else if( flags & IS_DRAGGED ) // Drag via or node in progress else if( flags & IS_DRAGGED ) // Drag via or node in progress
{ {
AddMenuItem( PopMenu, ID_POPUP_PCB_PLACE_MOVED_TRACK_NODE, AddMenuItem( PopMenu, ID_POPUP_PCB_PLACE_MOVED_TRACK_NODE,
_( "Place Node" ), KiBitmap( apply_xpm ) ); _( "Place Node" ), KiBitmap( checked_ok_xpm ) );
return; return;
} }
else // Edition in progress else // Edition in progress
...@@ -525,7 +525,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) ...@@ -525,7 +525,7 @@ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
if( flags & IS_NEW ) if( flags & IS_NEW )
{ {
msg = AddHotkeyName( _( "End Track" ), g_Board_Editor_Hokeys_Descr, HK_END_TRACK ); msg = AddHotkeyName( _( "End Track" ), g_Board_Editor_Hokeys_Descr, HK_END_TRACK );
AddMenuItem( PopMenu, ID_POPUP_PCB_END_TRACK, msg, KiBitmap( apply_xpm ) ); AddMenuItem( PopMenu, ID_POPUP_PCB_END_TRACK, msg, KiBitmap( checked_ok_xpm ) );
} }
msg = AddHotkeyName( _( "Place Through Via" ), g_Board_Editor_Hokeys_Descr, HK_ADD_THROUGH_VIA ); msg = AddHotkeyName( _( "Place Through Via" ), g_Board_Editor_Hokeys_Descr, HK_ADD_THROUGH_VIA );
...@@ -646,16 +646,16 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* ...@@ -646,16 +646,16 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu*
if( edge_zone->GetFlags() == IS_DRAGGED ) if( edge_zone->GetFlags() == IS_DRAGGED )
{ {
AddMenuItem( aPopMenu, ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT, AddMenuItem( aPopMenu, ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT,
_( "Place Edge Outline" ), KiBitmap( apply_xpm ) ); _( "Place Edge Outline" ), KiBitmap( checked_ok_xpm ) );
} }
else if( edge_zone->GetFlags() ) else if( edge_zone->GetFlags() )
{ {
if( (edge_zone->GetFlags() & IN_EDIT ) ) if( (edge_zone->GetFlags() & IN_EDIT ) )
AddMenuItem( aPopMenu, ID_POPUP_PCB_PLACE_ZONE_CORNER, AddMenuItem( aPopMenu, ID_POPUP_PCB_PLACE_ZONE_CORNER,
_( "Place Corner" ), KiBitmap( apply_xpm ) ); _( "Place Corner" ), KiBitmap( checked_ok_xpm ) );
else else
AddMenuItem( aPopMenu, ID_POPUP_PCB_PLACE_ZONE_OUTLINES, AddMenuItem( aPopMenu, ID_POPUP_PCB_PLACE_ZONE_OUTLINES,
_( "Place Zone" ), KiBitmap( apply_xpm ) ); _( "Place Zone" ), KiBitmap( checked_ok_xpm ) );
} }
else else
{ {
......
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