From e46613d70bc14d5a4e5833782f912b64e451c25d Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 29 Jul 2008 11:17:20 +0000 Subject: [PATCH] When statusbar is not reachable, show at least we _do_ something. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25971 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/VCBackend.cpp | 16 +++++++++++----- src/VCBackend.h | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp index ef85a62305..8dcef4332f 100644 --- a/src/VCBackend.cpp +++ b/src/VCBackend.cpp @@ -36,12 +36,18 @@ using boost::smatch; namespace lyx { -int VCS::doVCCommand(string const & cmd, FileName const & path) -{ - LYXERR(Debug::LYXVC, "doVCCommand: " << cmd); +int VCS::doVCCommandCall(string const & cmd, FileName const & path){ + LYXERR(Debug::LYXVC, "doVCCommandCall: " << cmd); Systemcall one; support::PathChanger p(path); - int const ret = one.startscript(Systemcall::Wait, cmd); + return one.startscript(Systemcall::Wait, cmd); +} + +int VCS::doVCCommand(string const & cmd, FileName const & path) +{ + owner_->setBusy(true); + int const ret = doVCCommandCall(cmd, path); + owner_->setBusy(false); if (ret) frontend::Alert::error(_("Revision control error."), bformat(_("Some problem occured while running the command:\n" @@ -89,7 +95,7 @@ FileName const RCS::findFile(FileName const & file) void RCS::retrieve(FileName const & file) { LYXERR(Debug::LYXVC, "LyXVC::RCS: retrieve.\n\t" << file); - VCS::doVCCommand("co -q -r " + quoteName(file.toFilesystemEncoding()), + doVCCommandCall("co -q -r " + quoteName(file.toFilesystemEncoding()), FileName()); } diff --git a/src/VCBackend.h b/src/VCBackend.h index 1b663e8b9b..3f7b6ffa64 100644 --- a/src/VCBackend.h +++ b/src/VCBackend.h @@ -72,13 +72,15 @@ protected: /// parse information from the version file virtual void scanMaster() = 0; + // GUI container for doVCCommandCall + int doVCCommand(std::string const & cmd, support::FileName const & path); /** - * doVCCommand - call out to the version control utility + * doVCCommandCall - call out to the version control utility * @param cmd the command to execute * @param path the path from which to execute * @return exit status */ - static int doVCCommand(std::string const & cmd, support::FileName const & path); + static int doVCCommandCall(std::string const & cmd, support::FileName const & path); /** * The master VC file. For RCS this is *,v or RCS/ *,v. master should -- 2.39.2