Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
wxSmith and the Style woes of the future.
stahta01:
--- Quote from: oBFusCATed on July 30, 2018, 08:52:57 am ---Here is a try to preserve old files. Can someone try if it works and probably do a review if I'm doing the correct thing, because I'm pretty new in the wxsmith code.
--- End quote ---
Building Win7 wx2.8.12 with your patch; but, I only know a little bit of how to use wxSmith.
I will see if the debug wxs file gets converted correctly. Likely post the changes to get a better opinion on it.
Since, I also do not use debugger very much.
Tim S.
stahta01:
The wxs file does not get changed/saved; but, the .cpp and .h files are changed.
Is this on purpose or on accident?
Edit: Thinking about it; it does make sense not to change the wxs file till after the next CB Release and maybe even later than that.
Tested on debuggersettingsdlg.wxs
--- Code: --- src/src/debuggersettingsdlg.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/src/debuggersettingsdlg.cpp b/src/src/debuggersettingsdlg.cpp
index 68bfe67dd..9fdf9ee6d 100644
--- a/src/src/debuggersettingsdlg.cpp
+++ b/src/src/debuggersettingsdlg.cpp
@@ -3,8 +3,8 @@
#ifndef CB_PRECOMP
//(*InternalHeadersPCH(DebuggerSettingsDlg)
- #include <wx/string.h>
#include <wx/intl.h>
+ #include <wx/string.h>
//*)
#include <wx/choicdlg.h>
@@ -35,18 +35,18 @@ END_EVENT_TABLE()
DebuggerSettingsDlg::DebuggerSettingsDlg(wxWindow* parent)
{
//(*Initialize(DebuggerSettingsDlg)
- wxStaticLine* staticLine;
wxBoxSizer* headerSizer;
wxBoxSizer* mainSizer;
- wxStdDialogButtonSizer* stdDialogButtons;
wxPanel* header;
+ wxStaticLine* staticLine;
+ wxStdDialogButtonSizer* stdDialogButtons;
Create(parent, wxID_ANY, _("Debugger settings"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX, _T("wxID_ANY"));
mainSizer = new wxBoxSizer(wxVERTICAL);
- header = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTRANSPARENT_WINDOW, _T("wxID_ANY"));
+ header = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxTRANSPARENT_WINDOW, _T("wxID_ANY"));
header->SetBackgroundColour(wxColour(0,64,128));
headerSizer = new wxBoxSizer(wxHORIZONTAL);
- m_activeInfo = new wxStaticText(header, ID_LABEL_ACTIVE_INFO, _("Active debugger config"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTRANSPARENT_WINDOW, _T("ID_LABEL_ACTIVE_INFO"));
+ m_activeInfo = new wxStaticText(header, ID_LABEL_ACTIVE_INFO, _("Active debugger config"), wxDefaultPosition, wxDefaultSize, wxBORDER_NONE|wxTRANSPARENT_WINDOW, _T("ID_LABEL_ACTIVE_INFO"));
m_activeInfo->SetForegroundColour(wxColour(255,255,255));
m_activeInfo->SetBackgroundColour(wxColour(0,64,128));
wxFont m_activeInfoFont(12,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_BOLD,false,wxEmptyString,wxFONTENCODING_DEFAULT);
--- End code ---
--- Code: --- src/src/debuggersettingsdlg.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/src/debuggersettingsdlg.h b/src/src/debuggersettingsdlg.h
index 9ab0523f7..749848bb4 100644
--- a/src/src/debuggersettingsdlg.h
+++ b/src/src/debuggersettingsdlg.h
@@ -3,9 +3,9 @@
#ifndef CB_PRECOMP
//(*HeadersPCH(DebuggerSettingsDlg)
- #include <wx/sizer.h>
- #include <wx/panel.h>
#include "scrollingdialog.h"
+ #include <wx/panel.h>
+ #include <wx/sizer.h>
#include <wx/stattext.h>
//*)
@@ -40,8 +40,8 @@ class DebuggerSettingsDlg: public wxScrollingDialog
private:
//(*Declarations(DebuggerSettingsDlg)
- wxTreebook* m_treebook;
wxStaticText* m_activeInfo;
+ wxTreebook* m_treebook;
//*)
//(*Identifiers(DebuggerSettingsDlg)
--- End code ---
Tim S.
oBFusCATed:
--- Quote from: stahta01 on July 30, 2018, 01:16:27 pm ---The wxs file does not get changed/saved; but, the .cpp and .h files are changed.
Is this on purpose or on accident?
--- End quote ---
Does the wxs file change if you edit it (unrelated to the style changes)? I think this is sort of expected with the current version and it is accidental.
Miguel Gimenez:
Works for me in W7/64 with wx3.1.1/32, can open WXS files with old style flags and they get converted on the fly in the WXS editor. The CPP and WXS files only change when any property is modified within the editor.
Probably the "upgraded" WXS file will fail to load with an unpatched CB, have not tested this because I executed update31 and lost the unpatched version.
Anyway, the old names are still valid and there is no deprecation notice, just the 'old' comment.
oBFusCATed:
I guess the assert is shown, because we don't prevent two styles related to borders to be set simultaneously. Unfortunately the check seems to be windows only.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version