Quote from: Pecan on April 11, 2006, 12:10:55 PM
It seems that in default.conf, only the current changes are being recorded.
Here's a proposed fix for this problem. It seems editorcolorset.cpp::save() was deleting the previous user settings
before writing the new user setting.
I'll submit a bug patch to berlios.
Codethanks
Index: src/sdk/editorcolorset.cpp
===================================================================
--- src/sdk/editorcolorset.cpp (revision 2337)
+++ src/sdk/editorcolorset.cpp (working copy)
@@ -466,7 +466,8 @@
{
wxString key;
ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("editor"));
- cfg->DeleteSubPath(_T("/color_sets/") + m_Name);
+ // The next stmt causes all previous user settings to be deleted //pecan 2006/4/11
+ //-cfg->DeleteSubPath(_T("/color_sets/") + m_Name); //pecan 2006/4/11
// write the theme name
cfg->Write(_T("/color_sets/") + m_Name + _T("/name"), m_Name);
pecan
After trying for a while, I've applied the patch for now, lacking a better solution (rev. 2376).
...
However, for the time being, commenting out that line certainly makes things better. With settings lost every time, the app is quite unusuable. Let's see if it fails, and why :)
...
Dear All,
Unfortunately the color setting is not the only "setting" that looses the modification. If you try to add a new keyword
the modification will be lost. I flagged this bug in the #7063, the bug was closed after the application of the Pecan's patch.
I have opened a new bug report (#7275) to flag the issue.
In the meantime I am adding the keyword manually in the .conf file.
Thanks
Massimo
You are so right. The problem is in a difference module altogether.
EditKeywordsDlg::OnSetChange() does not seem to be writing out the keywords.
I was wrong to associate my patch with this problem.
...If you try to add a new keyword the modification will be lost...
I have opened a new bug report (#7275) to flag the issue.
In the meantime I am adding the keyword manually in the .conf file.
Index: src/sdk/editkeywordsdlg.h
===================================================================
--- src/sdk/editkeywordsdlg.h (revision 2371)
+++ src/sdk/editkeywordsdlg.h (working copy)
@@ -15,9 +15,10 @@
protected:
void OnSetChange(wxSpinEvent& event);
+ wxSpinCtrl* spnSet;
+ public:
EditorColorSet* m_pTheme;
HighlightLanguage m_Lang;
- wxSpinCtrl* spnSet;
wxTextCtrl* txtKeywords;
int m_LastSet;
private:
Index: src/sdk/editorconfigurationdlg.cpp
===================================================================
--- src/sdk/editorconfigurationdlg.cpp (revision 2371)
+++ src/sdk/editorconfigurationdlg.cpp (working copy)
@@ -635,6 +635,8 @@
EditKeywordsDlg dlg(0, m_Theme, m_Lang);
PlaceWindow(&dlg);
dlg.ShowModal();
+ // Update the last modified keywords set //pecan 2006/4/26
+ dlg.m_pTheme->SetKeywords(dlg.m_Lang, dlg.m_LastSet, dlg.txtKeywords->GetValue());
}
}