mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Say "Byeeeee" to 472 lines.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8205 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dbd0f58ebc
commit
71e352f3f4
@ -1,3 +1,8 @@
|
||||
2003-12-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlVCLog.[Ch]: removed.
|
||||
* Makefile.am: remove ControlVCLog.[Ch]
|
||||
|
||||
2003-12-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlLog.[Ch]: re-worked so that it is passed the logtype and
|
||||
|
@ -1,56 +0,0 @@
|
||||
/**
|
||||
* \file ControlVCLog.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "ControlVCLog.h"
|
||||
#include "buffer.h"
|
||||
#include "gettext.h"
|
||||
#include "lyxvc.h"
|
||||
#include "support/lyxlib.h"
|
||||
#include <fstream>
|
||||
|
||||
using lyx::support::unlink;
|
||||
|
||||
using std::endl;
|
||||
using std::ostream;
|
||||
using std::string;
|
||||
|
||||
|
||||
ControlVCLog::ControlVCLog(Dialog & parent)
|
||||
: Dialog::Controller(parent)
|
||||
{}
|
||||
|
||||
|
||||
string const ControlVCLog::getBufferFileName() const
|
||||
{
|
||||
return kernel().buffer().fileName();
|
||||
}
|
||||
|
||||
|
||||
void ControlVCLog::getVCLogFile(ostream & ss) const
|
||||
{
|
||||
string const name = kernel().buffer().lyxvc().getLogFile();
|
||||
|
||||
std::ifstream in(name.c_str());
|
||||
|
||||
bool found(false);
|
||||
|
||||
if (in) {
|
||||
ss << in.rdbuf();
|
||||
found = ss.good();
|
||||
}
|
||||
|
||||
if (!found)
|
||||
ss << _("No version control log file found.") << endl;
|
||||
|
||||
unlink(name);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file ControlVCLog.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
* \author Angus Leeming
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef CONTROLVCLOG_H
|
||||
#define CONTROLVCLOG_H
|
||||
|
||||
#include "Dialog.h"
|
||||
|
||||
class ControlVCLog : public Dialog::Controller {
|
||||
public:
|
||||
///
|
||||
ControlVCLog(Dialog &);
|
||||
/// Nothing to initialise in this case.
|
||||
virtual bool initialiseParams(std::string const &) { return true; }
|
||||
///
|
||||
virtual void clearParams() {}
|
||||
///
|
||||
virtual void dispatchParams() {}
|
||||
///
|
||||
virtual bool isBufferDependent() const { return true; }
|
||||
/// put the log file into the ostream
|
||||
void getVCLogFile(std::ostream & ss) const;
|
||||
/// get the filename of the buffer
|
||||
std::string const getBufferFileName() const;
|
||||
};
|
||||
|
||||
#endif // CONTROLVCLOG_H
|
@ -102,8 +102,6 @@ libcontrollers_la_SOURCES= \
|
||||
ControlThesaurus.h \
|
||||
ControlToc.C \
|
||||
ControlToc.h \
|
||||
ControlVCLog.C \
|
||||
ControlVCLog.h \
|
||||
ControlVSpace.C \
|
||||
ControlVSpace.h \
|
||||
ControlWrap.C \
|
||||
|
@ -1,3 +1,11 @@
|
||||
2003-12-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QVCLog.[Ch]:
|
||||
* QVCLogDialog.[Ch]:
|
||||
* ui/QVCLogDialogBase.ui: removed.
|
||||
|
||||
* Makefile.am, Makefile.dialogs: remove all mention of these files.
|
||||
|
||||
2003-12-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QLog.C: much simplified, thanks to the more powerful interface
|
||||
|
@ -63,7 +63,6 @@ libqt2_la_SOURCES = \
|
||||
QThesaurus.C QThesaurus.h \
|
||||
QToc.C QToc.h \
|
||||
QURL.C QURL.h \
|
||||
QVCLog.C QVCLog.h \
|
||||
QVSpace.C QVSpace.h \
|
||||
QWorkArea.h QWorkArea.C \
|
||||
QWrap.C QWrap.h \
|
||||
|
@ -65,7 +65,6 @@ UIFILES = \
|
||||
QThesaurusDialogBase.ui \
|
||||
QTocDialogBase.ui \
|
||||
QURLDialogBase.ui \
|
||||
QVCLogDialogBase.ui \
|
||||
QVSpaceDialogBase.ui \
|
||||
QWrapDialogBase.ui
|
||||
|
||||
@ -124,7 +123,6 @@ MOCFILES = \
|
||||
qttableview.C qttableview.h \
|
||||
QtView.C QtView.h \
|
||||
QURLDialog.C QURLDialog.h \
|
||||
QVCLogDialog.C QVCLogDialog.h \
|
||||
QVSpaceDialog.C QVSpaceDialog.h \
|
||||
QWrapDialog.C QWrapDialog.h \
|
||||
QLToolbar.C QLToolbar.h \
|
||||
|
@ -1,58 +0,0 @@
|
||||
/**
|
||||
* \file QVCLog.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "support/std_sstream.h"
|
||||
#include "qt_helpers.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "ControlVCLog.h"
|
||||
|
||||
#include "QVCLog.h"
|
||||
#include "QVCLogDialog.h"
|
||||
#include "Qt2BC.h"
|
||||
|
||||
#include <qtextview.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
using lyx::support::bformat;
|
||||
|
||||
using std::ostringstream;
|
||||
|
||||
|
||||
typedef QController<ControlVCLog, QView<QVCLogDialog> > base_class;
|
||||
|
||||
QVCLog::QVCLog(Dialog & parent)
|
||||
: base_class(parent, _("LyX: Version Control Log"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void QVCLog::build_dialog()
|
||||
{
|
||||
dialog_.reset(new QVCLogDialog(this));
|
||||
|
||||
bcview().setCancel(dialog_->closePB);
|
||||
}
|
||||
|
||||
|
||||
void QVCLog::update_contents()
|
||||
{
|
||||
setTitle(bformat(_("Version control log for %1$s"),
|
||||
controller().getBufferFileName()));
|
||||
|
||||
dialog_->vclogTV->setText("");
|
||||
|
||||
ostringstream ss;
|
||||
controller().getVCLogFile(ss);
|
||||
|
||||
dialog_->vclogTV->setText(toqstr(ss.str()));
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file QVCLog.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef QVCLOG_H
|
||||
#define QVCLOG_H
|
||||
|
||||
|
||||
#include "QDialogView.h"
|
||||
|
||||
|
||||
class ControlVCLog;
|
||||
class QVCLogDialog;
|
||||
|
||||
///
|
||||
class QVCLog
|
||||
: public QController<ControlVCLog, QView<QVCLogDialog> >
|
||||
{
|
||||
public:
|
||||
///
|
||||
friend class QVCLogDialog;
|
||||
///
|
||||
QVCLog(Dialog &);
|
||||
private:
|
||||
/// Apply changes
|
||||
virtual void apply() {}
|
||||
/// update
|
||||
virtual void update_contents();
|
||||
/// build the dialog
|
||||
virtual void build_dialog();
|
||||
};
|
||||
|
||||
#endif // QVCLOG_H
|
@ -1,41 +0,0 @@
|
||||
/**
|
||||
* \file QVCLogDialog.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
|
||||
|
||||
#include "QVCLog.h"
|
||||
#include "QVCLogDialog.h"
|
||||
|
||||
#include <qpushbutton.h>
|
||||
|
||||
|
||||
QVCLogDialog::QVCLogDialog(QVCLog * form)
|
||||
: QVCLogDialogBase(0, 0, false, 0),
|
||||
form_(form)
|
||||
{
|
||||
connect(closePB, SIGNAL(clicked()),
|
||||
form, SLOT(slotClose()));
|
||||
}
|
||||
|
||||
|
||||
void QVCLogDialog::closeEvent(QCloseEvent * e)
|
||||
{
|
||||
form_->slotWMHide();
|
||||
e->accept();
|
||||
}
|
||||
|
||||
|
||||
void QVCLogDialog::updateClicked()
|
||||
{
|
||||
form_->update_contents();
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file QVCLogDialog.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef QVCLOGDIALOG_H
|
||||
#define QVCLOGDIALOG_H
|
||||
|
||||
|
||||
#include "ui/QVCLogDialogBase.h"
|
||||
|
||||
class QVCLog;
|
||||
|
||||
class QVCLogDialog : public QVCLogDialogBase {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QVCLogDialog(QVCLog * form);
|
||||
protected slots:
|
||||
virtual void updateClicked();
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent * e);
|
||||
private:
|
||||
QVCLog * form_;
|
||||
};
|
||||
|
||||
#endif // QVCLOGDIALOG_H
|
@ -1,128 +0,0 @@
|
||||
<!DOCTYPE UI><UI>
|
||||
<class>QVCLogDialogBase</class>
|
||||
<include location="global">config.h</include>
|
||||
<include location="local">qt_helpers.h</include>
|
||||
<widget>
|
||||
<class>QDialog</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>QVCLogDialogBase</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>geometry</name>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>416</width>
|
||||
<height>328</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>caption</name>
|
||||
<string>Version control log</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeGripEnabled</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<vbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QTextView</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>vclogTV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>Layout27</cstring>
|
||||
</property>
|
||||
<hbox>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<spacer>
|
||||
<property>
|
||||
<name>name</name>
|
||||
<cstring>Spacer3</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>orientation</name>
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>sizeType</name>
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property>
|
||||
<name>sizeHint</name>
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget>
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>updatePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Update</string>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>default</name>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>Update the display</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget>
|
||||
<class>QPushButton</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>closePB</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>updatePB</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>QVCLogDialogBase</receiver>
|
||||
<slot>updateClicked()</slot>
|
||||
</connection>
|
||||
<slot access="public">updateClicked()</slot>
|
||||
</connections>
|
||||
<tabstops>
|
||||
<tabstop>vclogTV</tabstop>
|
||||
<tabstop>updatePB</tabstop>
|
||||
<tabstop>closePB</tabstop>
|
||||
</tabstops>
|
||||
</UI>
|
@ -1,3 +1,9 @@
|
||||
2003-12-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FormVCLog.[Ch]: removed.
|
||||
|
||||
* Makefile.am: remove all mention of these files.
|
||||
|
||||
2003-12-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FormLog.C: much simplified, thanks to the more powerful interface
|
||||
|
@ -1,37 +0,0 @@
|
||||
/**
|
||||
* \file FormVCLog.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "FormVCLog.h"
|
||||
#include "ControlVCLog.h"
|
||||
#include "forms/form_browser.h"
|
||||
|
||||
#include "xformsBC.h"
|
||||
|
||||
#include "lyx_forms.h"
|
||||
|
||||
#include "support/std_sstream.h"
|
||||
|
||||
|
||||
FormVCLog::FormVCLog(Dialog & parent)
|
||||
: FormController<ControlVCLog, FormBrowser>(parent, _("Version Control Log"))
|
||||
{}
|
||||
|
||||
|
||||
void FormVCLog::update()
|
||||
{
|
||||
fl_clear_browser(dialog_->browser);
|
||||
|
||||
std::ostringstream ss;
|
||||
controller().getVCLogFile(ss);
|
||||
|
||||
fl_add_browser_line(dialog_->browser, ss.str().c_str());
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file FormVCLog.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author John Levon
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef FORMVCLOG_H
|
||||
#define FORMVCLOG_H
|
||||
|
||||
|
||||
#include "FormBrowser.h"
|
||||
|
||||
class ControlVCLog;
|
||||
|
||||
/**
|
||||
* This class provides an XForms implementation of the Version Control
|
||||
* log viewer
|
||||
*/
|
||||
class FormVCLog : public FormController<ControlVCLog, FormBrowser> {
|
||||
public:
|
||||
///
|
||||
FormVCLog(Dialog &);
|
||||
|
||||
// Functions accessible to the Controller.
|
||||
|
||||
/// Set the Params variable for the Controller.
|
||||
virtual void apply() {}
|
||||
/// Update dialog before/whilst showing it.
|
||||
virtual void update();
|
||||
};
|
||||
|
||||
#endif // FORMVCLOG_H
|
@ -152,8 +152,6 @@ libxforms_la_SOURCES = \
|
||||
FormToc.h \
|
||||
FormUrl.C \
|
||||
FormUrl.h \
|
||||
FormVCLog.C \
|
||||
FormVCLog.h \
|
||||
FormVSpace.C \
|
||||
FormVSpace.h \
|
||||
FormWrap.C \
|
||||
|
Loading…
Reference in New Issue
Block a user