Author Topic: PATCH: Todo list improvement  (Read 4349 times)

Offline DrewBoo

  • Multiple posting newcomer
  • *
  • Posts: 110
PATCH: Todo list improvement
« on: April 01, 2008, 06:35:15 am »
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();
 }

Code

Offline DrewBoo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: PATCH: Todo list improvement
« Reply #1 on: April 03, 2008, 06:14:55 pm »
Is this not a reasonable patch?   :(

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: PATCH: Todo list improvement
« Reply #2 on: April 03, 2008, 09:25:28 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. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline DrewBoo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: PATCH: Todo list improvement
« Reply #3 on: April 03, 2008, 09:32:32 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".

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: PATCH: Todo list improvement
« Reply #4 on: April 04, 2008, 02:35:23 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".
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: PATCH: Todo list improvement
« Reply #5 on: April 04, 2008, 06:42:12 pm »
@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
Be a part of the solution, not a part of the problem.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: PATCH: Todo list improvement
« Reply #6 on: April 04, 2008, 07:46:13 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. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ