Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
PATCH: Todo list improvement
DrewBoo:
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:
--- Code: ---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();
}
--- End code ---
--- Code: ---
--- End code ---
DrewBoo:
Is this not a reasonable patch? :(
MortenMacFly:
--- Quote from: DrewBoo on April 03, 2008, 06:14:55 pm ---Is this not a reasonable patch? :(
--- End quote ---
Don't you worry. It's already applied since the first day you posted here at my machine. Just allow us testing before accepting. ;-)
DrewBoo:
--- 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. ;-)
--- End quote ---
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".
MortenMacFly:
--- 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
--- End quote ---
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".
Navigation
[0] Message Index
[#] Next page
Go to full version