From: Markus R. <rol...@us...> - 2007-04-29 16:14:56
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5351 Modified Files: Tag: RSGEDIT_FILEREF sparkcontext.cpp Log Message: - check if a rsg file is assciated with the context node and insert an 'edit file...' entry to the context menu Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** sparkcontext.cpp 29 Apr 2007 15:32:36 -0000 1.3.2.1 --- sparkcontext.cpp 29 Apr 2007 16:14:53 -0000 1.3.2.2 *************** *** 23,28 **** --- 23,30 ---- #include <wx/menu.h> #include <zeitgeist/leaf.h> + #include <oxygen/sceneserver/scenedict.h> using namespace zeitgeist; + using namespace oxygen; using namespace boost; *************** *** 95,98 **** --- 97,109 ---- menu->Append(ID_CONTEXT_PROPERTIES, wxT("&Properties")); + const SceneDict::FileRef* ref = SceneDict::GetInstance().Lookup(leaf); + if (ref != 0) + { + wxString entry(wxT("&Edit source file (")); + entry += ref->fname.c_str(); + entry += wxString::Format(":%d)",ref->line); + menu->Append(ID_CONTEXT_EDIT_SOURCE, entry); + } + return menu; } |