Patch #2835 2009-10-09 09:25
jgm
Autoversioning refinement and fixes- Download
- 2835-Autoversioning.patch (28.7 KB)
Index: src/plugins/contrib/AutoVersioning/avConfig.h
===================================================================
--- src/plugins/contrib/AutoVersioning/avConfig.h (revision 5857)
+++ src/plugins/contrib/AutoVersioning/avConfig.h (working copy)
@@ -42,6 +42,21 @@
RevisionMax != Other.RevisionMax || RevisionRandMax != Other.RevisionRandMax ||
BuildTimesToIncrementMinor != Other.BuildTimesToIncrementMinor);
}
+};
+
+struct avCode
+{
+ std::string HeaderGuard;
+ std::string NameSpace;
+ std::string Prefix;
+
+ avCode() : HeaderGuard("VERSION_H"), NameSpace("AutoVersion"), Prefix(""){}
+
+ bool operator!=(const avCode& Other) const
+ {
+ return (HeaderGuard != Other.HeaderGuard || NameSpace != Other.NameSpace ||
+ Prefix != Other.Prefix);
+ }
};
struct avSettings
@@ -80,7 +95,8 @@
};
struct avConfig
-{
+{
+ avCode Code;
avScheme Scheme;
avSettings Settings;
avChangesLog ChangesLog;
@@ -88,7 +104,7 @@
bool operator!=(const avConfig& Other) const
{
return (Scheme != Other.Scheme || Settings != Other.Settings ||
- ChangesLog != Other.ChangesLog);
+ ChangesLog != Other.ChangesLog || Code != Other.Code);
}
};
Index: src/plugins/contrib/AutoVersioning/avVersionEditorDlg.cpp
===================================================================
--- src/plugins/contrib/AutoVersioning/avVersionEditorDlg.cpp (revision 5857)
+++ src/plugins/contrib/AutoVersioning/avVersionEditorDlg.cpp (working copy)
@@ -46,6 +46,13 @@
const long avVersionEditorDlg::ID_BUILDTIMES_LABEL = wxNewId();
const long avVersionEditorDlg::ID_BUILDTIMES_TEXT = wxNewId();
const long avVersionEditorDlg::ID_SCHEME_PANEL = wxNewId();
+const long avVersionEditorDlg::ID_HEADER_GUARD_LABEL = wxNewId();
+const long avVersionEditorDlg::ID_HEADER_GUARD_TEXT = wxNewId();
+const long avVersionEditorDlg::ID_NAMESPACE_LABEL = wxNewId();
+const long avVersionEditorDlg::ID_NAMESPACE_TEXT = wxNewId();
+const long avVersionEditorDlg::ID_PREFIX_LABEL = wxNewId();
+const long avVersionEditorDlg::ID_PREFIX_TEXT = wxNewId();
+const long avVersionEditorDlg::ID_CODE_PANEL = wxNewId();
const long avVersionEditorDlg::ID_AUTO_CHECK = wxNewId();
const long avVersionEditorDlg::ID_DATES_CHECK = wxNewId();
const long avVersionEditorDlg::ID_COMMIT_CHECK = wxNewId();
@@ -93,6 +100,7 @@
wxBoxSizer* BoxSizer13;
wxBoxSizer* BoxSizer11;
wxBoxSizer* BoxSizer14;
+ wxBoxSizer* codeSizer;
Create(parent, wxID_ANY, _("Auto Versioning Editor"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxRESIZE_BORDER, _T("wxID_ANY"));
SetClientSize(wxSize(469,364));
@@ -150,7 +158,7 @@
lblStatus = new wxStaticText(pnlStatus, ID_SATUS_LABEL, _("Software Status:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_SATUS_LABEL"));
statusSizer->Add(lblStatus, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
cmbStatus = new wxComboBox(pnlStatus, ID_STATUS_COMBOBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_STATUS_COMBOBOX"));
- cmbStatus->SetSelection( cmbStatus->Append(_("Alpha")) );
+ cmbStatus->Append(_("Alpha"));
cmbStatus->Append(_("Beta"));
cmbStatus->Append(_("Release"));
cmbStatus->Append(_("Release Candidate"));
@@ -162,7 +170,7 @@
StaticText1 = new wxStaticText(pnlStatus, ID_STATICTEXT1, _("Abbreviation:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
statusSizer->Add(StaticText1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
cmbAbbreviation = new wxComboBox(pnlStatus, ID_ABBREVIATION_COMBOBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_ABBREVIATION_COMBOBOX"));
- cmbAbbreviation->SetSelection( cmbAbbreviation->Append(_("a")) );
+ cmbAbbreviation->Append(_("a"));
cmbAbbreviation->Append(_("b"));
cmbAbbreviation->Append(_("r"));
cmbAbbreviation->Append(_("rc"));
@@ -210,6 +218,23 @@
pnlScheme->SetSizer(schemeSizer);
schemeSizer->Fit(pnlScheme);
schemeSizer->SetSizeHints(pnlScheme);
+ pnlCode = new wxPanel(nbAutoVersioning, ID_CODE_PANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_CODE_PANEL"));
+ codeSizer = new wxBoxSizer(wxVERTICAL);
+ lblHeaderGuard = new wxStaticText(pnlCode, ID_HEADER_GUARD_LABEL, _("Header guard:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_HEADER_GUARD_LABEL"));
+ codeSizer->Add(lblHeaderGuard, 0, wxALL|wxALIGN_LEFT|wxALIGN_TOP, 5);
+ txtHeaderGuard = new wxTextCtrl(pnlCode, ID_HEADER_GUARD_TEXT, _("VERSION_H"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_HEADER_GUARD_TEXT"));
+ codeSizer->Add(txtHeaderGuard, 0, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP, 5);
+ lblNamespace = new wxStaticText(pnlCode, ID_NAMESPACE_LABEL, _("Namespace:"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_NAM
download for full patch...
History
jgm 2009-10-09 09:27
* Fixed ubuntu_style_version declaration now it is char string instead of double.
* Added new tab of autoversioning editor named "Code"
* New support to declare header guard define.
* New support to declare namespace name.
* New support to add a prefix to all variables helping in c mode like for example the DATE declaration found in other header files the same name.