mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 01:01:25 +03:00
ecode: Start the terminal in the current working directory (the current project folder or the current file folder if no project is open).
This commit is contained in:
@@ -1163,6 +1163,18 @@ String App::i18n( const std::string& key, const String& def ) {
|
||||
return mUISceneNode->getTranslatorStringFromKey( key, def );
|
||||
}
|
||||
|
||||
std::string App::getCurrentWorkingDir() const {
|
||||
if ( !mCurrentProject.empty() )
|
||||
return mCurrentProject;
|
||||
|
||||
if ( mSplitter && mSplitter->curEditorExists() && mSplitter->getCurEditor()->hasDocument() &&
|
||||
mSplitter->getCurEditor()->getDocument().hasFilepath() ) {
|
||||
return mSplitter->getCurEditor()->getDocument().getFileInfo().getDirectoryPath();
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
UIMenu* App::createEditMenu() {
|
||||
UIPopUpMenu* menu = UIPopUpMenu::New();
|
||||
menu->add( i18n( "undo", "Undo" ), findIcon( "undo" ), getKeybind( "undo" ) )->setId( "undo" );
|
||||
|
||||
Reference in New Issue
Block a user