mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-02 11:10:31 +03:00
Address: Specifying non-existing working directory for a build step isn't handled properly (SpartanJ/ecode#432).
ChatUI hide tooltips after button click. Enable Tab Stops by default.
This commit is contained in:
@@ -141,7 +141,7 @@ void AppConfig::load( const std::string& confPath, std::string& keybindingsPath,
|
|||||||
doc.writeUnicodeBOM = ini.getValueB( "document", "write_bom", false );
|
doc.writeUnicodeBOM = ini.getValueB( "document", "write_bom", false );
|
||||||
doc.indentWidth = ini.getValueI( "document", "indent_width", 4 );
|
doc.indentWidth = ini.getValueI( "document", "indent_width", 4 );
|
||||||
doc.indentSpaces = ini.getValueB( "document", "indent_spaces", false );
|
doc.indentSpaces = ini.getValueB( "document", "indent_spaces", false );
|
||||||
doc.tabStops = ini.getValueB( "document", "tab_stops", false );
|
doc.tabStops = ini.getValueB( "document", "tab_stops", true );
|
||||||
doc.lineEndings =
|
doc.lineEndings =
|
||||||
TextFormat::stringToLineEnding( ini.getValue( "document", "line_endings", "LF" ) );
|
TextFormat::stringToLineEnding( ini.getValue( "document", "line_endings", "LF" ) );
|
||||||
// Migrate old data
|
// Migrate old data
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ struct DocumentConfig {
|
|||||||
bool autoDetectIndentType{ true };
|
bool autoDetectIndentType{ true };
|
||||||
bool writeUnicodeBOM{ false };
|
bool writeUnicodeBOM{ false };
|
||||||
bool indentSpaces{ false };
|
bool indentSpaces{ false };
|
||||||
bool tabStops{ false };
|
bool tabStops{ true };
|
||||||
TextFormat::LineEnding lineEndings{ TextFormat::LineEnding::LF };
|
TextFormat::LineEnding lineEndings{ TextFormat::LineEnding::LF };
|
||||||
int indentWidth{ 4 };
|
int indentWidth{ 4 };
|
||||||
int tabWidth{ 4 };
|
int tabWidth{ 4 };
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#include <eepp/ui/uiscenenode.hpp>
|
#include <eepp/ui/uiscenenode.hpp>
|
||||||
#include <eepp/ui/uiscrollview.hpp>
|
#include <eepp/ui/uiscrollview.hpp>
|
||||||
#include <eepp/ui/uitableview.hpp>
|
#include <eepp/ui/uitableview.hpp>
|
||||||
|
#include <eepp/ui/uitooltip.hpp>
|
||||||
#include <eepp/window/clipboard.hpp>
|
#include <eepp/window/clipboard.hpp>
|
||||||
#include <eepp/window/window.hpp>
|
#include <eepp/window/window.hpp>
|
||||||
|
|
||||||
@@ -214,7 +215,11 @@ LLMChatUI::LLMChatUI( PluginManager* manager ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
mChatAdd = find<UIPushButton>( "llm_add_chat" );
|
mChatAdd = find<UIPushButton>( "llm_add_chat" );
|
||||||
mChatAdd->onClick( [this]( auto ) { execute( "ai-add-chat" ); } );
|
mChatAdd->onClick( [this]( auto ) {
|
||||||
|
execute( "ai-add-chat" );
|
||||||
|
if ( mChatAdd->getTooltip() && mChatAdd->getTooltip()->isVisible() )
|
||||||
|
mChatAdd->getTooltip()->hide();
|
||||||
|
} );
|
||||||
|
|
||||||
const auto& markdown = SyntaxDefinitionManager::instance()->getByLSPName( "markdown" );
|
const auto& markdown = SyntaxDefinitionManager::instance()->getByLSPName( "markdown" );
|
||||||
mChatInput->setShowFoldingRegion( true );
|
mChatInput->setShowFoldingRegion( true );
|
||||||
@@ -227,10 +232,18 @@ LLMChatUI::LLMChatUI( PluginManager* manager ) :
|
|||||||
mChatInput->setSyntaxDefinition( markdown );
|
mChatInput->setSyntaxDefinition( markdown );
|
||||||
|
|
||||||
mChatRun = find<UIPushButton>( "llm_run" );
|
mChatRun = find<UIPushButton>( "llm_run" );
|
||||||
mChatRun->onClick( [this]( auto ) { execute( "ai-prompt" ); } );
|
mChatRun->onClick( [this]( auto ) {
|
||||||
|
execute( "ai-prompt" );
|
||||||
|
if ( mChatRun->getTooltip() && mChatRun->getTooltip()->isVisible() )
|
||||||
|
mChatRun->getTooltip()->hide();
|
||||||
|
} );
|
||||||
|
|
||||||
mChatStop = find<UIPushButton>( "llm_stop" );
|
mChatStop = find<UIPushButton>( "llm_stop" );
|
||||||
mChatStop->onClick( [this]( auto ) { execute( "ai-prompt-stop" ); } );
|
mChatStop->onClick( [this]( auto ) {
|
||||||
|
execute( "ai-prompt-stop" );
|
||||||
|
if ( mChatStop->getTooltip() && mChatStop->getTooltip()->isVisible() )
|
||||||
|
mChatStop->getTooltip()->hide();
|
||||||
|
} );
|
||||||
|
|
||||||
mChatUserRole = find<UIPushButton>( "llm_user" );
|
mChatUserRole = find<UIPushButton>( "llm_user" );
|
||||||
mChatUserRole->onClick( [this]( auto ) { execute( "ai-chat-toggle-role" ); } );
|
mChatUserRole->onClick( [this]( auto ) { execute( "ai-chat-toggle-role" ); } );
|
||||||
|
|||||||
@@ -936,19 +936,31 @@ void ProjectBuildManager::runBuild( const std::string& buildName, const std::str
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( progressFn ) {
|
if ( progressFn ) {
|
||||||
progressFn(
|
progressFn( progress,
|
||||||
progress,
|
Sys::getDateTimeStr() + ": " +
|
||||||
Sys::getDateTimeStr() + ": " +
|
String::format( i18n( "starting_process", "Starting %s %s\n" ).toUtf8(),
|
||||||
String::format( i18n( "starting_process", "Starting %s %s\n" ).toUtf8().c_str(),
|
cmd.cmd, cmd.args ),
|
||||||
cmd.cmd.c_str(), cmd.args.c_str() ),
|
nullptr );
|
||||||
nullptr );
|
|
||||||
|
|
||||||
progressFn(
|
if ( FileSystem::fileExists( cmd.workingDir ) ) {
|
||||||
progress,
|
progressFn(
|
||||||
Sys::getDateTimeStr() + ": " +
|
progress,
|
||||||
String::format( i18n( "working_dir_at", "Working Dir %s\n" ).toUtf8().c_str(),
|
Sys::getDateTimeStr() + ": " +
|
||||||
cmd.workingDir.c_str() ),
|
String::format( i18n( "working_dir_at", "Working Dir %s\n" ).toUtf8(),
|
||||||
nullptr );
|
cmd.workingDir ),
|
||||||
|
nullptr );
|
||||||
|
} else {
|
||||||
|
progressFn(
|
||||||
|
progress,
|
||||||
|
Sys::getDateTimeStr() + ": " +
|
||||||
|
String::format(
|
||||||
|
i18n(
|
||||||
|
"working_dir_at_does_not_exists",
|
||||||
|
"WARNING: Working Dir is set to \"%s\" but it does not exists!\n" )
|
||||||
|
.toUtf8(),
|
||||||
|
cmd.workingDir ),
|
||||||
|
nullptr );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( mProcess->create( cmd.cmd, cmd.args, options, toUnorderedMap( res.envs ),
|
if ( mProcess->create( cmd.cmd, cmd.args, options, toUnorderedMap( res.envs ),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
#include "statusbuildoutputcontroller.hpp"
|
||||||
#include "notificationcenter.hpp"
|
#include "notificationcenter.hpp"
|
||||||
#include "plugins/plugincontextprovider.hpp"
|
#include "plugins/plugincontextprovider.hpp"
|
||||||
#include "projectdirectorytree.hpp"
|
#include "projectdirectorytree.hpp"
|
||||||
#include "statusbuildoutputcontroller.hpp"
|
|
||||||
#include "widgetcommandexecuter.hpp"
|
#include "widgetcommandexecuter.hpp"
|
||||||
#include <eepp/ui/uicodeeditor.hpp>
|
#include <eepp/ui/uicodeeditor.hpp>
|
||||||
|
|
||||||
@@ -141,10 +141,11 @@ void StatusBuildOutputController::runBuild( const std::string& buildName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
patterns.emplace_back(
|
|
||||||
SyntaxPattern( { "%d%d%d%d%-%d%d%-%d%d%s%d%d%:%d%d%:%d%d%:.*error.*[^\n]+" }, "error" ) );
|
|
||||||
patterns.emplace_back( SyntaxPattern(
|
patterns.emplace_back( SyntaxPattern(
|
||||||
{ "%d%d%d%d%-%d%d%-%d%d%s%d%d%:%d%d%:%d%d%:.*warning.*[^\n]+" }, "warning" ) );
|
{ "%d%d%d%d%-%d%d%-%d%d%s%d%d%:%d%d%:%d%d%:.*[Ee][Rr][Rr][Oo][Rr].*[^\n]+" }, "error" ) );
|
||||||
|
patterns.emplace_back( SyntaxPattern(
|
||||||
|
{ "%d%d%d%d%-%d%d%-%d%d%s%d%d%:%d%d%:%d%d%:.*[Ww][Aa][Rr][Nn][Ii][Nn][Gg].*[^\n]+" },
|
||||||
|
"warning" ) );
|
||||||
patterns.emplace_back(
|
patterns.emplace_back(
|
||||||
SyntaxPattern( { "%d%d%d%d%-%d%d%-%d%d%s%d%d%:%d%d%:%d%d%:[^\n]+" }, "notice" ) );
|
SyntaxPattern( { "%d%d%d%d%-%d%d%-%d%d%s%d%d%:%d%d%:%d%d%:[^\n]+" }, "notice" ) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user