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
21 #include "ControlVCLog.h"
23 #include "ButtonControllerBase.h"
25 #include "BufferView.h"
29 #include "frontends/LyXView.h"
31 #include "support/lyxlib.h"
38 ControlVCLog::ControlVCLog(LyXView & lv, Dialogs & d)
39 : ControlDialogBD(lv, d)
43 string const ControlVCLog::getBufferFileName() const
45 return lv_.view()->buffer()->fileName();
49 stringstream & ControlVCLog::getVCLogFile(stringstream & ss) const
51 string const name = lv_.view()->buffer()->lyxvc.getLogFile();
53 std::ifstream in(name.c_str());
55 bool found = (in.get());
58 in.seekg(0, std::ios::beg); // rewind to the beginning
65 ss << _("No version control log file found.") << endl;