]> git.lyx.org Git - features.git/commitdiff
When statusbar is not reachable, show at least we _do_ something.
authorPavel Sanda <sanda@lyx.org>
Tue, 29 Jul 2008 11:17:20 +0000 (11:17 +0000)
committerPavel Sanda <sanda@lyx.org>
Tue, 29 Jul 2008 11:17:20 +0000 (11:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25971 a592a061-630c-0410-9148-cb99ea01b6c8

src/VCBackend.cpp
src/VCBackend.h

index ef85a62305a8729a84c37a3b6515c71eeed55603..8dcef4332f7d822772d4c3dd5dcd86dd371e4023 100644 (file)
@@ -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());
 }
 
index 1b663e8b9bec9eebbb1c771afb7a14479bedb00f..3f7b6ffa6453c26dc1ae0708d896dd354b20a7ff 100644 (file)
@@ -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