From 41c5e68e6c786b90d8142a71b8d48221a8e06e69 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 22 Feb 2013 09:04:15 +0100 Subject: [PATCH] Pcbnew: Very minor fix in plot dialog. --- .../rules_for_capitalization_in_Kicad_UI.txt | 48 +++++++++++++++++++ pcbnew/dialogs/dialog_plot_base.cpp | 22 ++++++--- pcbnew/dialogs/dialog_plot_base.fbp | 12 ++--- pcbnew/dialogs/dialog_plot_base.h | 4 +- 4 files changed, 73 insertions(+), 13 deletions(-) create mode 100644 Documentation/rules_for_capitalization_in_Kicad_UI.txt diff --git a/Documentation/rules_for_capitalization_in_Kicad_UI.txt b/Documentation/rules_for_capitalization_in_Kicad_UI.txt new file mode 100644 index 0000000000..d9c561303d --- /dev/null +++ b/Documentation/rules_for_capitalization_in_Kicad_UI.txt @@ -0,0 +1,48 @@ +Gnome rules, used in Kicad: + +8.3.2. Capitalization + +Two styles of capitalization are used in GNOME user interface elements: + +Header capitalization + Capitalize all words in the element, with the following exceptions: + Articles: a, an, the. + Conjunctions: and, but, for, not, so, yet ... + Prepositions of three or fewer letters: at, for, by, in, to ... + +Sentence capitalization + Capitalize the first letter of the first word, and any other words normally capitalized in sentences, + such as application names. + +The following table indicates the capitalization style to use for each type of user interface element. +Table 8-3 Capitalization Style Guidelines for User Interface Elements + +Element Style + +Check box labels Sentence +Command button labels Header +Column heading labels Header +Desktop background object labels Header +Dialog messages Sentence +Drop-down combination box labels Sentence +Drop-down list box labels Sentence +Field labels Sentence +Filenames Sentence +Graphic equivalent text: +for example, Alt text on web pages Sentence +Group box or frame labels Header +Items in drop-down combination boxes, +drop-down list boxes, and list boxes Sentence +List box labels Sentence +Menu items Header +Menu items in applications Header +Menu titles in applications Header +Radio button labels Sentence +Slider labels Sentence +Spin box labels Sentence +Tabbed section titles Header +Text box labels Sentence +Titlebar labels Header +Toolbar button labels Header +Tooltips Sentence +Webpage titles and navigational elements Header diff --git a/pcbnew/dialogs/dialog_plot_base.cpp b/pcbnew/dialogs/dialog_plot_base.cpp index 3081a970ee..e88c06ddb1 100644 --- a/pcbnew/dialogs/dialog_plot_base.cpp +++ b/pcbnew/dialogs/dialog_plot_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -48,6 +48,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer29 = new wxBoxSizer( wxHORIZONTAL ); m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_outputDirectoryName->SetMaxLength( 0 ); m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") ); bSizer29->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); @@ -170,6 +171,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer14->Add( m_textDefaultPenSize, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_linesWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_linesWidth->SetMaxLength( 0 ); m_linesWidth->SetToolTip( _("Line width for, e.g., sheet references.") ); bSizer14->Add( m_linesWidth, 0, wxBOTTOM|wxEXPAND|wxLEFT, 5 ); @@ -250,6 +252,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer20->Add( m_textPenSize, 0, wxRIGHT|wxLEFT, 5 ); m_HPGLPenSizeOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_HPGLPenSizeOpt->SetMaxLength( 0 ); bSizer20->Add( m_HPGLPenSizeOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -263,6 +266,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer21->Add( m_textPenOvr, 0, wxRIGHT|wxLEFT, 5 ); m_HPGLPenOverlayOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_HPGLPenOverlayOpt->SetMaxLength( 0 ); m_HPGLPenOverlayOpt->SetToolTip( _("Set plot overlay for filling") ); bSizer21->Add( m_HPGLPenOverlayOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); @@ -289,6 +293,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer18->Add( m_staticText7, 0, wxRIGHT|wxLEFT, 5 ); m_fineAdjustXscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fineAdjustXscaleOpt->SetMaxLength( 0 ); m_fineAdjustXscaleOpt->SetToolTip( _("Set global X scale adjust for exact scale postscript output.") ); bSizer18->Add( m_fineAdjustXscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -304,6 +309,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer19->Add( m_staticText8, 0, wxRIGHT|wxLEFT, 5 ); m_fineAdjustYscaleOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_fineAdjustYscaleOpt->SetMaxLength( 0 ); m_fineAdjustYscaleOpt->SetToolTip( _("Set global Y scale adjust for exact scale postscript output.") ); bSizer19->Add( m_fineAdjustYscaleOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -319,6 +325,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr bSizer191->Add( m_textPSFineAdjustWidth, 0, wxRIGHT|wxLEFT, 5 ); m_PSFineAdjustWidthOpt = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_PSFineAdjustWidthOpt->SetMaxLength( 0 ); m_PSFineAdjustWidthOpt->SetToolTip( _("Set global width correction for exact width postscript output.\nThese width correction is intended to compensate tracks width and also pads and vias size errors.\nThe reasonable width correction value must be in a range of [-(MinTrackWidth-1), +(MinClearanceValue-1)] in decimils.") ); bSizer191->Add( m_PSFineAdjustWidthOpt, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); @@ -345,6 +352,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr sbSizerMsg = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); + m_messagesBox->SetMaxLength( 0 ); m_messagesBox->SetMinSize( wxSize( -1,70 ) ); sbSizerMsg->Add( m_messagesBox, 1, wxEXPAND, 5 ); @@ -377,23 +385,23 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_MainSizer->Fit( this ); m_popMenu = new wxMenu(); wxMenuItem* m_menuItem1; - m_menuItem1 = new wxMenuItem( m_popMenu, ID_LAYER_FAB, wxString( _("Select fab layers") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuItem1 = new wxMenuItem( m_popMenu, ID_LAYER_FAB, wxString( _("Select Fab Layers") ) , wxEmptyString, wxITEM_NORMAL ); m_popMenu->Append( m_menuItem1 ); wxMenuItem* m_menuItem2; - m_menuItem2 = new wxMenuItem( m_popMenu, ID_SELECT_COPPER_LAYERS, wxString( _("Select all copper layers") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuItem2 = new wxMenuItem( m_popMenu, ID_SELECT_COPPER_LAYERS, wxString( _("Select all Copper Layers") ) , wxEmptyString, wxITEM_NORMAL ); m_popMenu->Append( m_menuItem2 ); wxMenuItem* m_menuItem3; - m_menuItem3 = new wxMenuItem( m_popMenu, ID_DESELECT_COPPER_LAYERS, wxString( _("Deselect all copper layers") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuItem3 = new wxMenuItem( m_popMenu, ID_DESELECT_COPPER_LAYERS, wxString( _("Deselect all Copper Layers") ) , wxEmptyString, wxITEM_NORMAL ); m_popMenu->Append( m_menuItem3 ); wxMenuItem* m_menuItem4; - m_menuItem4 = new wxMenuItem( m_popMenu, ID_SELECT_ALL_LAYERS, wxString( _("Select all layers") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuItem4 = new wxMenuItem( m_popMenu, ID_SELECT_ALL_LAYERS, wxString( _("Select all Layers") ) , wxEmptyString, wxITEM_NORMAL ); m_popMenu->Append( m_menuItem4 ); wxMenuItem* m_menuItem5; - m_menuItem5 = new wxMenuItem( m_popMenu, ID_DESELECT_ALL_LAYERS, wxString( _("Deselect all layers") ) , wxEmptyString, wxITEM_NORMAL ); + m_menuItem5 = new wxMenuItem( m_popMenu, ID_DESELECT_ALL_LAYERS, wxString( _("Deselect all Layers") ) , wxEmptyString, wxITEM_NORMAL ); m_popMenu->Append( m_menuItem5 ); this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::DIALOG_PLOT_BASEOnContextMenu ), NULL, this ); @@ -407,6 +415,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ) ); m_plotFormatOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); + m_layerCheckListBox->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this ); m_scaleOpt->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this ); m_plotButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this ); m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this ); @@ -426,6 +435,7 @@ DIALOG_PLOT_BASE::~DIALOG_PLOT_BASE() this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ) ); m_plotFormatOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::SetPlotFormat ), NULL, this ); m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnOutputDirectoryBrowseClicked ), NULL, this ); + m_layerCheckListBox->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( DIALOG_PLOT_BASE::OnRightClick ), NULL, this ); m_scaleOpt->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_BASE::OnSetScaleOpt ), NULL, this ); m_plotButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::Plot ), NULL, this ); m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_BASE::CreateDrillFile ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_plot_base.fbp b/pcbnew/dialogs/dialog_plot_base.fbp index 906456e4bf..89dc372b83 100644 --- a/pcbnew/dialogs/dialog_plot_base.fbp +++ b/pcbnew/dialogs/dialog_plot_base.fbp @@ -680,7 +680,7 @@ - + OnRightClick @@ -4415,7 +4415,7 @@ ID_LAYER_FAB wxITEM_NORMAL - Select fab layers + Select Fab Layers m_menuItem1 none @@ -4430,7 +4430,7 @@ ID_SELECT_COPPER_LAYERS wxITEM_NORMAL - Select all copper layers + Select all Copper Layers m_menuItem2 none @@ -4445,7 +4445,7 @@ ID_DESELECT_COPPER_LAYERS wxITEM_NORMAL - Deselect all copper layers + Deselect all Copper Layers m_menuItem3 none @@ -4460,7 +4460,7 @@ ID_SELECT_ALL_LAYERS wxITEM_NORMAL - Select all layers + Select all Layers m_menuItem4 none @@ -4475,7 +4475,7 @@ ID_DESELECT_ALL_LAYERS wxITEM_NORMAL - Deselect all layers + Deselect all Layers m_menuItem5 none diff --git a/pcbnew/dialogs/dialog_plot_base.h b/pcbnew/dialogs/dialog_plot_base.h index 8875fd1adb..98473f84d7 100644 --- a/pcbnew/dialogs/dialog_plot_base.h +++ b/pcbnew/dialogs/dialog_plot_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include