]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QVCLog.C
partial fonts fix. Like Juergen said we really need our own dialog.
[lyx.git] / src / frontends / qt2 / QVCLog.C
1 /**
2  * \file QVCLog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "Lsstream.h"
18 #include "gettext.h"
19 #include "LyXView.h"
20 #include "ControlVCLog.h"
21
22 #include "QVCLog.h"
23 #include "QVCLogDialog.h"
24 #include "Qt2BC.h"
25
26 #include <qtextview.h>
27 #include <qpushbutton.h>
28
29 typedef Qt2CB<ControlVCLog, Qt2DB<QVCLogDialog> > base_class;
30
31
32 QVCLog::QVCLog()
33         : base_class(_("VCLog"))
34 {
35 }
36
37
38 void QVCLog::build_dialog()
39 {
40         dialog_.reset(new QVCLogDialog(this));
41
42         bc().setCancel(dialog_->closePB);
43 }
44
45
46 void QVCLog::update_contents()
47 {
48         dialog_->setCaption(string(_("Version control log for ") + controller().getBufferFileName()).c_str());
49
50         dialog_->vclogTV->setText("");
51
52         ostringstream ss;
53         controller().getVCLogFile(ss);
54
55         dialog_->vclogTV->setText(ss.str().c_str());
56 }