From 71e352f3f44ed70a2837eb7f4b15eb952f779279 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 5 Dec 2003 14:07:24 +0000 Subject: [PATCH] Say "Byeeeee" to 472 lines. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8205 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 5 + src/frontends/controllers/ControlVCLog.C | 56 ---------- src/frontends/controllers/ControlVCLog.h | 36 ------- src/frontends/controllers/Makefile.am | 2 - src/frontends/qt2/ChangeLog | 8 ++ src/frontends/qt2/Makefile.am | 1 - src/frontends/qt2/Makefile.dialogs | 2 - src/frontends/qt2/QVCLog.C | 58 ---------- src/frontends/qt2/QVCLog.h | 40 ------- src/frontends/qt2/QVCLogDialog.C | 41 -------- src/frontends/qt2/QVCLogDialog.h | 32 ------ src/frontends/qt2/ui/QVCLogDialogBase.ui | 128 ----------------------- src/frontends/xforms/ChangeLog | 6 ++ src/frontends/xforms/FormVCLog.C | 37 ------- src/frontends/xforms/FormVCLog.h | 37 ------- src/frontends/xforms/Makefile.am | 2 - 16 files changed, 19 insertions(+), 472 deletions(-) delete mode 100644 src/frontends/controllers/ControlVCLog.C delete mode 100644 src/frontends/controllers/ControlVCLog.h delete mode 100644 src/frontends/qt2/QVCLog.C delete mode 100644 src/frontends/qt2/QVCLog.h delete mode 100644 src/frontends/qt2/QVCLogDialog.C delete mode 100644 src/frontends/qt2/QVCLogDialog.h delete mode 100644 src/frontends/qt2/ui/QVCLogDialogBase.ui delete mode 100644 src/frontends/xforms/FormVCLog.C delete mode 100644 src/frontends/xforms/FormVCLog.h diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 0d8ff120c3..74a80e448a 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2003-12-05 Angus Leeming + + * ControlVCLog.[Ch]: removed. + * Makefile.am: remove ControlVCLog.[Ch] + 2003-12-05 Angus Leeming * ControlLog.[Ch]: re-worked so that it is passed the logtype and diff --git a/src/frontends/controllers/ControlVCLog.C b/src/frontends/controllers/ControlVCLog.C deleted file mode 100644 index 4e445921eb..0000000000 --- a/src/frontends/controllers/ControlVCLog.C +++ /dev/null @@ -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 - -#include "ControlVCLog.h" -#include "buffer.h" -#include "gettext.h" -#include "lyxvc.h" -#include "support/lyxlib.h" -#include - -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); -} diff --git a/src/frontends/controllers/ControlVCLog.h b/src/frontends/controllers/ControlVCLog.h deleted file mode 100644 index d1a8c437d0..0000000000 --- a/src/frontends/controllers/ControlVCLog.h +++ /dev/null @@ -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 diff --git a/src/frontends/controllers/Makefile.am b/src/frontends/controllers/Makefile.am index 988bc21f7f..7bbef306b9 100644 --- a/src/frontends/controllers/Makefile.am +++ b/src/frontends/controllers/Makefile.am @@ -102,8 +102,6 @@ libcontrollers_la_SOURCES= \ ControlThesaurus.h \ ControlToc.C \ ControlToc.h \ - ControlVCLog.C \ - ControlVCLog.h \ ControlVSpace.C \ ControlVSpace.h \ ControlWrap.C \ diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 8959e82573..da54fef7cb 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,11 @@ +2003-12-05 Angus Leeming + + * QVCLog.[Ch]: + * QVCLogDialog.[Ch]: + * ui/QVCLogDialogBase.ui: removed. + + * Makefile.am, Makefile.dialogs: remove all mention of these files. + 2003-12-05 Angus Leeming * QLog.C: much simplified, thanks to the more powerful interface diff --git a/src/frontends/qt2/Makefile.am b/src/frontends/qt2/Makefile.am index 36fb2b10f9..065eea269d 100644 --- a/src/frontends/qt2/Makefile.am +++ b/src/frontends/qt2/Makefile.am @@ -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 \ diff --git a/src/frontends/qt2/Makefile.dialogs b/src/frontends/qt2/Makefile.dialogs index 41a8a81f33..4bc4e7bfd4 100644 --- a/src/frontends/qt2/Makefile.dialogs +++ b/src/frontends/qt2/Makefile.dialogs @@ -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 \ diff --git a/src/frontends/qt2/QVCLog.C b/src/frontends/qt2/QVCLog.C deleted file mode 100644 index 7ebbeadeda..0000000000 --- a/src/frontends/qt2/QVCLog.C +++ /dev/null @@ -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 - -#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 -#include - -using lyx::support::bformat; - -using std::ostringstream; - - -typedef QController > 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())); -} diff --git a/src/frontends/qt2/QVCLog.h b/src/frontends/qt2/QVCLog.h deleted file mode 100644 index e28e744dd4..0000000000 --- a/src/frontends/qt2/QVCLog.h +++ /dev/null @@ -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 > -{ -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 diff --git a/src/frontends/qt2/QVCLogDialog.C b/src/frontends/qt2/QVCLogDialog.C deleted file mode 100644 index 7b255121c0..0000000000 --- a/src/frontends/qt2/QVCLogDialog.C +++ /dev/null @@ -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 - - - - -#include "QVCLog.h" -#include "QVCLogDialog.h" - -#include - - -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(); -} diff --git a/src/frontends/qt2/QVCLogDialog.h b/src/frontends/qt2/QVCLogDialog.h deleted file mode 100644 index e5d317feea..0000000000 --- a/src/frontends/qt2/QVCLogDialog.h +++ /dev/null @@ -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 diff --git a/src/frontends/qt2/ui/QVCLogDialogBase.ui b/src/frontends/qt2/ui/QVCLogDialogBase.ui deleted file mode 100644 index 074e1a7742..0000000000 --- a/src/frontends/qt2/ui/QVCLogDialogBase.ui +++ /dev/null @@ -1,128 +0,0 @@ - -QVCLogDialogBase -config.h -qt_helpers.h - - QDialog - - name - QVCLogDialogBase - - - geometry - - 0 - 0 - 416 - 328 - - - - caption - Version control log - - - sizeGripEnabled - true - - - - margin - 11 - - - spacing - 6 - - - QTextView - - name - vclogTV - - - - QLayoutWidget - - name - Layout27 - - - - margin - 0 - - - spacing - 6 - - - - name - Spacer3 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - updatePB - - - text - &Update - - - default - true - - - toolTip - Update the display - - - - QPushButton - - name - closePB - - - text - &Close - - - - - - - - - updatePB - clicked() - QVCLogDialogBase - updateClicked() - - updateClicked() - - - vclogTV - updatePB - closePB - - diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 55c96416ab..9b1f3a4922 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2003-12-05 Angus Leeming + + * FormVCLog.[Ch]: removed. + + * Makefile.am: remove all mention of these files. + 2003-12-05 Angus Leeming * FormLog.C: much simplified, thanks to the more powerful interface diff --git a/src/frontends/xforms/FormVCLog.C b/src/frontends/xforms/FormVCLog.C deleted file mode 100644 index 87c1a9e606..0000000000 --- a/src/frontends/xforms/FormVCLog.C +++ /dev/null @@ -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 - -#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(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()); -} diff --git a/src/frontends/xforms/FormVCLog.h b/src/frontends/xforms/FormVCLog.h deleted file mode 100644 index 58aed48889..0000000000 --- a/src/frontends/xforms/FormVCLog.h +++ /dev/null @@ -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 { -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 diff --git a/src/frontends/xforms/Makefile.am b/src/frontends/xforms/Makefile.am index 8e6ff55adf..375fbd731f 100644 --- a/src/frontends/xforms/Makefile.am +++ b/src/frontends/xforms/Makefile.am @@ -152,8 +152,6 @@ libxforms_la_SOURCES = \ FormToc.h \ FormUrl.C \ FormUrl.h \ - FormVCLog.C \ - FormVCLog.h \ FormVSpace.C \ FormVSpace.h \ FormWrap.C \ -- 2.39.2