Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6357
Modified Files:
sparkcontext.cpp
Log Message:
- added 'Save file' and 'Set as StartScript' option to context menu
Index: sparkcontext.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sparkcontext.cpp 8 Jul 2007 14:24:27 -0000 1.7
--- sparkcontext.cpp 8 Jul 2007 14:43:09 -0000 1.8
***************
*** 22,25 ****
--- 22,26 ----
#include "constants.h"
#include <wx/menu.h>
+ #include <wx/filename.h>
#include <zeitgeist/leaf.h>
#include <oxygen/sceneserver/scenedict.h>
***************
*** 97,105 ****
}
long style = 0;
! wxMenu* menu(new wxMenu(SparkEdit::GetInstance().GetFile(edit), 9));
menu->Append(ID_TAB_CLOSE, wxT("&Close tab"));
menu->Append(ID_TAB_CLOSE_OTHER, wxT("Close other tabs"));
return menu;
}
--- 98,117 ----
}
+ wxString path(SparkEdit::GetInstance().GetFile(edit));
+ wxString fname(wxFileName(path).GetFullName());
+
long style = 0;
! wxMenu* menu(new wxMenu(fname, 9));
+ menu->Append(ID_FILE_SAVE, wxT("&Save " + fname));
menu->Append(ID_TAB_CLOSE, wxT("&Close tab"));
menu->Append(ID_TAB_CLOSE_OTHER, wxT("Close other tabs"));
+
+ if (edit != SparkEdit::GetInstance().GetStartScript())
+ {
+ menu->AppendSeparator();
+ menu->Append(ID_TAB_STARTSCRIPT, wxT("Set ") + fname + wxT(" as Startscript"));
+ }
+
return menu;
}
|