Restore functionality of 'Preferences -> Colors' and 'Preferences -> Options' commands in EEschema
This commit is contained in:
parent
ba04f83247
commit
19330ff0f4
|
@ -580,4 +580,4 @@ void BASE_SCREEN::Show( int nestLevel, std::ostream& os )
|
||||||
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
|
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -32,16 +32,14 @@ wxString FullFileName;
|
||||||
|
|
||||||
pos.y += 5;
|
pos.y += 5;
|
||||||
switch ( id )
|
switch ( id )
|
||||||
{
|
{
|
||||||
case ID_COLORS_SETUP :
|
case ID_COLORS_SETUP :
|
||||||
DisplayColorSetupFrame(this, pos);
|
DisplayColorSetupFrame(this, pos);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CONFIG_REQ : // Creation de la fenetre de configuration
|
case ID_CONFIG_REQ : // Creation de la fenetre de configuration
|
||||||
{
|
|
||||||
InstallConfigFrame(pos);
|
InstallConfigFrame(pos);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case ID_OPTIONS_SETUP:
|
case ID_OPTIONS_SETUP:
|
||||||
DisplayOptionFrame(this, pos);
|
DisplayOptionFrame(this, pos);
|
||||||
|
@ -52,7 +50,7 @@ wxString FullFileName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CONFIG_READ:
|
case ID_CONFIG_READ:
|
||||||
{
|
{
|
||||||
wxString mask( wxT("*") ); mask += g_Prj_Config_Filename_ext;
|
wxString mask( wxT("*") ); mask += g_Prj_Config_Filename_ext;
|
||||||
FullFileName = ScreenSch->m_FileName;
|
FullFileName = ScreenSch->m_FileName;
|
||||||
ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext );
|
ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext );
|
||||||
|
@ -68,12 +66,12 @@ wxString FullFileName;
|
||||||
);
|
);
|
||||||
if ( FullFileName.IsEmpty() ) break;
|
if ( FullFileName.IsEmpty() ) break;
|
||||||
if ( ! wxFileExists(FullFileName) )
|
if ( ! wxFileExists(FullFileName) )
|
||||||
{
|
{
|
||||||
wxString msg = _("File ") + FullFileName +_("not found");;
|
wxString msg = _("File ") + FullFileName +_("not found");;
|
||||||
DisplayError(this, msg); break;
|
DisplayError(this, msg); break;
|
||||||
}
|
|
||||||
Read_Config(FullFileName, TRUE );
|
|
||||||
}
|
}
|
||||||
|
Read_Config(FullFileName, TRUE );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PREFERENCES_CREATE_CONFIG_HOTKEYS:
|
case ID_PREFERENCES_CREATE_CONFIG_HOTKEYS:
|
||||||
|
@ -88,15 +86,15 @@ wxString FullFileName;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_PREFERENCES_EDIT_CONFIG_HOTKEYS:
|
case ID_PREFERENCES_EDIT_CONFIG_HOTKEYS:
|
||||||
{
|
{
|
||||||
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
|
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
|
||||||
FullFileName += HOTKEY_FILENAME;
|
FullFileName += HOTKEY_FILENAME;
|
||||||
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
|
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
|
||||||
wxString editorname = GetEditorName();
|
wxString editorname = GetEditorName();
|
||||||
if ( !editorname.IsEmpty() )
|
if ( !editorname.IsEmpty() )
|
||||||
ExecuteFile(this, editorname, FullFileName);
|
ExecuteFile(this, editorname, FullFileName);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
case ID_PREFERENCES_HOTKEY_PATH_IS_HOME:
|
case ID_PREFERENCES_HOTKEY_PATH_IS_HOME:
|
||||||
case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
|
case ID_PREFERENCES_HOTKEY_PATH_IS_KICAD:
|
||||||
|
@ -105,7 +103,7 @@ wxString FullFileName;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DisplayError(this, wxT("WinEDA_SchematicFrame::Process_Config internal error") );
|
DisplayError(this, wxT("WinEDA_SchematicFrame::Process_Config internal error") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,3 +199,4 @@ wxString mask( wxT("*") );
|
||||||
/* ecriture de la configuration */
|
/* ecriture de la configuration */
|
||||||
EDA_Appl->WriteProjectConfig(FullFileName, GROUP, ParamCfgList);
|
EDA_Appl->WriteProjectConfig(FullFileName, GROUP, ParamCfgList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,11 +143,16 @@ wxString msg;
|
||||||
|
|
||||||
item = new wxMenuItem(configmenu, ID_COLORS_SETUP,
|
item = new wxMenuItem(configmenu, ID_COLORS_SETUP,
|
||||||
_("&Colors"),
|
_("&Colors"),
|
||||||
_("Setting colors ...") );
|
_("Setting colors...") );
|
||||||
item->SetBitmap(palette_xpm);
|
item->SetBitmap(palette_xpm);
|
||||||
configmenu->Append(item);
|
configmenu->Append(item);
|
||||||
|
|
||||||
ADD_MENUITEM(configmenu, ID_OPTIONS_SETUP, _("&Options"), preference_xpm);
|
// ADD_MENUITEM(configmenu, ID_OPTIONS_SETUP, _("&Options"), preference_xpm);
|
||||||
|
item = new wxMenuItem(configmenu, ID_OPTIONS_SETUP,
|
||||||
|
_("&Options"),
|
||||||
|
_("Select general options...") );
|
||||||
|
item->SetBitmap(preference_xpm);
|
||||||
|
configmenu->Append(item);
|
||||||
|
|
||||||
// Font selection and setup
|
// Font selection and setup
|
||||||
AddFontSelectionMenu(configmenu);
|
AddFontSelectionMenu(configmenu);
|
||||||
|
@ -211,4 +216,3 @@ wxString msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@ BEGIN_EVENT_TABLE(WinEDA_SchematicFrame, wxFrame)
|
||||||
EVT_MENU(ID_EXIT, WinEDA_SchematicFrame::Process_Special_Functions)
|
EVT_MENU(ID_EXIT, WinEDA_SchematicFrame::Process_Special_Functions)
|
||||||
|
|
||||||
EVT_MENU_RANGE(ID_CONFIG_AND_PREFERENCES_START, ID_CONFIG_AND_PREFERENCES_END, WinEDA_SchematicFrame::Process_Config)
|
EVT_MENU_RANGE(ID_CONFIG_AND_PREFERENCES_START, ID_CONFIG_AND_PREFERENCES_END, WinEDA_SchematicFrame::Process_Config)
|
||||||
|
EVT_TOOL(ID_COLORS_SETUP, WinEDA_SchematicFrame::Process_Config)
|
||||||
|
EVT_TOOL(ID_OPTIONS_SETUP, WinEDA_SchematicFrame::Process_Config)
|
||||||
|
|
||||||
EVT_MENU_RANGE(ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
EVT_MENU_RANGE(ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
||||||
WinEDA_DrawFrame::SetLanguage)
|
WinEDA_DrawFrame::SetLanguage)
|
||||||
|
|
|
@ -27,7 +27,7 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
|
||||||
{
|
{
|
||||||
int ii;
|
int ii;
|
||||||
wxMenuBar* menuBar = GetMenuBar();
|
wxMenuBar* menuBar = GetMenuBar();
|
||||||
wxMenuItem* item;
|
// wxMenuItem* item;
|
||||||
|
|
||||||
if( menuBar == NULL )
|
if( menuBar == NULL )
|
||||||
{
|
{
|
||||||
|
@ -457,3 +457,4 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
|
||||||
|
|
||||||
SetToolbars();
|
SetToolbars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -403,10 +403,11 @@ MODULE * ListAndSelectModuleName(COMMAND * Cmd);
|
||||||
/***************/
|
/***************/
|
||||||
|
|
||||||
/*****************/
|
/*****************/
|
||||||
/* SEL_COLOR.CPP */
|
/* SET_COLOR.CPP */
|
||||||
/*****************/
|
/*****************/
|
||||||
void DisplayColorSetupFrame(WinEDA_DrawFrame * parent,
|
void DisplayColorSetupFrame(WinEDA_DrawFrame * parent,
|
||||||
const wxPoint & framepos);
|
const wxPoint & framepos);
|
||||||
|
|
||||||
|
|
||||||
#endif /* #define PROTO_H */
|
#endif /* #define PROTO_H */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue