Patch #2423 2008-04-01 02:40

drewboo

TODO Plugin remembers its scope between C::B sessions
Download
2423-TODO_Plugin_re.patch (964 bytes)
Category
Plugin::Refinement
Status
Accepted
Close date
2008-04-04 16:33
Assigned to
biplab
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();
 }
biplab 2008-04-04 16:33

Thanks for the patch.