From a6d8f9025a1c4a2db14656d03d6f35169aaa0819 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 24 Sep 2018 09:08:20 +0000 Subject: [PATCH] ide: Canceling svn setup does not restart theide anymore git-svn-id: svn://ultimatepp.org/upp/trunk@12302 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/SetupSVN.cpp | 5 +++-- uppsrc/ide/ide.h | 2 +- uppsrc/ide/idebar.cpp | 7 ++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/uppsrc/ide/SetupSVN.cpp b/uppsrc/ide/SetupSVN.cpp index b1986045b..39ff93888 100644 --- a/uppsrc/ide/SetupSVN.cpp +++ b/uppsrc/ide/SetupSVN.cpp @@ -1,6 +1,6 @@ #include "ide.h" -void SetupSVNTrunk() +bool SetupSVNTrunk() { WithSetupSVNLayout dlg; CtrlLayoutOKCancel(dlg, "Checkout U++ trunk"); @@ -34,7 +34,7 @@ void SetupSVNTrunk() String dir, tempdir; for(;;) { if(dlg.Run() != IDOK) - return; + return false; console.Clear(); dir = ~dlg.dir; tempdir = AppendFileName(GetFileFolder(dir), "temp"); @@ -105,4 +105,5 @@ void SetupSVNTrunk() MakeAssembly(myapps, "MyApps-bazaar"); console.Perform(); + return true; } diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index ffc022d03..5cd7dd4d7 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -1184,6 +1184,6 @@ inline void ShowConsole() { if(TheIde()) ((Ide *)TheIde())->ShowConsole(); } void InstantSetup(); -void SetupSVNTrunk(); +bool SetupSVNTrunk(); #endif diff --git a/uppsrc/ide/idebar.cpp b/uppsrc/ide/idebar.cpp index 205715a69..77bd0108d 100644 --- a/uppsrc/ide/idebar.cpp +++ b/uppsrc/ide/idebar.cpp @@ -390,9 +390,10 @@ void Ide::Setup(Bar& menu) .Help("Setups/fixes build methods and basic assemblies.."); #endif menu.Add("Checkout and setup U++ SVN trunk sources..", [=] { - SetupSVNTrunk(); - IdeAgain = true; - Break(); + if(SetupSVNTrunk()) { + IdeAgain = true; + Break(); + } }); const Workspace& wspc = IdeWorkspace();