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
26f2c04f
Commit
26f2c04f
authored
May 23, 2013
by
Lorenzo Marcantonio
Committed by
Wayne Stambaugh
May 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make title block date field modifiable by hand.
parent
82cc9233
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
3335 additions
and
2959 deletions
+3335
-2959
common.cpp
common/common.cpp
+12
-25
dialog_page_settings.cpp
common/dialogs/dialog_page_settings.cpp
+21
-0
dialog_page_settings.h
common/dialogs/dialog_page_settings.h
+6
-0
dialog_page_settings_base.cpp
common/dialogs/dialog_page_settings_base.cpp
+341
-309
dialog_page_settings_base.fbp
common/dialogs/dialog_page_settings_base.fbp
+2814
-2447
dialog_page_settings_base.h
common/dialogs/dialog_page_settings_base.h
+129
-115
worksheet.cpp
common/worksheet.cpp
+2
-4
annotate.cpp
eeschema/annotate.cpp
+0
-3
sch_screen.cpp
eeschema/sch_screen.cpp
+0
-12
schframe.cpp
eeschema/schframe.cpp
+0
-13
class_sch_screen.h
include/class_sch_screen.h
+0
-8
class_title_block.h
include/class_title_block.h
+1
-4
common.h
include/common.h
+9
-7
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+0
-3
files.cpp
pcbnew/files.cpp
+0
-9
No files found.
common/common.cpp
View file @
26f2c04f
...
@@ -289,31 +289,6 @@ wxArrayString* wxStringSplit( wxString aString, wxChar aSplitter )
...
@@ -289,31 +289,6 @@ wxArrayString* wxStringSplit( wxString aString, wxChar aSplitter )
}
}
/*
* Return the string date "day month year" like "23 jun 2005"
*/
wxString
GenDate
()
{
static
const
wxString
mois
[
12
]
=
{
wxT
(
"jan"
),
wxT
(
"feb"
),
wxT
(
"mar"
),
wxT
(
"apr"
),
wxT
(
"may"
),
wxT
(
"jun"
),
wxT
(
"jul"
),
wxT
(
"aug"
),
wxT
(
"sep"
),
wxT
(
"oct"
),
wxT
(
"nov"
),
wxT
(
"dec"
)
};
time_t
buftime
;
struct
tm
*
Date
;
wxString
string_date
;
time
(
&
buftime
);
Date
=
gmtime
(
&
buftime
);
string_date
.
Printf
(
wxT
(
"%d %s %d"
),
Date
->
tm_mday
,
GetChars
(
mois
[
Date
->
tm_mon
]
),
Date
->
tm_year
+
1900
);
return
string_date
;
}
int
ProcessExecute
(
const
wxString
&
aCommandLine
,
int
aFlags
,
wxProcess
*
callback
)
int
ProcessExecute
(
const
wxString
&
aCommandLine
,
int
aFlags
,
wxProcess
*
callback
)
{
{
return
wxExecute
(
aCommandLine
,
aFlags
,
callback
);
return
wxExecute
(
aCommandLine
,
aFlags
,
callback
);
...
@@ -357,3 +332,15 @@ double RoundTo0( double x, double precision )
...
@@ -357,3 +332,15 @@ double RoundTo0( double x, double precision )
return
(
double
)
ix
/
precision
;
return
(
double
)
ix
/
precision
;
}
}
wxString
FormatDateLong
(
const
wxDateTime
&
aDate
)
{
/* GetInfo was introduced only on wx 2.9; for portability reason an
* hardcoded format is used on wx 2.8 */
#if wxCHECK_VERSION( 2, 9, 0 )
return
aDate
.
Format
(
wxLocale
::
GetInfo
(
wxLOCALE_LONG_DATE_FMT
)
);
#else
return
aDate
.
Format
(
wxT
(
"%d %b %Y"
)
);
#endif
}
common/dialogs/dialog_page_settings.cpp
View file @
26f2c04f
...
@@ -182,6 +182,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
...
@@ -182,6 +182,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
}
}
m_TextRevision
->
SetValue
(
m_tb
.
GetRevision
()
);
m_TextRevision
->
SetValue
(
m_tb
.
GetRevision
()
);
m_TextDate
->
SetValue
(
m_tb
.
GetDate
()
);
m_TextTitle
->
SetValue
(
m_tb
.
GetTitle
()
);
m_TextTitle
->
SetValue
(
m_tb
.
GetTitle
()
);
m_TextCompany
->
SetValue
(
m_tb
.
GetCompany
()
);
m_TextCompany
->
SetValue
(
m_tb
.
GetCompany
()
);
m_TextComment1
->
SetValue
(
m_tb
.
GetComment1
()
);
m_TextComment1
->
SetValue
(
m_tb
.
GetComment1
()
);
...
@@ -191,6 +192,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
...
@@ -191,6 +192,7 @@ void DIALOG_PAGES_SETTINGS::initDialog()
#ifndef EESCHEMA
#ifndef EESCHEMA
m_RevisionExport
->
Show
(
false
);
m_RevisionExport
->
Show
(
false
);
m_DateExport
->
Show
(
false
);
m_TitleExport
->
Show
(
false
);
m_TitleExport
->
Show
(
false
);
m_CompanyExport
->
Show
(
false
);
m_CompanyExport
->
Show
(
false
);
m_Comment1Export
->
Show
(
false
);
m_Comment1Export
->
Show
(
false
);
...
@@ -310,6 +312,17 @@ void DIALOG_PAGES_SETTINGS::OnRevisionTextUpdated( wxCommandEvent& event )
...
@@ -310,6 +312,17 @@ void DIALOG_PAGES_SETTINGS::OnRevisionTextUpdated( wxCommandEvent& event )
}
}
void
DIALOG_PAGES_SETTINGS
::
OnDateTextUpdated
(
wxCommandEvent
&
event
)
{
if
(
m_initialized
&&
m_TextDate
->
IsModified
()
)
{
GetPageLayoutInfoFromDialog
();
m_tb
.
SetDate
(
m_TextDate
->
GetValue
()
);
UpdatePageLayoutExample
();
}
}
void
DIALOG_PAGES_SETTINGS
::
OnTitleTextUpdated
(
wxCommandEvent
&
event
)
void
DIALOG_PAGES_SETTINGS
::
OnTitleTextUpdated
(
wxCommandEvent
&
event
)
{
{
if
(
m_initialized
&&
m_TextTitle
->
IsModified
()
)
if
(
m_initialized
&&
m_TextTitle
->
IsModified
()
)
...
@@ -375,6 +388,10 @@ void DIALOG_PAGES_SETTINGS::OnComment4TextUpdated( wxCommandEvent& event )
...
@@ -375,6 +388,10 @@ void DIALOG_PAGES_SETTINGS::OnComment4TextUpdated( wxCommandEvent& event )
}
}
}
}
void
DIALOG_PAGES_SETTINGS
::
OnDateApplyClick
(
wxCommandEvent
&
event
)
{
m_TextDate
->
SetValue
(
FormatDateLong
(
m_PickDate
->
GetValue
()
)
);
}
void
DIALOG_PAGES_SETTINGS
::
SavePageSettings
(
wxCommandEvent
&
event
)
void
DIALOG_PAGES_SETTINGS
::
SavePageSettings
(
wxCommandEvent
&
event
)
{
{
...
@@ -471,6 +488,7 @@ limits\n%.1f - %.1f %s!\nSelect another custom paper size?" ),
...
@@ -471,6 +488,7 @@ limits\n%.1f - %.1f %s!\nSelect another custom paper size?" ),
m_Parent
->
SetPageSettings
(
m_pageInfo
);
m_Parent
->
SetPageSettings
(
m_pageInfo
);
m_tb
.
SetRevision
(
m_TextRevision
->
GetValue
()
);
m_tb
.
SetRevision
(
m_TextRevision
->
GetValue
()
);
m_tb
.
SetDate
(
m_TextDate
->
GetValue
()
);
m_tb
.
SetCompany
(
m_TextCompany
->
GetValue
()
);
m_tb
.
SetCompany
(
m_TextCompany
->
GetValue
()
);
m_tb
.
SetTitle
(
m_TextTitle
->
GetValue
()
);
m_tb
.
SetTitle
(
m_TextTitle
->
GetValue
()
);
m_tb
.
SetComment1
(
m_TextComment1
->
GetValue
()
);
m_tb
.
SetComment1
(
m_TextComment1
->
GetValue
()
);
...
@@ -498,6 +516,9 @@ limits\n%.1f - %.1f %s!\nSelect another custom paper size?" ),
...
@@ -498,6 +516,9 @@ limits\n%.1f - %.1f %s!\nSelect another custom paper size?" ),
if
(
m_RevisionExport
->
IsChecked
()
)
if
(
m_RevisionExport
->
IsChecked
()
)
tb2
.
SetRevision
(
m_tb
.
GetRevision
()
);
tb2
.
SetRevision
(
m_tb
.
GetRevision
()
);
if
(
m_DateExport
->
IsChecked
()
)
tb2
.
SetDate
(
m_tb
.
GetDate
()
);
if
(
m_TitleExport
->
IsChecked
()
)
if
(
m_TitleExport
->
IsChecked
()
)
tb2
.
SetTitle
(
m_tb
.
GetTitle
()
);
tb2
.
SetTitle
(
m_tb
.
GetTitle
()
);
...
...
common/dialogs/dialog_page_settings.h
View file @
26f2c04f
...
@@ -79,6 +79,9 @@ private:
...
@@ -79,6 +79,9 @@ private:
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_REVISION
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_REVISION
void
OnRevisionTextUpdated
(
wxCommandEvent
&
event
);
void
OnRevisionTextUpdated
(
wxCommandEvent
&
event
);
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_DATE
void
OnDateTextUpdated
(
wxCommandEvent
&
event
);
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_TITLE
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_TITLE
void
OnTitleTextUpdated
(
wxCommandEvent
&
event
);
void
OnTitleTextUpdated
(
wxCommandEvent
&
event
);
...
@@ -97,6 +100,9 @@ private:
...
@@ -97,6 +100,9 @@ private:
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_COMMENT4
/// exEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL_COMMENT4
void
OnComment4TextUpdated
(
wxCommandEvent
&
event
);
void
OnComment4TextUpdated
(
wxCommandEvent
&
event
);
/// Handle button click for setting the date from the picker
virtual
void
OnDateApplyClick
(
wxCommandEvent
&
event
);
void
SetCurrentPageSizeSelection
(
const
wxString
&
aPaperSize
);
void
SetCurrentPageSizeSelection
(
const
wxString
&
aPaperSize
);
void
SavePageSettings
(
wxCommandEvent
&
event
);
void
SavePageSettings
(
wxCommandEvent
&
event
);
...
...
common/dialogs/dialog_page_settings_base.cpp
View file @
26f2c04f
This diff is collapsed.
Click to expand it.
common/dialogs/dialog_page_settings_base.fbp
View file @
26f2c04f
This diff is collapsed.
Click to expand it.
common/dialogs/dialog_page_settings_base.h
View file @
26f2c04f
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/
// http://www.wxformbuilder.org/
//
//
// PLEASE DO "NOT" EDIT THIS FILE!
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
#ifndef __DIALOG_PAGE_SETTINGS_BASE_H__
#ifndef __DIALOG_PAGE_SETTINGS_BASE_H__
#define __DIALOG_PAGE_SETTINGS_BASE_H__
#define __DIALOG_PAGE_SETTINGS_BASE_H__
#include <wx/artprov.h>
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/intl.h>
#include "dialog_shim.h"
class
DIALOG_SHIM
;
#include <wx/string.h>
#include <wx/stattext.h>
#include "dialog_shim.h"
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <wx/font.h>
#include <wx/stattext.h>
#include <wx/colour.h>
#include <wx/gdicmn.h>
#include <wx/settings.h>
#include <wx/font.h>
#include <wx/choice.h>
#include <wx/colour.h>
#include <wx/textctrl.h>
#include <wx/settings.h>
#include <wx/valtext.h>
#include <wx/choice.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <wx/statbox.h>
#include <wx/valtext.h>
#include <wx/bitmap.h>
#include <wx/sizer.h>
#include <wx/image.h>
#include <wx/statbox.h>
#include <wx/icon.h>
#include <wx/bitmap.h>
#include <wx/statbmp.h>
#include <wx/image.h>
#include <wx/checkbox.h>
#include <wx/icon.h>
#include <wx/button.h>
#include <wx/statbmp.h>
#include <wx/dialog.h>
#include <wx/checkbox.h>
#include <wx/button.h>
///////////////////////////////////////////////////////////////////////////
#include <wx/datectrl.h>
#include <wx/dateevt.h>
#define ID_CHICE_PAGE_SIZE 1000
#include <wx/dialog.h>
#define ID_CHOICE_PAGE_ORIENTATION 1001
#define ID_TEXTCTRL_USER_PAGE_SIZE_X 1002
///////////////////////////////////////////////////////////////////////////
#define ID_TEXTCTRL_USER_PAGE_SIZE_Y 1003
#define ID_PAGE_LAYOUT_EXAMPLE_SIZER 1004
#define ID_CHICE_PAGE_SIZE 1000
#define ID_TEXTCTRL_REVISION 1005
#define ID_CHOICE_PAGE_ORIENTATION 1001
#define ID_CHECKBOX_REVISION 1006
#define ID_TEXTCTRL_USER_PAGE_SIZE_X 1002
#define ID_TEXTCTRL_TITLE 1007
#define ID_TEXTCTRL_USER_PAGE_SIZE_Y 1003
#define ID_TEXTCTRL_COMPANY 1008
#define ID_PAGE_LAYOUT_EXAMPLE_SIZER 1004
#define ID_CHECKBOX_COMPANY 1009
#define ID_TEXTCTRL_REVISION 1005
#define ID_TEXTCTRL_COMMENT1 1010
#define ID_CHECKBOX_REVISION 1006
#define ID_CHECKBOX_COMMENT1 1011
#define ID_TEXTCTRL_DATE 1007
#define ID_TEXTCTRL_COMMENT2 1012
#define ID_BTN_APPLY_DATE 1008
#define ID_CHECKBOX_COMMENT2 1013
#define ID_PICKER_DATE 1009
#define ID_TEXTCTRL_COMMENT3 1014
#define ID_CHECKBOX_DATE 1010
#define ID_CHECKBOX_COMMENT3 1015
#define ID_TEXTCTRL_TITLE 1011
#define ID_TEXTCTRL_COMMENT4 1016
#define ID_TEXTCTRL_COMPANY 1012
#define ID_CHECKBOX_COMMENT4 1017
#define ID_CHECKBOX_COMPANY 1013
#define ID_TEXTCTRL_COMMENT1 1014
///////////////////////////////////////////////////////////////////////////////
#define ID_CHECKBOX_COMMENT1 1015
/// Class DIALOG_PAGES_SETTINGS_BASE
#define ID_TEXTCTRL_COMMENT2 1016
///////////////////////////////////////////////////////////////////////////////
#define ID_CHECKBOX_COMMENT2 1017
class
DIALOG_PAGES_SETTINGS_BASE
:
public
DIALOG_SHIM
#define ID_TEXTCTRL_COMMENT3 1018
{
#define ID_CHECKBOX_COMMENT3 1019
private
:
#define ID_TEXTCTRL_COMMENT4 1020
#define ID_CHECKBOX_COMMENT4 1021
protected
:
wxStaticText
*
m_staticText5
;
///////////////////////////////////////////////////////////////////////////////
wxChoice
*
m_paperSizeComboBox
;
/// Class DIALOG_PAGES_SETTINGS_BASE
wxStaticText
*
m_staticText6
;
///////////////////////////////////////////////////////////////////////////////
wxChoice
*
m_orientationComboBox
;
class
DIALOG_PAGES_SETTINGS_BASE
:
public
DIALOG_SHIM
wxTextCtrl
*
m_TextUserSizeX
;
{
wxTextCtrl
*
m_TextUserSizeY
;
private
:
wxStaticBitmap
*
m_PageLayoutExampleBitmap
;
wxStaticText
*
m_TextSheetCount
;
protected
:
wxStaticText
*
m_TextSheetNumber
;
wxStaticText
*
m_staticText5
;
wxTextCtrl
*
m_TextRevision
;
wxChoice
*
m_paperSizeComboBox
;
wxCheckBox
*
m_RevisionExport
;
wxStaticText
*
m_staticText6
;
wxTextCtrl
*
m_TextTitle
;
wxChoice
*
m_orientationComboBox
;
wxCheckBox
*
m_TitleExport
;
wxTextCtrl
*
m_TextUserSizeX
;
wxTextCtrl
*
m_TextCompany
;
wxTextCtrl
*
m_TextUserSizeY
;
wxCheckBox
*
m_CompanyExport
;
wxStaticBitmap
*
m_PageLayoutExampleBitmap
;
wxTextCtrl
*
m_TextComment1
;
wxStaticText
*
m_TextSheetCount
;
wxCheckBox
*
m_Comment1Export
;
wxStaticText
*
m_TextSheetNumber
;
wxTextCtrl
*
m_TextComment2
;
wxTextCtrl
*
m_TextRevision
;
wxCheckBox
*
m_Comment2Export
;
wxCheckBox
*
m_RevisionExport
;
wxTextCtrl
*
m_TextComment3
;
wxTextCtrl
*
m_TextDate
;
wxCheckBox
*
m_Comment3Export
;
wxButton
*
m_ApplyDate
;
wxTextCtrl
*
m_TextComment4
;
wxDatePickerCtrl
*
m_PickDate
;
wxCheckBox
*
m_Comment4Export
;
wxCheckBox
*
m_DateExport
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
wxTextCtrl
*
m_TextTitle
;
wxButton
*
m_sdbSizer1OK
;
wxCheckBox
*
m_TitleExport
;
wxButton
*
m_sdbSizer1Cancel
;
wxTextCtrl
*
m_TextCompany
;
wxCheckBox
*
m_CompanyExport
;
// Virtual event handlers, overide them in your derived class
wxTextCtrl
*
m_TextComment1
;
virtual
void
OnCloseWindow
(
wxCloseEvent
&
event
)
{
event
.
Skip
();
}
wxCheckBox
*
m_Comment1Export
;
virtual
void
OnPaperSizeChoice
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxTextCtrl
*
m_TextComment2
;
virtual
void
OnPageOrientationChoice
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxCheckBox
*
m_Comment2Export
;
virtual
void
OnUserPageSizeXTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxTextCtrl
*
m_TextComment3
;
virtual
void
OnUserPageSizeYTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxCheckBox
*
m_Comment3Export
;
virtual
void
OnRevisionTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxTextCtrl
*
m_TextComment4
;
virtual
void
OnTitleTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxCheckBox
*
m_Comment4Export
;
virtual
void
OnCheckboxTitleClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxStdDialogButtonSizer
*
m_sdbSizer1
;
virtual
void
OnCompanyTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxButton
*
m_sdbSizer1OK
;
virtual
void
OnComment1TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
wxButton
*
m_sdbSizer1Cancel
;
virtual
void
OnComment2TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnComment3TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
// Virtual event handlers, overide them in your derived class
virtual
void
OnComment4TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCloseWindow
(
wxCloseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnPaperSizeChoice
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnOkClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnPageOrientationChoice
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnUserPageSizeXTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnUserPageSizeYTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
virtual
void
OnRevisionTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnDateTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
DIALOG_PAGES_SETTINGS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Page Settings"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
748
,
495
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
virtual
void
OnDateApplyClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
~
DIALOG_PAGES_SETTINGS_BASE
();
virtual
void
OnTitleTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCheckboxTitleClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
};
virtual
void
OnCompanyTextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnComment1TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
#endif //__DIALOG_PAGE_SETTINGS_BASE_H__
virtual
void
OnComment2TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnComment3TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnComment4TextUpdated
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnOkClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_PAGES_SETTINGS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Page Settings"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
748
,
495
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_PAGES_SETTINGS_BASE
();
};
#endif //__DIALOG_PAGE_SETTINGS_BASE_H__
common/worksheet.cpp
View file @
26f2c04f
...
@@ -222,21 +222,19 @@ void TITLE_BLOCK::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aCont
...
@@ -222,21 +222,19 @@ void TITLE_BLOCK::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aCont
throw
(
IO_ERROR
)
throw
(
IO_ERROR
)
{
{
// Don't write the title block information if there is nothing to write.
// Don't write the title block information if there is nothing to write.
if
(
!
m_title
.
IsEmpty
()
||
/* !m_date.IsEmpty() || */
!
m_revision
.
IsEmpty
()
if
(
!
m_title
.
IsEmpty
()
||
!
m_date
.
IsEmpty
()
||
!
m_revision
.
IsEmpty
()
||
!
m_company
.
IsEmpty
()
||
!
m_comment1
.
IsEmpty
()
||
!
m_comment2
.
IsEmpty
()
||
!
m_company
.
IsEmpty
()
||
!
m_comment1
.
IsEmpty
()
||
!
m_comment2
.
IsEmpty
()
||
!
m_comment3
.
IsEmpty
()
||
!
m_comment4
.
IsEmpty
()
)
||
!
m_comment3
.
IsEmpty
()
||
!
m_comment4
.
IsEmpty
()
)
{
{
aFormatter
->
Print
(
aNestLevel
,
"(title_block
\n
"
);
aFormatter
->
Print
(
aNestLevel
,
"(title_block
\n
"
);
if
(
!
m_title
.
IsEmpty
()
)
if
(
!
m_title
.
IsEmpty
()
)
aFormatter
->
Print
(
aNestLevel
+
1
,
"(title %s)
\n
"
,
aFormatter
->
Print
(
aNestLevel
+
1
,
"(title %s)
\n
"
,
aFormatter
->
Quotew
(
m_title
).
c_str
()
);
aFormatter
->
Quotew
(
m_title
).
c_str
()
);
/* version control users were complaining, see mailing list.
if
(
!
m_date
.
IsEmpty
()
)
if
(
!
m_date
.
IsEmpty
()
)
aFormatter
->
Print
(
aNestLevel
+
1
,
"(date %s)
\n
"
,
aFormatter
->
Print
(
aNestLevel
+
1
,
"(date %s)
\n
"
,
aFormatter
->
Quotew
(
m_date
).
c_str
()
);
aFormatter
->
Quotew
(
m_date
).
c_str
()
);
*/
if
(
!
m_revision
.
IsEmpty
()
)
if
(
!
m_revision
.
IsEmpty
()
)
aFormatter
->
Print
(
aNestLevel
+
1
,
"(rev %s)
\n
"
,
aFormatter
->
Print
(
aNestLevel
+
1
,
"(rev %s)
\n
"
,
...
...
eeschema/annotate.cpp
View file @
26f2c04f
...
@@ -71,9 +71,6 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic,
...
@@ -71,9 +71,6 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic,
if
(
aResetAnnotation
)
if
(
aResetAnnotation
)
DeleteAnnotation
(
!
aAnnotateSchematic
);
DeleteAnnotation
(
!
aAnnotateSchematic
);
// Update the screen date.
screens
.
SetDate
(
GenDate
()
);
// Set sheet number and number of sheets.
// Set sheet number and number of sheets.
SetSheetNumberAndCount
();
SetSheetNumberAndCount
();
...
...
eeschema/sch_screen.cpp
View file @
26f2c04f
...
@@ -153,7 +153,6 @@ void SCH_SCREEN::Clear()
...
@@ -153,7 +153,6 @@ void SCH_SCREEN::Clear()
m_ScreenNumber
=
m_NumberOfScreens
=
1
;
m_ScreenNumber
=
m_NumberOfScreens
=
1
;
m_titles
.
Clear
();
m_titles
.
Clear
();
m_titles
.
SetDate
();
}
}
...
@@ -1455,17 +1454,6 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps()
...
@@ -1455,17 +1454,6 @@ int SCH_SCREENS::ReplaceDuplicateTimeStamps()
}
}
void
SCH_SCREENS
::
SetDate
(
const
wxString
&
aDate
)
{
for
(
size_t
i
=
0
;
i
<
m_screens
.
size
();
i
++
)
{
TITLE_BLOCK
tb
=
m_screens
[
i
]
->
GetTitleBlock
();
tb
.
SetDate
(
aDate
);
m_screens
[
i
]
->
SetTitleBlock
(
tb
);
}
}
void
SCH_SCREENS
::
DeleteAllMarkers
(
int
aMarkerType
)
void
SCH_SCREENS
::
DeleteAllMarkers
(
int
aMarkerType
)
{
{
SCH_ITEM
*
item
;
SCH_ITEM
*
item
;
...
...
eeschema/schframe.cpp
View file @
26f2c04f
...
@@ -352,10 +352,6 @@ void SCH_EDIT_FRAME::CreateScreens()
...
@@ -352,10 +352,6 @@ void SCH_EDIT_FRAME::CreateScreens()
g_RootSheet
->
GetScreen
()
->
SetFileName
(
m_DefaultSchematicFileName
);
g_RootSheet
->
GetScreen
()
->
SetFileName
(
m_DefaultSchematicFileName
);
TITLE_BLOCK
tb
=
g_RootSheet
->
GetScreen
()
->
GetTitleBlock
();
tb
.
SetDate
();
g_RootSheet
->
GetScreen
()
->
SetTitleBlock
(
tb
);
m_CurrentSheet
->
Clear
();
m_CurrentSheet
->
Clear
();
m_CurrentSheet
->
Push
(
g_RootSheet
);
m_CurrentSheet
->
Push
(
g_RootSheet
);
...
@@ -560,15 +556,6 @@ void SCH_EDIT_FRAME::OnModify()
...
@@ -560,15 +556,6 @@ void SCH_EDIT_FRAME::OnModify()
if
(
m_dlgFindReplace
==
NULL
)
if
(
m_dlgFindReplace
==
NULL
)
m_foundItems
.
SetForceSearch
();
m_foundItems
.
SetForceSearch
();
SCH_SCREENS
s_list
;
// Set the date for each sheet
// There are 2 possibilities:
// >> change only the current sheet
// >> change all sheets.
// I believe all sheets in a project must have the same date
s_list
.
SetDate
();
}
}
...
...
include/class_sch_screen.h
View file @
26f2c04f
...
@@ -546,14 +546,6 @@ public:
...
@@ -546,14 +546,6 @@ public:
*/
*/
int
ReplaceDuplicateTimeStamps
();
int
ReplaceDuplicateTimeStamps
();
/**
* Function SetDate
* sets the date string for every screen to \a aDate.
* @see GetDate()
* @param aDate The date string to set for each screen.
*/
void
SetDate
(
const
wxString
&
aDate
=
GenDate
()
);
/**
/**
* Function DeleteAllMarkers
* Function DeleteAllMarkers
* deletes all electronic rules check markers of \a aMarkerType from all the screens in
* deletes all electronic rules check markers of \a aMarkerType from all the screens in
...
...
include/class_title_block.h
View file @
26f2c04f
...
@@ -30,9 +30,6 @@ class OUTPUTFORMATTER;
...
@@ -30,9 +30,6 @@ class OUTPUTFORMATTER;
struct
IO_ERROR
;
struct
IO_ERROR
;
extern
wxString
GenDate
();
/**
/**
* Class TITLE_BLOCK
* Class TITLE_BLOCK
* holds the information shown in the lower right corner of a plot, printout, or
* holds the information shown in the lower right corner of a plot, printout, or
...
@@ -54,7 +51,7 @@ public:
...
@@ -54,7 +51,7 @@ public:
* Function SetDate
* Function SetDate
* sets the date field, and defaults to the current time and date.
* sets the date field, and defaults to the current time and date.
*/
*/
void
SetDate
(
const
wxString
&
aDate
=
GenDate
()
)
{
m_date
=
aDate
;
}
void
SetDate
(
const
wxString
&
aDate
)
{
m_date
=
aDate
;
}
const
wxString
&
GetDate
()
const
{
return
m_date
;
}
const
wxString
&
GetDate
()
const
{
return
m_date
;
}
void
SetRevision
(
const
wxString
&
aRevision
)
{
m_revision
=
aRevision
;
}
void
SetRevision
(
const
wxString
&
aRevision
)
{
m_revision
=
aRevision
;
}
...
...
include/common.h
View file @
26f2c04f
...
@@ -620,13 +620,6 @@ double RoundTo0( double x, double precision );
...
@@ -620,13 +620,6 @@ double RoundTo0( double x, double precision );
*/
*/
wxArrayString
*
wxStringSplit
(
wxString
aString
,
wxChar
aSplitter
);
wxArrayString
*
wxStringSplit
(
wxString
aString
,
wxChar
aSplitter
);
/**
* Function GenDate
* @return A wxString object containing the date in the format "day month year" like
* "23 jun 2005".
*/
wxString
GenDate
();
/**
/**
* Function GetRunningMicroSecs
* Function GetRunningMicroSecs
* returns an ever increasing indication of elapsed microseconds. Use this
* returns an ever increasing indication of elapsed microseconds. Use this
...
@@ -635,4 +628,13 @@ wxString GenDate();
...
@@ -635,4 +628,13 @@ wxString GenDate();
*/
*/
unsigned
GetRunningMicroSecs
();
unsigned
GetRunningMicroSecs
();
/**
* Formats a wxDateTime using the long date format (on wx 2.9) or
* an hardcoded format in wx 2.8; the idea is to avoid like the plague
* the numeric-only date formats: it's difficult to discriminate between
* dd/mm/yyyy and mm/dd/yyyy. The output is meant for user consumption
* so no attempt to parse it should be done
*/
wxString
FormatDateLong
(
const
wxDateTime
&
aDate
);
#endif // INCLUDE__COMMON_H_
#endif // INCLUDE__COMMON_H_
pcbnew/basepcbframe.cpp
View file @
26f2c04f
...
@@ -738,9 +738,6 @@ void PCB_BASE_FRAME::OnModify()
...
@@ -738,9 +738,6 @@ void PCB_BASE_FRAME::OnModify()
{
{
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetSave
();
GetScreen
()
->
SetSave
();
wxASSERT
(
m_Pcb
);
m_Pcb
->
GetTitleBlock
().
SetDate
();
}
}
...
...
pcbnew/files.cpp
View file @
26f2c04f
...
@@ -491,15 +491,6 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
...
@@ -491,15 +491,6 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF
}
}
}
}
// If changes are made, update the board date
if
(
GetScreen
()
->
IsModify
()
)
{
TITLE_BLOCK
tb
=
GetTitleBlock
();
tb
.
SetDate
();
SetTitleBlock
(
tb
);
}
if
(
!
IsWritable
(
pcbFileName
)
)
if
(
!
IsWritable
(
pcbFileName
)
)
return
false
;
return
false
;
...
...
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