]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiChanges.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiChanges.cpp
index a2568fed31ea54e9a722f38f698711dc0ba0fce6..63268ae24e808d3dc3f89428c7649ffd3c5455b7 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "qt_helpers.h"
 
+#include "support/gettext.h"
 #include "support/lstrings.h"
 #include "support/lyxtime.h"
 
 #include "BufferView.h"
 #include "Changes.h"
 #include "FuncRequest.h"
-#include "lyxfind.h"
 #include "LyXRC.h"
 
-#include <QCloseEvent>
 #include <QTextBrowser>
 
 
@@ -36,15 +35,14 @@ namespace frontend {
 
 using support::bformat;
 
-GuiChanges::GuiChanges(LyXView & lv)
-       : GuiDialog(lv, "changes"), Controller(this)
+GuiChanges::GuiChanges(GuiView & lv)
+       : GuiDialog(lv, "changes", qt_("Merge Changes"))
 {
        setupUi(this);
-       setController(this, false);
-       setViewTitle(_("Merge Changes"));
 
        connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
        connect(nextPB, SIGNAL(clicked()), this, SLOT(nextChange()));
+       connect(previousPB, SIGNAL(clicked()), this, SLOT(previousChange()));
        connect(rejectPB, SIGNAL(clicked()), this, SLOT(rejectChange()));
        connect(acceptPB, SIGNAL(clicked()), this, SLOT(acceptChange()));
 
@@ -55,13 +53,6 @@ GuiChanges::GuiChanges(LyXView & lv)
 }
 
 
-void GuiChanges::closeEvent(QCloseEvent *e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiChanges::updateContents()
 {
        docstring text;
@@ -83,6 +74,12 @@ void GuiChanges::nextChange()
 }
 
 
+void GuiChanges::previousChange()
+{
+       dispatch(FuncRequest(LFUN_CHANGE_PREVIOUS));
+}
+
+
 docstring GuiChanges::changeDate() const
 {
        Change const & c = bufferview()->getCurrentChange();
@@ -125,10 +122,10 @@ void GuiChanges::rejectChange()
 }
 
 
-Dialog * createGuiChanges(LyXView & lv) { return new GuiChanges(lv); }
+Dialog * createGuiChanges(GuiView & lv) { return new GuiChanges(lv); }
 
 
 } // namespace frontend
 } // namespace lyx
 
-#include "GuiChanges_moc.cpp"
+#include "moc_GuiChanges.cpp"