Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
40c27660
Commit
40c27660
authored
Oct 14, 2014
by
Brian Sidebotham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Commit before merge
parent
6f1b2e82
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
101 deletions
+21
-101
dialog_eeschema_options.cpp
eeschema/dialogs/dialog_eeschema_options.cpp
+15
-7
dialog_eeschema_options.h
eeschema/dialogs/dialog_eeschema_options.h
+1
-0
dialog_eeschema_options_base.cpp
eeschema/dialogs/dialog_eeschema_options_base.cpp
+2
-5
dialog_eeschema_options_base.fbp
eeschema/dialogs/dialog_eeschema_options_base.fbp
+3
-87
dialog_eeschema_options_base.h
eeschema/dialogs/dialog_eeschema_options_base.h
+0
-2
No files found.
eeschema/dialogs/dialog_eeschema_options.cpp
View file @
40c27660
...
...
@@ -72,15 +72,15 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
selectedField
=
-
1
;
ignoreSelection
=
false
;
// Set the html help for th template editor
m_htmlWin2
->
SetPage
(
_
(
"<b>Template Field Names</b><br>"
"<p>Field names must be unique, and should be alpha-numeric only</p>"
"<p>Some field names are reserved and cannot be used. The following fieldnames are "
"reserved:</p>"
)
);
// Make sure we select the first tab of the options tab page
m_notebook1
->
SetSelection
(
0
);
// Connect the edit controls for the template field names to the kill focus event which
// doesn't propogate, hence the need to connect it here.
fieldNameTextCtrl
->
Connect
(
wxEVT_KILL_FOCUS
,
wxFocusEventHandler
(
DIALOG_EESCHEMA_OPTIONS
::
OnEditControlKillFocus
),
NULL
,
this
);
fieldDefaultValueTextCtrl
->
Connect
(
wxEVT_KILL_FOCUS
,
wxFocusEventHandler
(
DIALOG_EESCHEMA_OPTIONS
::
OnEditControlKillFocus
),
NULL
,
this
);
fieldVisibleCheckbox
->
Connect
(
wxEVT_KILL_FOCUS
,
wxFocusEventHandler
(
DIALOG_EESCHEMA_OPTIONS
::
OnEditControlKillFocus
),
NULL
,
this
);
}
...
...
@@ -262,6 +262,14 @@ void DIALOG_EESCHEMA_OPTIONS::copyPanelToSelected( void )
}
void
DIALOG_EESCHEMA_OPTIONS
::
OnEditControlKillFocus
(
wxFocusEvent
&
event
)
{
// Update the data + UI
copyPanelToSelected
();
RefreshTemplateFieldView
();
}
void
DIALOG_EESCHEMA_OPTIONS
::
copySelectedToPanel
(
void
)
{
if
(
(
selectedField
<
0
)
||
(
selectedField
>=
templateFields
.
size
()
)
)
...
...
eeschema/dialogs/dialog_eeschema_options.h
View file @
40c27660
...
...
@@ -71,6 +71,7 @@ protected:
*/
void
OnDeleteButtonClick
(
wxCommandEvent
&
event
);
void
OnInitDialog
(
wxInitDialogEvent
&
event
);
void
OnEditControlKillFocus
(
wxFocusEvent
&
event
);
/**
* Function copyPanelToSelected
...
...
eeschema/dialogs/dialog_eeschema_options_base.cpp
View file @
40c27660
...
...
@@ -223,7 +223,7 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
bSizer6
->
Add
(
templateFieldListCtrl
,
1
,
wxALIGN_TOP
|
wxBOTTOM
|
wxEXPAND
|
wxLEFT
|
wxRIGHT
|
wxTOP
,
8
);
wxStaticBoxSizer
*
fieldSizer
;
fieldSizer
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
m_panel2
,
wxID_ANY
,
_
(
"Field"
)
),
wxVERTICAL
);
fieldSizer
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
m_panel2
,
wxID_ANY
,
_
(
"Field
Settings
"
)
),
wxVERTICAL
);
fieldNameLabel
=
new
wxStaticText
(
m_panel2
,
wxID_ANY
,
_
(
"Name"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
fieldNameLabel
->
Wrap
(
-
1
);
...
...
@@ -242,11 +242,8 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
fieldVisibleCheckbox
=
new
wxCheckBox
(
m_panel2
,
wxID_ANY
,
_
(
"Visible"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
fieldSizer
->
Add
(
fieldVisibleCheckbox
,
0
,
wxALL
,
5
);
m_htmlWin2
=
new
wxHtmlWindow
(
m_panel2
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxHW_SCROLLBAR_AUTO
);
fieldSizer
->
Add
(
m_htmlWin2
,
1
,
wxALL
|
wxEXPAND
,
5
);
bSizer6
->
Add
(
fieldSizer
,
1
,
wxEXPAND
,
5
);
bSizer6
->
Add
(
fieldSizer
,
0
,
wxEXPAND
,
5
);
addFieldButton
=
new
wxButton
(
m_panel2
,
wxID_ADD_FIELD
,
_
(
"Add"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
bSizer6
->
Add
(
addFieldButton
,
0
,
wxALL
|
wxEXPAND
,
5
);
...
...
eeschema/dialogs/dialog_eeschema_options_base.fbp
View file @
40c27660
...
...
@@ -1961,7 +1961,7 @@
<property
name=
"permission"
>
protected
</property>
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"resize"
>
Fixed
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
></property>
...
...
@@ -3607,10 +3607,10 @@
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"1"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Field
</property>
<property
name=
"label"
>
Field
Settings
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
fieldSizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
...
...
@@ -4052,90 +4052,6 @@
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxHtmlWindow"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
<property
name=
"TopDockable"
>
1
</property>
<property
name=
"aui_layer"
></property>
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"center_pane"
>
0
</property>
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<property
name=
"context_menu"
>
1
</property>
<property
name=
"default_pane"
>
0
</property>
<property
name=
"dock"
>
Dock
</property>
<property
name=
"dock_fixed"
>
0
</property>
<property
name=
"docking"
>
Left
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"min_size"
></property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_htmlWin2
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxHW_SCROLLBAR_AUTO
</property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnHtmlCellClicked"
></event>
<event
name=
"OnHtmlCellHover"
></event>
<event
name=
"OnHtmlLinkClicked"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
<event
name=
"OnMiddleUp"
></event>
<event
name=
"OnMotion"
></event>
<event
name=
"OnMouseEvents"
></event>
<event
name=
"OnMouseWheel"
></event>
<event
name=
"OnPaint"
></event>
<event
name=
"OnRightDClick"
></event>
<event
name=
"OnRightDown"
></event>
<event
name=
"OnRightUp"
></event>
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"0"
>
...
...
eeschema/dialogs/dialog_eeschema_options_base.h
View file @
40c27660
...
...
@@ -31,7 +31,6 @@ class DIALOG_SHIM;
#include <wx/icon.h>
#include <wx/listctrl.h>
#include <wx/textctrl.h>
#include <wx/html/htmlwin.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/notebook.h>
...
...
@@ -111,7 +110,6 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public DIALOG_SHIM
wxStaticText
*
fieldDefaultValueLabel
;
wxTextCtrl
*
fieldDefaultValueTextCtrl
;
wxCheckBox
*
fieldVisibleCheckbox
;
wxHtmlWindow
*
m_htmlWin2
;
wxButton
*
addFieldButton
;
wxButton
*
deleteFieldButton
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment