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>
20 #pragma implementation
24 #include "ButtonControllerBase.h"
25 #include "ControlVCLog.h"
27 #include "BufferView.h"
28 #include "frontends/LyXView.h"
31 #include "support/lyxlib.h"
37 ControlVCLog::ControlVCLog(LyXView & lv, Dialogs & d)
38 : ControlDialogBD(lv, d)
40 d_.showVCLogFile.connect(slot(this, &ControlVCLog::show));
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;