Commit 1a30862d authored by charras's avatar charras

minor changes. update GUI french translation

parent 834cd029
...@@ -259,35 +259,21 @@ wxString layer_name_list_for_filename[] = { ...@@ -259,35 +259,21 @@ wxString layer_name_list_for_filename[] = {
}; };
if ( layer_number >= 31 ) layer_number = 31; if ( layer_number >= 31 ) layer_number = 31;
#if 0 // Use it (#if 1) to return layer_name internationalized, without space
if ( is_filename )
{
int ll = layer_name_list[layer_number].Length();
int ii;
for ( ii = 0; ii < ll; ii++ )
{
char cc = layer_name_list[layer_number].GetChar(ii);
if ( cc != ' ' )
layer_name += cc;
}
}
#else
if ( is_filename ) layer_name = layer_name_list_for_filename[layer_number]; if ( is_filename ) layer_name = layer_name_list_for_filename[layer_number];
#endif
else layer_name = layer_name_list[layer_number]; else layer_name = layer_name_list[layer_number];
if( is_gui ){ if( is_gui ){
wxString hotkey_list[] = { wxString hotkey_list[] = {
wxT("(PgDn)"), wxT("(F5)"), wxT("(F6)"), wxT("(F7)"), wxT("(PgDn)"), wxT("(F5)"), wxT("(F6)"), wxT("(F7)"),
wxT("(F8)"), wxT(" "), wxT(" "), wxT(" "), wxT("(F8)"), wxT("(F9)"), wxT("(F10)"), wxT(" "),
wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "),
wxT(" "), wxT(" "), wxT(" "), wxT("(PgUp)"), wxT(" "), wxT(" "), wxT(" "), wxT(" (PgUp)"),
wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "),
wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "),
wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "), wxT(" "),
wxT(" "), wxT(" "), wxT(" "), wxT(" ") wxT(" "), wxT(" "), wxT(" "), wxT(" ")
}; };
layer_name += hotkey_list[layer_number]; layer_name += wxT(" ") + hotkey_list[layer_number];
} }
return layer_name; return layer_name;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE #ifdef EDA_BASE
(wxT("(2007-06-12)")) (wxT("(2007-06-14)"))
#endif #endif
; ;
......
...@@ -479,7 +479,7 @@ public: ...@@ -479,7 +479,7 @@ public:
// Gestion des layers: // Gestion des layers:
int SelectLayer(int default_layer, int min_layer, int max_layer); int SelectLayer(int default_layer, int min_layer, int max_layer);
void SelectLayerPair(void); void SelectLayerPair(void);
void SwitchLayer(wxDC *DC, int layer); virtual void SwitchLayer(wxDC *DC, int layer);
// divers // divers
void AddHistory(int value, DrawStructureType type); // Add value in data list history void AddHistory(int value, DrawStructureType type); // Add value in data list history
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -122,3 +122,26 @@ void WinEDA_BasePcbFrame::GetComponentFromRedoList(void) ...@@ -122,3 +122,26 @@ void WinEDA_BasePcbFrame::GetComponentFromRedoList(void)
{ {
} }
/****************************************************************/
void WinEDA_BasePcbFrame::SwitchLayer(wxDC *DC, int layer)
/*****************************************************************/
{
//Note: virtual, overridden in WinEDA_PcbFrame;
int preslayer = GetScreen()->m_Active_Layer;
//if there is only one layer, don't switch.
if ( m_Pcb->m_BoardSettings->m_CopperLayerCount <= 1)
layer = LAYER_CUIVRE_N; // Of course we select the copper layer
//otherwise, we select the requested layer only if it is possible
if( layer != LAYER_CMP_N && layer >= m_Pcb->m_BoardSettings->m_CopperLayerCount-1 )
return;
if(preslayer == layer)
return;
GetScreen()->m_Active_Layer = layer;
if ( DisplayOpt.ContrastModeDisplay )
GetScreen()->SetRefreshReq();
}
...@@ -264,6 +264,14 @@ int CurrentTime = time(NULL); ...@@ -264,6 +264,14 @@ int CurrentTime = time(NULL);
SwitchLayer(DC, LAYER_N_5); SwitchLayer(DC, LAYER_N_5);
break; break;
case WXK_F9 :
SwitchLayer(DC, LAYER_N_6);
break;
case WXK_F10 :
SwitchLayer(DC, LAYER_N_7);
break;
case WXK_NUMPAD8 : /* Deplacement curseur vers le haut */ case WXK_NUMPAD8 : /* Deplacement curseur vers le haut */
case WXK_UP : case WXK_UP :
Mouse.y -= delta.y; Mouse.y -= delta.y;
...@@ -361,25 +369,3 @@ int CurrentTime = time(NULL); ...@@ -361,25 +369,3 @@ int CurrentTime = time(NULL);
OnHotKey(DC, hotkey, NULL); OnHotKey(DC, hotkey, NULL);
} }
} }
/****************************************************************/
void WinEDA_BasePcbFrame::SwitchLayer(wxDC *DC, int layer)
/*****************************************************************/
{
//Note: overridden in WinEDA_PcbFrame;
int preslayer = GetScreen()->m_Active_Layer;
//if there is only one layer, don't switch.
if ( m_Pcb->m_BoardSettings->m_CopperLayerCount <= 1)
layer = LAYER_CUIVRE_N; // Of course we select the copper layer
//otherwise, we select the requested layer only if it is possible
if( layer != LAYER_CMP_N && layer >= m_Pcb->m_BoardSettings->m_CopperLayerCount-1 )
return;
if(preslayer == layer)
return;
GetScreen()->m_Active_Layer = layer;
if ( DisplayOpt.ContrastModeDisplay )
GetScreen()->SetRefreshReq();
}
...@@ -74,7 +74,7 @@ MODULE* module = NULL; ...@@ -74,7 +74,7 @@ MODULE* module = NULL;
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
End_Route( (TRACK *) (GetScreen()->m_CurrentItem), DC); End_Route( (TRACK *) (GetScreen()->m_CurrentItem), DC);
break; break;
case 'v': // Rotation case 'v': // Switch to alternate layer and Place a via if a track is in progress
case 'V': case 'V':
if ( m_ID_current_state != ID_TRACK_BUTT ) return; if ( m_ID_current_state != ID_TRACK_BUTT ) return;
if ( ItemFree ) if ( ItemFree )
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "general_ratsnet.xpm" #include "general_ratsnet.xpm"
#include "add_cotation.xpm" #include "add_cotation.xpm"
#define SEL_LAYER_HELP _("Show active layer selections\nand select layer pair for route and place via")
/* Data to build the layer pair indicator button */ /* Data to build the layer pair indicator button */
static wxBitmap * LayerPairBitmap = NULL; static wxBitmap * LayerPairBitmap = NULL;
...@@ -167,8 +168,7 @@ wxMemoryDC iconDC; ...@@ -167,8 +168,7 @@ wxMemoryDC iconDC;
int pos = m_HToolBar->GetToolPos(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR); int pos = m_HToolBar->GetToolPos(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR);
m_HToolBar->DeleteTool(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR); m_HToolBar->DeleteTool(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR);
m_HToolBar->InsertTool(pos, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap, m_HToolBar->InsertTool(pos, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap,
wxNullBitmap, false, NULL, wxNullBitmap, false, NULL, SEL_LAYER_HELP);
_("Show active layer selections\nand select layer pair for route and place via"));
m_HToolBar->Realize(); m_HToolBar->Realize();
#endif #endif
} }
...@@ -254,7 +254,7 @@ int ii; ...@@ -254,7 +254,7 @@ int ii;
ReCreateLayerBox(m_HToolBar); ReCreateLayerBox(m_HToolBar);
PrepareLayerIndicator(); // Initialise the bitmap with current active layer colors for the next tool PrepareLayerIndicator(); // Initialise the bitmap with current active layer colors for the next tool
m_HToolBar->AddTool(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, wxEmptyString, * LayerPairBitmap, m_HToolBar->AddTool(ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, wxEmptyString, * LayerPairBitmap,
_("Show active layer selections\nand select layer pair for route and place via")); SEL_LAYER_HELP);
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool(ID_TOOLBARH_PCB_AUTOPLACE, wxEmptyString, BITMAP(mode_module_xpm), m_HToolBar->AddTool(ID_TOOLBARH_PCB_AUTOPLACE, wxEmptyString, BITMAP(mode_module_xpm),
......
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