Commit 56f52955 authored by Dick Hollenbeck's avatar Dick Hollenbeck

more KiBitmap() stuff

parent 3c208f5e
...@@ -137,30 +137,30 @@ void EDA_3D_FRAME::ReCreateMenuBar() ...@@ -137,30 +137,30 @@ void EDA_3D_FRAME::ReCreateMenuBar()
menuBar->Append( referencesMenu, _( "&Preferences" ) ); menuBar->Append( referencesMenu, _( "&Preferences" ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_BGCOLOR_SELECTION, ADD_MENUITEM( referencesMenu, ID_MENU3D_BGCOLOR_SELECTION,
_( "Choose background color" ), palette_xpm ); _( "Choose background color" ), KiBitmap( palette_xpm ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_AXIS_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_AXIS_ONOFF,
_( "3D Axis On/Off" ), axis3d_front_xpm ); _( "3D Axis On/Off" ), KiBitmap( axis3d_front_xpm ) );
if( full_options ) if( full_options )
{ {
ADD_MENUITEM( referencesMenu, ID_MENU3D_MODULE_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_MODULE_ONOFF,
_( "3D Footprints Shapes On/Off" ), shape_3d_xpm ); _( "3D Footprints Shapes On/Off" ), KiBitmap( shape_3d_xpm ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ZONE_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_ZONE_ONOFF,
_( "Zone Filling On/Off" ), add_zone_xpm ); _( "Zone Filling On/Off" ), KiBitmap( add_zone_xpm ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_COMMENTS_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_COMMENTS_ONOFF,
_( "Comments Layer On/Off" ), edit_sheet_xpm ); _( "Comments Layer On/Off" ), KiBitmap( edit_sheet_xpm ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_DRAWINGS_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_DRAWINGS_ONOFF,
_( "Drawings Layer On/Off" ), add_polygon_xpm ); _( "Drawings Layer On/Off" ), KiBitmap( add_polygon_xpm ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO1_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO1_ONOFF,
_( "Eco1 Layer On/Off" ), tools_xpm ); _( "Eco1 Layer On/Off" ), KiBitmap( tools_xpm ) );
ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO2_ONOFF, ADD_MENUITEM( referencesMenu, ID_MENU3D_ECO2_ONOFF,
_( "Eco2 Layer On/Off" ), tools_xpm ); _( "Eco2 Layer On/Off" ), KiBitmap( tools_xpm ) );
} }
SetMenuBar( menuBar ); SetMenuBar( menuBar );
......
...@@ -54,7 +54,8 @@ static const unsigned char png[] = {" ...@@ -54,7 +54,8 @@ static const unsigned char png[] = {"
set( output_end "}; set( output_end "};
BITMAP_DEF ${png_name} = { png, sizeof(png) }; // make as array so its name is a pointer.
BITMAP_OPAQUE ${png_name}[1] = { png, sizeof(png) };
//EOF //EOF
" ) " )
......
...@@ -367,7 +367,7 @@ void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu ) ...@@ -367,7 +367,7 @@ void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
ADD_MENUITEM_WITH_HELP( aMenu, ID_HELP_COPY_VERSION_STRING, ADD_MENUITEM_WITH_HELP( aMenu, ID_HELP_COPY_VERSION_STRING,
_( "Copy &Version Information" ), _( "Copy &Version Information" ),
_( "Copy the version string to clipboard to send with bug reports" ), _( "Copy the version string to clipboard to send with bug reports" ),
copy_button_xpm ); KiBitmap( copy_button_xpm ) );
} }
......
...@@ -308,12 +308,14 @@ wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* parent, const w ...@@ -308,12 +308,14 @@ wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* parent, const w
wxStaticBitmap* dialog_about::CreateStaticBitmap(wxScrolledWindow* parent, wxBitmap* icon) wxStaticBitmap* dialog_about::CreateStaticBitmap(wxScrolledWindow* parent, wxBitmap* icon)
{ {
wxStaticBitmap* bitmap = new wxStaticBitmap( parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); wxStaticBitmap* bitmap = new wxStaticBitmap( parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
if ( icon )
if( icon )
{ {
bitmap->SetBitmap( *icon ); bitmap->SetBitmap( *icon );
} }
else { else
bitmap->SetBitmap( right_xpm ); {
bitmap->SetBitmap( KiBitmap( right_xpm ) );
} }
return bitmap; return bitmap;
} }
......
...@@ -62,19 +62,19 @@ static wxString languageCfgKey( wxT( "LanguageID" ) ); ...@@ -62,19 +62,19 @@ static wxString languageCfgKey( wxT( "LanguageID" ) );
*/ */
struct LANGUAGE_DESCR struct LANGUAGE_DESCR
{ {
/* wxWidgets locale identifier (See wxWidgets doc) */ /// wxWidgets locale identifier (See wxWidgets doc)
int m_WX_Lang_Identifier; int m_WX_Lang_Identifier;
/* KiCad identifier used in menu selection (See id.h) */ /// KiCad identifier used in menu selection (See id.h)
int m_KI_Lang_Identifier; int m_KI_Lang_Identifier;
/* The menu language icons */ /// The menu language icons
const wxBitmap m_Lang_Icon; BITMAP_DEF m_Lang_Icon;
/* Labels used in menus */ /// Labels used in menus
const wxChar* m_Lang_Label; const wxChar* m_Lang_Label;
/* Set to true if the m_Lang_Label must not be translated */ /// Set to true if the m_Lang_Label must not be translated
bool m_DoNotTranslate; bool m_DoNotTranslate;
}; };
...@@ -91,7 +91,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -91,7 +91,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_DEFAULT, wxLANGUAGE_DEFAULT,
ID_LANGUAGE_DEFAULT, ID_LANGUAGE_DEFAULT,
KiBitmap( lang_def_xpm ), lang_def_xpm,
_( "Default" ) _( "Default" )
}, },
...@@ -99,7 +99,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -99,7 +99,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_ENGLISH, wxLANGUAGE_ENGLISH,
ID_LANGUAGE_ENGLISH, ID_LANGUAGE_ENGLISH,
KiBitmap( lang_en_xpm ), lang_en_xpm,
wxT( "English" ), wxT( "English" ),
true true
}, },
...@@ -108,7 +108,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -108,7 +108,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_FRENCH, wxLANGUAGE_FRENCH,
ID_LANGUAGE_FRENCH, ID_LANGUAGE_FRENCH,
KiBitmap( lang_fr_xpm ), lang_fr_xpm,
_( "French" ) _( "French" )
}, },
...@@ -116,7 +116,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -116,7 +116,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_FINNISH, wxLANGUAGE_FINNISH,
ID_LANGUAGE_FINNISH, ID_LANGUAGE_FINNISH,
KiBitmap( lang_fi_xpm ), lang_fi_xpm,
_( "Finnish" ) _( "Finnish" )
}, },
...@@ -124,7 +124,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -124,7 +124,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_SPANISH, wxLANGUAGE_SPANISH,
ID_LANGUAGE_SPANISH, ID_LANGUAGE_SPANISH,
KiBitmap( lang_es_xpm ), lang_es_xpm,
_( "Spanish" ) _( "Spanish" )
}, },
...@@ -132,7 +132,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -132,7 +132,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_PORTUGUESE, wxLANGUAGE_PORTUGUESE,
ID_LANGUAGE_PORTUGUESE, ID_LANGUAGE_PORTUGUESE,
KiBitmap( lang_pt_xpm ), lang_pt_xpm,
_( "Portuguese" ) _( "Portuguese" )
}, },
...@@ -140,7 +140,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -140,7 +140,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_ITALIAN, wxLANGUAGE_ITALIAN,
ID_LANGUAGE_ITALIAN, ID_LANGUAGE_ITALIAN,
KiBitmap( lang_it_xpm ), lang_it_xpm,
_( "Italian" ) _( "Italian" )
}, },
...@@ -148,7 +148,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -148,7 +148,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_GERMAN, wxLANGUAGE_GERMAN,
ID_LANGUAGE_GERMAN, ID_LANGUAGE_GERMAN,
KiBitmap( lang_de_xpm ), lang_de_xpm,
_( "German" ) _( "German" )
}, },
...@@ -156,7 +156,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -156,7 +156,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_GREEK, wxLANGUAGE_GREEK,
ID_LANGUAGE_GREEK, ID_LANGUAGE_GREEK,
KiBitmap( lang_gr_xpm ), lang_gr_xpm,
_( "Greek" ) _( "Greek" )
}, },
...@@ -164,7 +164,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -164,7 +164,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_SLOVENIAN, wxLANGUAGE_SLOVENIAN,
ID_LANGUAGE_SLOVENIAN, ID_LANGUAGE_SLOVENIAN,
KiBitmap( lang_sl_xpm ), lang_sl_xpm,
_( "Slovenian" ) _( "Slovenian" )
}, },
...@@ -172,7 +172,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -172,7 +172,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_HUNGARIAN, wxLANGUAGE_HUNGARIAN,
ID_LANGUAGE_HUNGARIAN, ID_LANGUAGE_HUNGARIAN,
KiBitmap( lang_hu_xpm ), lang_hu_xpm,
_( "Hungarian" ) _( "Hungarian" )
}, },
...@@ -180,7 +180,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -180,7 +180,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_POLISH, wxLANGUAGE_POLISH,
ID_LANGUAGE_POLISH, ID_LANGUAGE_POLISH,
KiBitmap( lang_pl_xpm ), lang_pl_xpm,
_( "Polish" ) _( "Polish" )
}, },
...@@ -188,7 +188,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -188,7 +188,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_CZECH, wxLANGUAGE_CZECH,
ID_LANGUAGE_CZECH, ID_LANGUAGE_CZECH,
KiBitmap( lang_cs_xpm ), lang_cs_xpm,
_( "Czech" ) _( "Czech" )
}, },
...@@ -196,7 +196,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -196,7 +196,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_RUSSIAN, wxLANGUAGE_RUSSIAN,
ID_LANGUAGE_RUSSIAN, ID_LANGUAGE_RUSSIAN,
KiBitmap( lang_ru_xpm ), lang_ru_xpm,
_( "Russian" ) _( "Russian" )
}, },
...@@ -204,7 +204,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -204,7 +204,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_KOREAN, wxLANGUAGE_KOREAN,
ID_LANGUAGE_KOREAN, ID_LANGUAGE_KOREAN,
KiBitmap( lang_ko_xpm ), lang_ko_xpm,
_( "Korean" ) _( "Korean" )
}, },
...@@ -212,7 +212,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -212,7 +212,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_CHINESE_SIMPLIFIED, wxLANGUAGE_CHINESE_SIMPLIFIED,
ID_LANGUAGE_CHINESE_SIMPLIFIED, ID_LANGUAGE_CHINESE_SIMPLIFIED,
KiBitmap( lang_chinese_xpm ), lang_chinese_xpm,
_( "Chinese simplified" ) _( "Chinese simplified" )
}, },
...@@ -220,7 +220,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -220,7 +220,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_CATALAN, wxLANGUAGE_CATALAN,
ID_LANGUAGE_CATALAN, ID_LANGUAGE_CATALAN,
KiBitmap( lang_catalan_xpm ), lang_catalan_xpm,
_( "Catalan" ) _( "Catalan" )
}, },
...@@ -228,7 +228,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -228,7 +228,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_DUTCH, wxLANGUAGE_DUTCH,
ID_LANGUAGE_DUTCH, ID_LANGUAGE_DUTCH,
KiBitmap( lang_nl_xpm ), lang_nl_xpm,
_( "Dutch" ) _( "Dutch" )
}, },
...@@ -236,7 +236,7 @@ static struct LANGUAGE_DESCR s_Language_List[] = ...@@ -236,7 +236,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
{ {
wxLANGUAGE_JAPANESE, wxLANGUAGE_JAPANESE,
ID_LANGUAGE_JAPANESE, ID_LANGUAGE_JAPANESE,
KiBitmap( lang_jp_xpm ), lang_jp_xpm,
_( "Japanese" ) _( "Japanese" )
} }
}; };
...@@ -430,11 +430,14 @@ bool WinEDA_App::SetBinDir() ...@@ -430,11 +430,14 @@ bool WinEDA_App::SetBinDir()
if( strchr( (const char*) argv[0], '/' ) == NULL ) // no path if( strchr( (const char*) argv[0], '/' ) == NULL ) // no path
{ {
sprintf( FileName, "which %s > %s", TO_UTF8( str_arg0 ), TMP_FILE ); sprintf( FileName, "which %s > %s", TO_UTF8( str_arg0 ), TMP_FILE );
system( FileName );
int ret = system( FileName );
(void) ret;
if( ( ftmp = fopen( TMP_FILE, "rt" ) ) != NULL ) if( ( ftmp = fopen( TMP_FILE, "rt" ) ) != NULL )
{ {
fgets( Line, 1000, ftmp ); const char* line = fgets( Line, 1000, ftmp );
(void) line;
fclose( ftmp ); fclose( ftmp );
remove( TMP_FILE ); remove( TMP_FILE );
} }
...@@ -849,7 +852,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu ) ...@@ -849,7 +852,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu )
ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE,
_( "Language" ), _( "Language" ),
_( "Select application language (only for testing!)" ), _( "Select application language (only for testing!)" ),
language_xpm ); KiBitmap( language_xpm ) );
// Set Check mark on current selected language // Set Check mark on current selected language
for( ii = 0; ii < LANGUAGE_DESCR_COUNT; ii++ ) for( ii = 0; ii < LANGUAGE_DESCR_COUNT; ii++ )
......
...@@ -639,13 +639,13 @@ void AddHotkeyConfigMenu( wxMenu* aMenu ) ...@@ -639,13 +639,13 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
_( "List Current Keys" ), _( "List Current Keys" ),
_( "Displays the current hotkeys list and corresponding commands" ), _( "Displays the current hotkeys list and corresponding commands" ),
info_xpm ); KiBitmap( info_xpm ) );
/* Call hotkeys editor*/ /* Call hotkeys editor*/
ADD_MENUITEM_WITH_HELP( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_EDITOR, ADD_MENUITEM_WITH_HELP( HotkeySubmenu, ID_PREFERENCES_HOTKEY_SHOW_EDITOR,
_( "Edit Hotkeys" ), _( "Edit Hotkeys" ),
_( "Call the hotkeys editor" ), _( "Call the hotkeys editor" ),
editor_xpm ); KiBitmap( editor_xpm ) );
HotkeySubmenu->AppendSeparator(); HotkeySubmenu->AppendSeparator();
...@@ -653,17 +653,18 @@ void AddHotkeyConfigMenu( wxMenu* aMenu ) ...@@ -653,17 +653,18 @@ void AddHotkeyConfigMenu( wxMenu* aMenu )
ADD_MENUITEM_WITH_HELP( HotkeySubmenu, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG, ADD_MENUITEM_WITH_HELP( HotkeySubmenu, ID_PREFERENCES_HOTKEY_EXPORT_CONFIG,
_( "Export Hotkeys Config" ), _( "Export Hotkeys Config" ),
_( "Create a hotkey configuration file to export the current hotkey config" ), _( "Create a hotkey configuration file to export the current hotkey config" ),
save_setup_xpm ); KiBitmap( save_setup_xpm ) );
/* Reload hotkey file */ /* Reload hotkey file */
ADD_MENUITEM_WITH_HELP( HotkeySubmenu, ID_PREFERENCES_HOTKEY_IMPORT_CONFIG, ADD_MENUITEM_WITH_HELP( HotkeySubmenu, ID_PREFERENCES_HOTKEY_IMPORT_CONFIG,
_( "Import Hotkeys Config" ), _( "Import Hotkeys Config" ),
_( "Load an existing hotkey configuration file" ), _( "Load an existing hotkey configuration file" ),
reload_xpm ); KiBitmap( reload_xpm ) );
/* Append HotkeySubmenu to menu */ /* Append HotkeySubmenu to menu */
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( aMenu, HotkeySubmenu, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( aMenu, HotkeySubmenu,
ID_PREFERENCES_HOTKEY_SUBMENU, _( "Hotkeys" ), ID_PREFERENCES_HOTKEY_SUBMENU, _( "Hotkeys" ),
_( "Hotkeys configuration and preferences" ), hotkeys_xpm ); _( "Hotkeys configuration and preferences" ),
KiBitmap( hotkeys_xpm ) );
} }
...@@ -154,21 +154,21 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu ) ...@@ -154,21 +154,21 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
BASE_SCREEN * screen = DrawPanel->GetScreen(); BASE_SCREEN * screen = DrawPanel->GetScreen();
msg = AddHotkeyName( _( "Center" ), m_HotkeysZoomAndGridList, HK_ZOOM_CENTER ); msg = AddHotkeyName( _( "Center" ), m_HotkeysZoomAndGridList, HK_ZOOM_CENTER );
ADD_MENUITEM( MasterMenu, ID_POPUP_ZOOM_CENTER, msg, zoom_center_on_screen_xpm ); ADD_MENUITEM( MasterMenu, ID_POPUP_ZOOM_CENTER, msg, KiBitmap( zoom_center_on_screen_xpm ) );
msg = AddHotkeyName( _( "Zoom in" ), m_HotkeysZoomAndGridList, HK_ZOOM_IN ); msg = AddHotkeyName( _( "Zoom in" ), m_HotkeysZoomAndGridList, HK_ZOOM_IN );
ADD_MENUITEM( MasterMenu, ID_POPUP_ZOOM_IN, msg, zoom_in_xpm ); ADD_MENUITEM( MasterMenu, ID_POPUP_ZOOM_IN, msg, KiBitmap( zoom_in_xpm ) );
msg = AddHotkeyName( _( "Zoom out" ), m_HotkeysZoomAndGridList, HK_ZOOM_OUT ); msg = AddHotkeyName( _( "Zoom out" ), m_HotkeysZoomAndGridList, HK_ZOOM_OUT );
ADD_MENUITEM( MasterMenu, ID_POPUP_ZOOM_OUT, msg, zoom_out_xpm ); ADD_MENUITEM( MasterMenu, ID_POPUP_ZOOM_OUT, msg, KiBitmap( zoom_out_xpm ) );
msg = AddHotkeyName( _( "Redraw view" ), m_HotkeysZoomAndGridList, HK_ZOOM_REDRAW ); msg = AddHotkeyName( _( "Redraw view" ), m_HotkeysZoomAndGridList, HK_ZOOM_REDRAW );
ADD_MENUITEM( MasterMenu, ID_ZOOM_REDRAW, msg, zoom_redraw_xpm ); ADD_MENUITEM( MasterMenu, ID_ZOOM_REDRAW, msg, KiBitmap( zoom_redraw_xpm ) );
msg = AddHotkeyName( _( "Zoom auto" ), m_HotkeysZoomAndGridList, HK_ZOOM_AUTO ); msg = AddHotkeyName( _( "Zoom auto" ), m_HotkeysZoomAndGridList, HK_ZOOM_AUTO );
ADD_MENUITEM( MasterMenu, ID_ZOOM_PAGE, msg, zoom_fit_in_page_xpm ); ADD_MENUITEM( MasterMenu, ID_ZOOM_PAGE, msg, KiBitmap( zoom_fit_in_page_xpm ) );
wxMenu* zoom_choice = new wxMenu; wxMenu* zoom_choice = new wxMenu;
ADD_MENUITEM_WITH_SUBMENU( MasterMenu, zoom_choice, ADD_MENUITEM_WITH_SUBMENU( MasterMenu, zoom_choice,
ID_POPUP_ZOOM_SELECT, _( "Zoom select" ), ID_POPUP_ZOOM_SELECT, _( "Zoom select" ),
zoom_selection_xpm ); KiBitmap( zoom_selection_xpm ) );
zoom = screen->GetZoom(); zoom = screen->GetZoom();
maxZoomIds = ID_POPUP_ZOOM_LEVEL_END - ID_POPUP_ZOOM_LEVEL_START; maxZoomIds = ID_POPUP_ZOOM_LEVEL_END - ID_POPUP_ZOOM_LEVEL_START;
...@@ -191,7 +191,7 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu ) ...@@ -191,7 +191,7 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
{ {
wxMenu* gridMenu = new wxMenu; wxMenu* gridMenu = new wxMenu;
ADD_MENUITEM_WITH_SUBMENU( MasterMenu, gridMenu, ID_POPUP_GRID_SELECT, ADD_MENUITEM_WITH_SUBMENU( MasterMenu, gridMenu, ID_POPUP_GRID_SELECT,
_( "Grid Select" ), grid_select_xpm ); _( "Grid Select" ), KiBitmap( grid_select_xpm ) );
GRID_TYPE tmp; GRID_TYPE tmp;
wxRealPoint grid = screen->GetGridSize(); wxRealPoint grid = screen->GetGridSize();
...@@ -234,5 +234,5 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu ) ...@@ -234,5 +234,5 @@ void EDA_DRAW_FRAME::AddMenuZoomAndGrid( wxMenu* MasterMenu )
} }
MasterMenu->AppendSeparator(); MasterMenu->AppendSeparator();
ADD_MENUITEM( MasterMenu, ID_POPUP_CANCEL, _( "Close" ), cancel_xpm ); ADD_MENUITEM( MasterMenu, ID_POPUP_CANCEL, _( "Close" ), KiBitmap( cancel_xpm ) );
} }
...@@ -17,8 +17,8 @@ struct BITMAP_OPAQUE ...@@ -17,8 +17,8 @@ struct BITMAP_OPAQUE
int byteCount; int byteCount;
}; };
#define EXTERN_BITMAP(x) extern const BITMAP_DEF x; // declared as single unit array, so its name is a pointer.
#define EXTERN_BITMAP(x) extern const BITMAP_OPAQUE x[1];
#else #else
...@@ -29,8 +29,8 @@ typedef const char* BITMAP_OPAQUE; ...@@ -29,8 +29,8 @@ typedef const char* BITMAP_OPAQUE;
#endif #endif
/// a BITMAP_DEF is really a const pointer to an opaque structure. So you /// a BITMAP_DEF is really a const pointer to an opaque
/// should never need to use 'const' with it. /// structure. So you should never need to use 'const' with it.
typedef const BITMAP_OPAQUE *BITMAP_DEF; typedef const BITMAP_OPAQUE *BITMAP_DEF;
......
...@@ -216,7 +216,7 @@ static inline void ADD_MENUITEM_WITH_HELP_AND_SUBMENU( wxMenu* menu, ...@@ -216,7 +216,7 @@ static inline void ADD_MENUITEM_WITH_HELP_AND_SUBMENU( wxMenu* menu,
// macro to add a bitmap list to check menus (do not use with normal menus) // macro to add a bitmap list to check menus (do not use with normal menus)
#if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ ) #if defined( USE_IMAGES_IN_MENUS ) && defined( __WINDOWS__ )
# define SETBITMAPS( icon ) item->SetBitmaps( KiBitmap( apply_xpm ), (icon) ) # define SETBITMAPS( icon ) item->SetBitmaps( KiBitmap( apply_xpm ), KiBitmap( icon ) )
#else #else
# define SETBITMAPS( icon ) # define SETBITMAPS( icon )
#endif #endif
......
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