mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-14 13:15:14 +03:00
Improve UIWindow default focusing behavior.
Adjust `window-flags` behavior when used from CSS. Display a download progress window when download-file-web is used. Also support loading images and sounds from downloads. Minor safety checks added for engine termination and window closing. Minor changes in Http.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "settingsactions.hpp"
|
||||
#include "settingsmenu.hpp"
|
||||
#include "uibuildsettings.hpp"
|
||||
#include "uidownloadwindow.hpp"
|
||||
#include "uitreeviewfs.hpp"
|
||||
#include "uiwelcomescreen.hpp"
|
||||
#include "version.hpp"
|
||||
@@ -62,6 +63,10 @@ void appLoop() {
|
||||
appInstance->mainLoop();
|
||||
}
|
||||
|
||||
App* App::instance() {
|
||||
return appInstance;
|
||||
}
|
||||
|
||||
bool App::isAnyTerminalDirty() const {
|
||||
bool dirty = false;
|
||||
mSplitter->forEachWidgetTypeStoppable( UI_TYPE_TERMINAL, [&dirty]( UIWidget* widget ) -> bool {
|
||||
@@ -555,7 +560,7 @@ void App::downloadFileWebDialog() {
|
||||
}
|
||||
|
||||
void App::downloadFileWeb( const std::string& url ) {
|
||||
loadFileFromPath( url, true );
|
||||
UIDownloadWindow::downloadFileWeb( url );
|
||||
}
|
||||
|
||||
UIFileDialog* App::saveFileDialog( UICodeEditor* editor, bool focusOnClose ) {
|
||||
@@ -989,7 +994,9 @@ static void fsRemoveAll( const std::string& fpath ) {
|
||||
}
|
||||
|
||||
App::~App() {
|
||||
appInstance = nullptr;
|
||||
mDestroyingApp = true;
|
||||
|
||||
if ( mProjectBuildManager )
|
||||
mProjectBuildManager.reset();
|
||||
|
||||
@@ -1303,7 +1310,7 @@ App::makeAutoClosePairs( const std::string& strPairs ) {
|
||||
return pairs;
|
||||
}
|
||||
|
||||
ProjectDocumentConfig& App::getProjectDocConfig() {
|
||||
ProjectConfig& App::getProjectConfig() {
|
||||
return mProjectDocConfig;
|
||||
}
|
||||
|
||||
@@ -2128,7 +2135,7 @@ void App::closeEditors() {
|
||||
if ( mFileSystemListener )
|
||||
mFileSystemListener->setDirTree( mDirTree );
|
||||
|
||||
mProjectDocConfig = ProjectDocumentConfig( mConfig.doc );
|
||||
mProjectDocConfig = ProjectConfig( mConfig.doc );
|
||||
mSettings->updateProjectSettingsMenu();
|
||||
if ( !mSplitter->getTabWidgets().empty() && mSplitter->getTabWidgets()[0]->getTabCount() == 0 )
|
||||
mSplitter->createCodeEditorInTabWidget( mSplitter->getTabWidgets()[0] );
|
||||
|
||||
Reference in New Issue
Block a user