ok well they're not bug fixes; just little "annoying things", for some reason you can't navigate the project manager via keyboard;
1st patch:
--- src/sdk/projectmanager_old.cpp 2011-02-27 13:36:32.000766001 +0000
+++ src/sdk/projectmanager.cpp 2011-02-27 15:55:00.000000000 +0000
@@ -141,12 +141,86 @@
wxPostEvent(GetParent(), e);
}
else
+ {
event.Skip();
+ }
+ }
+ void OnKeyDown(wxKeyEvent& event)
+ {
+ wxString key;
+ long keycode = event.GetKeyCode();
+ switch ( keycode )
+ {
+ case WXK_UP: key = _T("UP"); break;
+ case WXK_DOWN: key = _T("DOWN"); break;
+ case WXK_LEFT: key = _T("LEFT"); break;
+ case WXK_RIGHT: key = _T("RIGHT"); break;
+ case WXK_RETURN: key = _T("ENTER"); break;
+ }
+ wxTreeItemId itemId = this->GetSelection();
+ if((key) && (key==_("UP")) && (itemId.IsOk()))
+ {
+ //GetPrevVisible - not implemented... strange...
+ wxTreeItemId itemIdb = this->GetPrevSibling(itemId);
+ if(itemIdb.IsOk())
+ {
+ this->SelectItem(itemIdb, true);
+ }
+ else
+ {
+ wxTreeItemId itemIdb = this->GetItemParent(itemId);
+ if(itemIdb.IsOk())
+ this->SelectItem(itemIdb, true);
+ }
+ }
+ else if((key) && (key==_("DOWN")) && (itemId.IsOk()))
+ {
+ wxTreeItemId tmpId = this->GetNextVisible(itemId);
+ if(tmpId.IsOk())
+ this->SelectItem(tmpId, true);
+ }
+ else if((key) && (key==_("LEFT")) && (itemId.IsOk()))
+ {
+ if((this->ItemHasChildren(itemId))&&(this->IsExpanded(itemId)))
+ {
+ this->Collapse(itemId);
+ }
+ else
+ {
+ wxTreeItemId itemIdb = this->GetItemParent(itemId);
+ if(itemIdb.IsOk())
+ this->SelectItem(itemIdb, true);
+ }
+ }
+ else if((key) && (key==_("RIGHT")) && (itemId.IsOk()))
+ {
+ if((this->ItemHasChildren(itemId)) && (!this->IsExpanded(itemId)))
+ {
+ this->Expand(itemId);
+ }
+ else
+ {
+ wxTreeItemIdValue cookieMonsta;
+ wxTreeItemId itemIdb = this->GetFirstChild(itemId, cookieMonsta);
+ if(itemIdb.IsOk())
+ this->SelectItem(itemIdb, true);
+ }
+ }
+ else if((key) && (key==_("ENTER")) && (itemId.IsOk()))
+ {
+ wxTreeEvent myevent = wxTreeEvent(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, this, itemId);
+ wxPostEvent(this, myevent);
+ }
+ else
+ {
+ event.Skip();
+ }
}
DECLARE_EVENT_TABLE();
};
BEGIN_EVENT_TABLE(PrjTree, wxTreeCtrl)
EVT_RIGHT_DOWN(PrjTree::OnRightClick)
+ EVT_KEY_DOWN(PrjTree::OnKeyDown)
END_EVENT_TABLE()
#endif // !__WXMSW__
also when you close all editors it's nice for the project tree to gain focus so you can key to the next file to edit;
2nd patch;
--- src/sdk/cbeditor_old.cpp 2011-02-27 15:57:43.000000000 +0000
+++ src/sdk/cbeditor.cpp 2011-02-27 15:52:45.000000000 +0000
@@ -758,6 +758,11 @@
DestroySplitView();
delete m_pData;
+ size_t editorCount = Manager::Get()->GetEditorManager()->GetNotebook()->GetPageCount();
+ if(editorCount<1)
+ {
+ Manager::Get()->GetProjectManager()->GetTree()->SetFocus();
+ }
}
void cbEditor::DoInitializations(const wxString& filename, LoaderBase* fileLdr)
If I have pasted in the wrong place please let me know;
these are simple patched but make an essential difference for me;
cheers...