I have submitted a patch to BerliOS for your consideration.
http://developer.berlios.de/patch/?func=detailpatch&patch_id=2423&group_id=5358
This patch lets the TODO List remember the scope that was last being used.
Currently, when Code::Blocks is started, the TODO List will always be using the "Current File" scope. This patch will set it to whatever it was at when Code::Blocks was last used.
I've always used it at Project scope, and would often forget to reset it when I reload Code::Blocks.
Files affected:
src/plugins/todo/todolistview.cpp
The patch:
Index: src/plugins/todo/todolistview.cpp
===================================================================
--- src/plugins/todo/todolistview.cpp (revision 4978)
+++ src/plugins/todo/todolistview.cpp (working copy)
@@ -95,7 +95,8 @@
hbs->Add(new wxStaticText(panel, wxID_ANY, _("Scope:")), 0, wxTOP, 4);
m_pSource = new wxComboBox(panel, idSource, wxEmptyString, wxDefaultPosition, wxDefaultSize, 3, &choices[0], wxCB_READONLY);
- m_pSource->SetSelection(0);
+ int source = Manager::Get()->GetConfigManager(_T("todo_list"))->ReadInt(_T("source"), 0);
+ m_pSource->SetSelection(source);
hbs->Add(m_pSource, 0, wxLEFT | wxRIGHT, 8);
hbs->Add(new wxStaticText(panel, wxID_ANY, _("User:")), 0, wxTOP, 4);
@@ -451,6 +452,7 @@
void ToDoListView::OnComboChange(wxCommandEvent& event)
{
+ Manager::Get()->GetConfigManager(_T("todo_list"))->Write(_T("source"), m_pSource->GetSelection() );
Parse();
}
Is this not a reasonable patch? :(
Quote from: DrewBoo on April 03, 2008, 06:14:55 PM
Is this not a reasonable patch? :(
Don't you worry. It's already applied since the first day you posted here at my machine. Just allow us testing before accepting. ;-)
Quote from: MortenMacFly on April 03, 2008, 09:25:28 PM
Don't you worry. It's already applied since the first day you posted here at my machine. Just allow us testing before accepting. ;-)
Hi, Morten.
Please, feel free to test the hell out of the patches I posted. Test them until they walk away limping. :D
You know as soon as I posted above, I finally got around to reading that NeWsOfTzzz thread that was getting so many posts. :roll: I had to come back to this post to make sure I wasn't sounding...um..."pushy".
Quote from: DrewBoo on April 03, 2008, 09:32:32 PM
Please, feel free to test the hell out of the patches I posted. Test them until they walk away limping. :D
BTW: Next time, if you attach the patch as source file (file attachment) to the post, you can see how often it is downloaded. That would give you a hint whether it's being processed or "forgotten".
@Morten,
I've applied this patch with other fixes to the trunk as I found some other bugs related to To-do plugins. These bugs surfaced after this patch was applied. :)
@DrewBoo
I hope you won't be sad now. ;)
Best Regards,
Biplab
Quote from: Biplab on April 04, 2008, 06:42:12 PM
I've applied this patch with other fixes to the trunk as I found some other bugs related to To-do plugins. These bugs surfaced after this patch was applied. :)
No problem. BTW: you have applied another patch I had in mind for this weekend, too. So I am out of work now... Hehe. ;-)