1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlVCLog.C
11 * \author John Levon, moz@compsoc.man.ac.uk
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
18 #pragma implementation
23 #include "ControlVCLog.h"
32 ControlVCLog::ControlVCLog(LyXView & lv, Dialogs & d)
33 : ControlDialog<ControlConnectBD>(lv, d)
35 d_.showVCLogFile.connect(slot(this, &ControlVCLog::show));
38 string const ControlVCLog::getBufferFileName() const
40 return lv_.view()->buffer()->fileName();
44 std::stringstream & ControlVCLog::getVCLogFile(std::stringstream & ss) const
46 string const name = lv_.view()->buffer()->lyxvc.getLogFile();
48 std::ifstream in(name.c_str());
50 bool found = (in.get());
53 in.seekg(0, std::ios::beg); // rewind to the beginning
60 ss << "No version control log file found." << endl;