Added help menu item to copy bug report information to clipboard.

This commit is contained in:
Wayne Stambaugh 2010-08-24 13:26:51 -04:00
parent 80bc0ad65a
commit 91530e7a60
11 changed files with 465 additions and 373 deletions

View File

@ -63,7 +63,16 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
* Check Operating System *
**************************/
#if defined __WINDOWS__
description << ( wxT( "on Windows" ) );
description << wxT( "on " );
#if defined _WIN64
description << wxT( "64 bit" );
#else
description << wxT( "32 bit" );
#endif
description << wxT( " Windows" );
/* Check for wxMAC */
# elif defined __WXMAC__
@ -71,11 +80,11 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
/* Linux 64 bits */
# elif defined _LP64 && __LINUX__
description << ( wxT( "on 64 Bits GNU/Linux" ) );
description << ( wxT( "on 64 bit GNU/Linux" ) );
/* Linux 32 bits */
# elif defined __LINUX__
description << ( wxT( "on 32 Bits GNU/Linux" ) );
description << ( wxT( "on 32 bit GNU/Linux" ) );
/* OpenBSD */
# elif defined __OpenBSD__

View File

@ -5,10 +5,12 @@
#include <wx/aboutdlg.h>
#include <wx/fontdlg.h>
#include <wx/clipbrd.h>
#include <wx/statline.h>
#include <wx/aboutdlg.h>
#include <wx/platinfo.h>
#include "wx/statline.h"
#include "wx/generic/aboutdlgg.h"
#include "build_version.h"
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
@ -18,6 +20,8 @@
#include "eda_doc.h"
#include "wxstruct.h"
#include "macros.h"
#include "bitmaps.h"
/*
* Class constructor for WinEDA_BasicFrame general options
@ -53,6 +57,9 @@ WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father,
m_FramePos.x = m_FramePos.y = 0;
m_FrameSize.y -= m_MsgFrameHeight;
Connect( ID_HELP_COPY_VERSION_STRING,
wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler( WinEDA_BasicFrame::CopyVersionInfoToClipboard ) );
}
@ -62,10 +69,10 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame()
delete wxGetApp().m_HtmlCtrl;
wxGetApp().m_HtmlCtrl = NULL;
/* This needed for OSX: avoids furter OnDraw processing after this
/* This needed for OSX: avoids further OnDraw processing after this
* destructor and before the native window is destroyed
*/
this->Freeze( );
this->Freeze();
}
@ -77,7 +84,7 @@ void WinEDA_BasicFrame::ReCreateMenuBar()
}
/** Vitual function SetLanguage
/** Virtual function SetLanguage
* called on a language menu selection
* when using a derived function, do not forget to call this one
*/
@ -124,7 +131,7 @@ void WinEDA_BasicFrame::LoadSettings()
// Ensure Window title bar is visible
#if defined( __WXMAC__ )
// for macOSX, the window must be below system (macOSX) toolbar
// Ypos_min = GetMBarHeight(); seems no more exist in ne API (subject to change)
// Ypos_min = GetMBarHeight(); seems no more exist in new API (subject to change)
Ypos_min = 20;
#else
Ypos_min = 0;
@ -203,8 +210,7 @@ void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/*
* Fetch the file name from the file history list.
*/
wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId,
const wxString& type )
wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, const wxString& type )
{
wxString fn, msg;
size_t i;
@ -254,8 +260,7 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
}
else
{
msg.Printf( _( "Help file %s not found" ),
GetChars( wxGetApp().m_HelpFileName ) );
msg.Printf( _( "Help file %s not found" ), GetChars( wxGetApp().m_HelpFileName ) );
DisplayError( this, msg );
}
@ -285,3 +290,85 @@ void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
InitKiCadAbout(info);
wxAboutBox(info);
}
void WinEDA_BasicFrame::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
{
wxASSERT( aMenu != NULL );
wxMenuItem* item = NULL;
// Copy version string to clipboard for bug report purposes.
item = new wxMenuItem( aMenu, ID_HELP_COPY_VERSION_STRING,
_( "Copy &Version Information" ),
_( "Copy the version string to clipboard to send with bug reports" ) );
// For some reason images are not always added to the OSX menu items. Anyone want
// to clarify as to why this is the case? Putting this information in some formal
// developer notes would be helpful. A good place to put this information would be
// ./documentation/guidelines/UIpolicies.txt.
#if !defined( __WXMAC__ )
item->SetBitmap( copy_button );
#endif
aMenu->Append( item );
}
void WinEDA_BasicFrame::CopyVersionInfoToClipboard( wxCommandEvent& WXUNUSED( event ) )
{
if( !wxTheClipboard->Open() )
{
wxMessageBox( _( "Could not open clipboard to write version information." ),
_( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this );
return;
}
wxString tmp;
wxPlatformInfo info;
// This is an enhanced version of the compiler build macro provided by wxWidgets
// in <wx/build.h>. Please do not make any of these strings translatable. They
// are used for conveying troubleshooting information to developers.
#if defined(__GXX_ABI_VERSION)
#define __ABI_VERSION ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
#else
#define __ABI_VERSION ",compiler without C++ ABI "
#endif
#if defined(__INTEL_COMPILER)
#define __BO_COMPILER ",Intel C++"
#elif defined(__GNUG__)
#define __BO_COMPILER ",GCC " \
__WX_BO_STRINGIZE(__GNUC__) "." \
__WX_BO_STRINGIZE(__GNUC_MINOR__) "." \
__WX_BO_STRINGIZE(__GNUC_PATCHLEVEL__)
#elif defined(__VISUALC__)
#define __BO_COMPILER ",Visual C++"
#elif defined(__BORLANDC__)
#define __BO_COMPILER ",Borland C++"
#elif defined(__DIGITALMARS__)
#define __BO_COMPILER ",DigitalMars"
#elif defined(__WATCOMC__)
#define __BO_COMPILER ",Watcom C++"
#else
#define __BO_COMPILER ",unknown"
#endif
#define KICAD_BUILD_OPTIONS_SIGNATURE \
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
__ABI_VERSION __BO_COMPILER \
__WX_BO_STL \
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
")"
tmp = wxT( "Application: " ) + wxGetApp().GetTitle() + wxT( "\n" );
tmp += wxT( "Version: " ) + GetBuildVersion() + wxT( "\n" );
tmp << wxT( "Build: " ) << wxVERSION_STRING
<< wxT( KICAD_BUILD_OPTIONS_SIGNATURE ) << wxT( "\n" )
<< wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
<< info.GetArchName() << wxT( ", " ) << info.GetEndiannessName() << wxT( ", " )
<< info.GetPortIdName();
wxTheClipboard->SetData( new wxTextDataObject( tmp ) );
wxTheClipboard->Close();
}

View File

@ -31,8 +31,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
/* Open Recent submenu */
wxMenu* openRecentMenu = new wxMenu();
wxGetApp().m_fileHistory.AddFilesToMenu( openRecentMenu );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu,
-1, _( "Open &Recent" ),
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, openRecentMenu, -1, _( "Open &Recent" ),
_("Open a recent opened netlist document" ),
open_project_xpm );
@ -49,8 +48,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
#if !defined(__WXMAC__)
filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ),
_( "Quit CvPCB" ) );
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit CvPCB" ) );
filesMenu->Append( item );
#endif /* !defined( __WXMAC__) */
@ -78,6 +76,9 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
// Menu Help:
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the cvpcb manual" ) );
item->SetBitmap( online_help_xpm );
@ -105,4 +106,3 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
* rebuilt. This allows language changes of the menu text on the fly. */
SetMenuBar( menuBar );
}

View File

@ -90,8 +90,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
filesMenu->AppendSeparator();
/* Print */
item = new wxMenuItem( filesMenu, wxID_PRINT, _( "P&rint" ),
_( "Print schematic" ) );
item = new wxMenuItem( filesMenu, wxID_PRINT, _( "P&rint" ), _( "Print schematic" ) );
item->SetBitmap( print_button );
filesMenu->Append( item );
@ -134,16 +133,14 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( filesMenu, choice_plot_fmt,
ID_GEN_PLOT, _( "&Plot" ),
_(
"Plot schematic sheet in HPGL, PostScript or SVG format" ),
_( "Plot schematic sheet in HPGL, PostScript or SVG format" ),
plot_xpm );
/* Quit on all platforms except WXMAC */
#if !defined(__WXMAC__)
filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ),
_( "Quit EESchema" ) );
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit EESchema" ) );
item->SetBitmap( exit_xpm );
filesMenu->Append( item );
@ -158,16 +155,14 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
/* Undo */
text = AddHotkeyName( _( "Undo" ), s_Schematic_Hokeys_Descr, HK_UNDO );
item = new wxMenuItem( editMenu, wxID_UNDO, text,
HELP_UNDO, wxITEM_NORMAL );
item = new wxMenuItem( editMenu, wxID_UNDO, text, HELP_UNDO, wxITEM_NORMAL );
item->SetBitmap( undo_xpm );
editMenu->Append( item );
/* Redo */
text = AddHotkeyName( _( "Redo" ), s_Schematic_Hokeys_Descr, HK_REDO );
item = new wxMenuItem( editMenu, wxID_REDO, text,
HELP_REDO, wxITEM_NORMAL );
item = new wxMenuItem( editMenu, wxID_REDO, text, HELP_REDO, wxITEM_NORMAL );
item->SetBitmap( redo_xpm );
editMenu->Append( item );
@ -185,8 +180,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
/* Find */
text = AddHotkeyName( _( "&Find" ), s_Schematic_Hokeys_Descr, HK_FIND_ITEM );
item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text,
HELP_FIND, wxITEM_NORMAL );
item = new wxMenuItem( editMenu, ID_FIND_ITEMS, text, HELP_FIND, wxITEM_NORMAL );
item->SetBitmap( find_xpm );
editMenu->Append( item );
@ -210,9 +204,9 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
* we cannot add hotkey shortcut here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
* zoom in and out from hotkeys are equivalent to the pop up menu zoom
* From here, zoomming is made around the screen center
* From hotkeys, zoomming is made around the mouse cursor position
* (obvioulsy not possible from the toolbat or menubar command)
* From here, zooming is made around the screen center
* From hotkeys, zooming is made around the mouse cursor position
* (obviously not possible from the toolbar or menubar command)
*
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus
@ -222,36 +216,28 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
/* Zoom in */
text = AddHotkeyName( _( "Zoom In" ), s_Schematic_Hokeys_Descr,
ID_ZOOM_IN, false ); // add comment, not a shortcut
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN,
wxITEM_NORMAL );
item = new wxMenuItem( viewMenu, ID_ZOOM_IN, text, HELP_ZOOM_IN, wxITEM_NORMAL );
item->SetBitmap( zoom_in_xpm );
viewMenu->Append( item );
/* Zoom out */
text = AddHotkeyName( _( "Zoom Out" ), s_Schematic_Hokeys_Descr,
ID_ZOOM_OUT, false ); // add comment, not a shortcut
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT,
wxITEM_NORMAL );
item = new wxMenuItem( viewMenu, ID_ZOOM_OUT, text, HELP_ZOOM_OUT, wxITEM_NORMAL );
item->SetBitmap( zoom_out_xpm );
viewMenu->Append( item );
/* Fit on screen */
text = AddHotkeyName( _( "Fit on Screen" ), s_Schematic_Hokeys_Descr,
HK_ZOOM_AUTO );
item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text,
HELP_ZOOM_FIT, wxITEM_NORMAL );
text = AddHotkeyName( _( "Fit on Screen" ), s_Schematic_Hokeys_Descr, HK_ZOOM_AUTO );
item = new wxMenuItem( viewMenu, ID_ZOOM_PAGE, text, HELP_ZOOM_FIT, wxITEM_NORMAL );
item->SetBitmap( zoom_auto_xpm );
viewMenu->Append( item );
viewMenu->AppendSeparator();
/* Redraw view */
text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr,
HK_ZOOM_REDRAW );
item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text,
HELP_ZOOM_REDRAW, wxITEM_NORMAL );
text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW );
item = new wxMenuItem( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, wxITEM_NORMAL );
item->SetBitmap( zoom_redraw_xpm );
viewMenu->Append( item );
@ -291,15 +277,13 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
placeMenu->Append( item );
/* Wire to Bus */
item = new wxMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT,
_( "W&ire to bus entry" ),
item = new wxMenuItem( placeMenu, ID_WIRETOBUS_ENTRY_BUTT, _( "W&ire to bus entry" ),
HELP_PLACE_WIRE2BUS_ENTRY, wxITEM_NORMAL );
item->SetBitmap( add_line2bus_xpm );
placeMenu->Append( item );
/* Bus to Bus */
item = new wxMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT,
_( "B&us to bus entry" ),
item = new wxMenuItem( placeMenu, ID_BUSTOBUS_ENTRY_BUTT, _( "B&us to bus entry" ),
HELP_PLACE_BUS2BUS_ENTRY, wxITEM_NORMAL );
item->SetBitmap( add_bus2bus_xpm );
placeMenu->Append( item );
@ -307,8 +291,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
/* No connect flag */
text = AddHotkeyName( _( "No connect flag" ), s_Schematic_Hokeys_Descr,
HK_ADD_NOCONN_FLAG, false ); // add comment, not a shortcut
item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, text,
HELP_PLACE_NC_FLAG, wxITEM_NORMAL );
item = new wxMenuItem( placeMenu, ID_NOCONN_BUTT, text, HELP_PLACE_NC_FLAG, wxITEM_NORMAL );
item->SetBitmap( noconn_button );
placeMenu->Append( item );
@ -322,8 +305,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
/* Global label */
item = new wxMenuItem( placeMenu, ID_GLABEL_BUTT, _( "Global label" ),
_(
"Place a global label. Warning: all global labels with the same name are connected in whole hierarchy" ),
_( "Place a global label. Warning: all global labels with the same name are connected in whole hierarchy" ),
wxITEM_NORMAL );
item->SetBitmap( add_glabel_xpm );
placeMenu->Append( item );
@ -338,29 +320,25 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
placeMenu->AppendSeparator();
/* Hierarchical label */
item = new wxMenuItem( placeMenu, ID_HIERLABEL_BUTT,
_( "Hierarchical label" ),
item = new wxMenuItem( placeMenu, ID_HIERLABEL_BUTT, _( "Hierarchical label" ),
HELP_PLACE_HIER_LABEL, wxITEM_NORMAL );
item->SetBitmap( add_hierarchical_label_xpm );
placeMenu->Append( item );
/* Hierarchical sheet */
item = new wxMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT,
_( "Hierarchical sheet" ),
item = new wxMenuItem( placeMenu, ID_SHEET_SYMBOL_BUTT, _( "Hierarchical sheet" ),
HELP_PLACE_SHEET, wxITEM_NORMAL );
item->SetBitmap( add_hierarchical_subsheet_xpm );
placeMenu->Append( item );
/* Import hierarchical sheet */
item = new wxMenuItem( placeMenu, ID_IMPORT_HLABEL_BUTT,
_( "Import Hierarchical Label" ),
item = new wxMenuItem( placeMenu, ID_IMPORT_HLABEL_BUTT, _( "Import Hierarchical Label" ),
HELP_IMPORT_PINSHEET, wxITEM_NORMAL );
item->SetBitmap( import_hierarchical_label_xpm );
placeMenu->Append( item );
/* Add hierarchical Pin to Sheet */
item = new wxMenuItem( placeMenu, ID_SHEET_LABEL_BUTT,
_( "Add Hierarchical Pin to Sheet" ),
item = new wxMenuItem( placeMenu, ID_SHEET_LABEL_BUTT, _( "Add Hierarchical Pin to Sheet" ),
HELP_PLACE_PINSHEET, wxITEM_NORMAL );
item->SetBitmap( add_hierar_pin_xpm );
placeMenu->Append( item );
@ -369,15 +347,13 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
placeMenu->AppendSeparator();
/* Graphic line or polygon */
item = new wxMenuItem( placeMenu, ID_LINE_COMMENT_BUTT,
_( "Graphic line or polygon" ),
item = new wxMenuItem( placeMenu, ID_LINE_COMMENT_BUTT, _( "Graphic line or polygon" ),
HELP_PLACE_GRAPHICLINES, wxITEM_NORMAL );
item->SetBitmap( add_dashed_line_xpm );
placeMenu->Append( item );
/* Graphic text */
item = new wxMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT,
_( "Graphic text" ),
item = new wxMenuItem( placeMenu, ID_TEXT_COMMENT_BUTT, _( "Graphic text" ),
HELP_PLACE_GRAPHICTEXTS, wxITEM_NORMAL );
item->SetBitmap( add_text_xpm );
placeMenu->Append( item );
@ -432,6 +408,9 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
* Help Menu
*/
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the eeschema manual" ) );
item->SetBitmap( online_help_xpm );

View File

@ -119,9 +119,9 @@ void WinEDA_LibeditFrame::ReCreateMenuBar()
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
* zoom in and out from hotkeys are equivalent to the pop up menu zoom
* From here, zoomming is made around the screen center
* From hotkeys, zoomming is made around the mouse cursor position
* (obvioulsy not possible from the toolbat or menubar command)
* From here, zooming is made around the screen center
* From hotkeys, zooming is made around the mouse cursor position
* (obviously not possible from the toolbar or menubar command)
*
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus
@ -228,7 +228,7 @@ void WinEDA_LibeditFrame::ReCreateMenuBar()
#if 0 // work in progress. activated when finished
/* Dimension */
item = new wxMenuItem( configmenu, ID_LIBEDIT_DIMENSIONS, _( "&Dimensions" ),
_( "Tickness of graphic lines, texts sizes and others" ) );
_( "Thickness of graphic lines, texts sizes and others" ) );
item->SetBitmap( add_dimension_xpm );
configmenu->Append( item );
#endif
@ -257,6 +257,9 @@ void WinEDA_LibeditFrame::ReCreateMenuBar()
* Help Menu
*/
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the eeschema manual" ) );
item->SetBitmap( online_help_xpm );

View File

@ -118,6 +118,7 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
// Menu Help:
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
ADD_MENUITEM_WITH_HELP( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the gerbview manual" ), help_xpm );
ADD_MENUITEM_WITH_HELP( helpMenu, ID_KICAD_ABOUT, _( "&About Gerbview" ),
@ -262,8 +263,7 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
m_VToolBar = new WinEDA_Toolbar( TOOLBAR_TOOL, this, ID_V_TOOLBAR, FALSE );
// Set up toolbar
m_VToolBar->AddTool( ID_NO_SELECT_BUTT, wxEmptyString,
wxBitmap( cursor_xpm ) );
m_VToolBar->AddTool( ID_NO_SELECT_BUTT, wxEmptyString, wxBitmap( cursor_xpm ) );
m_VToolBar->ToggleTool( ID_NO_SELECT_BUTT, TRUE );
m_VToolBar->AddSeparator();
m_VToolBar->AddTool( ID_GERBVIEW_DELETE_ITEM_BUTT, wxEmptyString,
@ -285,8 +285,7 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
wxWindowUpdateLocker dummy(this);
// creation of tool bar options
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
ID_OPT_TOOLBAR, FALSE );
m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, FALSE );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxEmptyString,
wxBitmap( grid_xpm ),
@ -331,8 +330,7 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
wxEmptyString,
wxBitmap( layers_manager_xpm ),
_(
"Show/hide the layers manager toolbar" ),
_( "Show/hide the layers manager toolbar" ),
wxITEM_CHECK );

View File

@ -71,6 +71,7 @@ enum main_id
ID_AUX_TOOLBAR,
ID_GENERAL_HELP,
ID_HELP_COPY_VERSION_STRING,
ID_LOCAL_HELP,
ID_KICAD_ABOUT,

View File

@ -110,8 +110,20 @@ public:
void GetKicadHelp( wxCommandEvent& event );
void GetKicadAbout( wxCommandEvent& event );
/**
* Copy the version information to the clipboard for bug reporting purposes.
*/
void CopyVersionInfoToClipboard( wxCommandEvent& event );
void PrintMsg( const wxString& text );
/**
* Append the copy version information to clipboard help menu entry to \a aMenu.
*
* @param aMenu - The menu to append.
*/
void AddHelpVersionInfoMenuEntry( wxMenu* aMenu );
virtual void LoadSettings();
virtual void SaveSettings();
@ -148,7 +160,7 @@ public:
WinEDA_Toolbar* m_AuxVToolBar; // Auxiliary Vertical (right side)
// Toolbar
WinEDA_Toolbar* m_OptionsToolBar; // Options Toolbar (left side)
WinEDA_Toolbar* m_AuxiliaryToolBar; // Auxiliay Toolbar used in pcbnew
WinEDA_Toolbar* m_AuxiliaryToolBar; // Auxiliary Toolbar used in pcbnew
WinEDAChoiceBox* m_SelGridBox; // Choice box to choose the grid
// size
@ -254,9 +266,9 @@ public:
*/
virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg );
/* Thes 4 functions provide a basic way to sho/hide grid
/* These 4 functions provide a basic way to show/hide grid
* and /get/set grid color.
* thes parameters are saved in kicad config for each main frame
* These parameters are saved in kicad config for each main frame
*/
/** Function IsGridVisible() , virtual
* @return true if the grid must be shown
@ -520,7 +532,7 @@ public:
* Append a message to the message panel.
*
* This method automatically adjusts for the width of the text string.
* Making consectutive calls to AppendMessage will append each message
* Making consecutive calls to AppendMessage will append each message
* to the right of the last message. This message is not compatible
* with Affiche_1_Parametre.
*
@ -730,7 +742,7 @@ class WinEDA_Toolbar : public wxAuiToolBar
public:
wxWindow* m_Parent;
id_toolbar m_Ident;
bool m_Horizontal; // some auxilary TB are horizontal, others vertical
bool m_Horizontal; // some auxiliary TB are horizontal, others vertical
public:
WinEDA_Toolbar( id_toolbar type, wxWindow* parent,

View File

@ -167,7 +167,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
/* Text editor */
item = new wxMenuItem( browseMenu, ID_TO_EDITOR, _( "Text E&ditor" ),
_( "Open prefered text editor" ) );
_( "Open preferred text editor" ) );
#if !defined( __WXMAC__ )
item->SetBitmap( editor_xpm );
#endif /* !defined( __WXMAC__ ) */
@ -194,7 +194,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
/* Text editor */
item = new wxMenuItem( PreferencesMenu, ID_SELECT_PREFERED_EDITOR,
_( "&Text Editor" ),
_( "Select your prefered text editor" ) );
_( "Select your preferred text editor" ) );
#if !defined( __WXMAC__ )
item->SetBitmap( editor_xpm );
#endif /* !defined( __WXMAC__ ) */
@ -264,9 +264,12 @@ void WinEDA_MainFrame::ReCreateMenuBar()
*/
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
/* Contents */
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the kicad manual" ) );
#if !defined( __WXMAC__ )
item->SetBitmap( online_help_xpm );
#endif /* !defined( __WXMAC__ ) */
@ -343,4 +346,3 @@ void WinEDA_MainFrame::RecreateBaseHToolbar()
/* Create m_HToolBar */
m_HToolBar->Realize();
}

View File

@ -63,8 +63,8 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
openSubmenu->Append( item );
/* Append openSubmenu to fileMenu */
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( fileMenu, openSubmenu, -1,
_( "&Load Module" ), _( "Load a footprint module" ), open_xpm );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( fileMenu, openSubmenu, -1, _( "&Load Module" ),
_( "Load a footprint module" ), open_xpm );
/* Save module */
item = new wxMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE,
@ -83,7 +83,7 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
item = new wxMenuItem( fileMenu,
ID_MODEDIT_EXPORT_PART,
_( "&Export module" ),
_( "Save the current loaded module to a file on the harddisk" ) );
_( "Save the current loaded module to a file" ) );
item->SetBitmap( export_module_xpm );
fileMenu->Append( item );
@ -100,8 +100,7 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
fileMenu->AppendSeparator();
/* Close editor */
item = new wxMenuItem( fileMenu, wxID_EXIT, _( "Close" ),
_( "Close the footprint editor" ) );
item = new wxMenuItem( fileMenu, wxID_EXIT, _( "Close" ), _( "Close the footprint editor" ) );
item->SetBitmap( exit_xpm );
fileMenu->Append( item );
@ -155,7 +154,6 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
item->SetBitmap( options_text_xpm );
dimensions_Submenu->Append( item );
/* Pad settings */
item = new wxMenuItem( dimensions_Submenu,
ID_MODEDIT_PAD_SETTINGS,
@ -249,7 +247,6 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
item->SetBitmap( add_circle_xpm );
placeMenu->Append( item );
/* Line or Polygon */
item = new wxMenuItem( placeMenu,
ID_PCB_ADD_LINE_BUTT,
@ -287,11 +284,13 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
/* Help menu */
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
/* Contents */
item = new wxMenuItem( helpMenu,
ID_GENERAL_HELP,
_( "&Contents" ),
_( "Open the PCBNew pdf manual" ) );
_( "Open the PCBNew manual" ) );
item->SetBitmap( online_help_xpm );
helpMenu->Append( item );

View File

@ -196,7 +196,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Print */
item = new wxMenuItem( filesMenu, wxID_PRINT, _( "&Print" ),
_( "Print pcb board" ) );
_( "Print board" ) );
item->SetBitmap( print_button );
filesMenu->Append( item );
@ -235,8 +235,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
#if !defined( __WXMAC__ )
filesMenu->AppendSeparator();
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ),
_( "Quit PCBNew" ) );
item = new wxMenuItem( filesMenu, wxID_EXIT, _( "&Quit" ), _( "Quit PCBNew" ) );
item->SetBitmap( exit_xpm );
filesMenu->Append( item );
@ -306,9 +305,9 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
* we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
* events(default = WXK_F1 and WXK_F2) are *NOT* equivalent to this menu command:
* zoom in and out from hotkeys are equivalent to the pop up menu zoom
* From here, zoomming is made around the screen center
* From hotkeys, zoomming is made around the mouse cursor position
* (obvioulsy not possible from the toolbat or menubar command)
* From here, zooming is made around the screen center
* From hotkeys, zooming is made around the mouse cursor position
* (obviously not possible from the toolbar or menubar command)
*
* in others words HK_ZOOM_IN and HK_ZOOM_OUT *are NOT* accelerators
* for Zoom in and Zoom out sub menus
@ -487,6 +486,9 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
* Help menu
*/
wxMenu* helpMenu = new wxMenu;
AddHelpVersionInfoMenuEntry( helpMenu );
item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
_( "Open the PCBnew manual" ) );
item->SetBitmap( online_help_xpm );