X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiChanges.cpp;h=63268ae24e808d3dc3f89428c7649ffd3c5455b7;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=e5587819b2e58b17feb031ecd0d63530b84fcf19;hpb=6f3cdf8da80a6b3889f2a3b8b53f44590152d600;p=lyx.git diff --git a/src/frontends/qt4/GuiChanges.cpp b/src/frontends/qt4/GuiChanges.cpp index e5587819b2..63268ae24e 100644 --- a/src/frontends/qt4/GuiChanges.cpp +++ b/src/frontends/qt4/GuiChanges.cpp @@ -15,6 +15,7 @@ #include "qt_helpers.h" +#include "support/gettext.h" #include "support/lstrings.h" #include "support/lyxtime.h" @@ -24,10 +25,8 @@ #include "BufferView.h" #include "Changes.h" #include "FuncRequest.h" -#include "lyxfind.h" #include "LyXRC.h" -#include #include @@ -36,14 +35,14 @@ namespace frontend { using support::bformat; -GuiChanges::GuiChanges(LyXView & lv) - : GuiDialog(lv, "changes") +GuiChanges::GuiChanges(GuiView & lv) + : GuiDialog(lv, "changes", qt_("Merge Changes")) { setupUi(this); - 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())); @@ -54,13 +53,6 @@ GuiChanges::GuiChanges(LyXView & lv) } -void GuiChanges::closeEvent(QCloseEvent *e) -{ - slotClose(); - e->accept(); -} - - void GuiChanges::updateContents() { docstring text; @@ -82,6 +74,12 @@ void GuiChanges::nextChange() } +void GuiChanges::previousChange() +{ + dispatch(FuncRequest(LFUN_CHANGE_PREVIOUS)); +} + + docstring GuiChanges::changeDate() const { Change const & c = bufferview()->getCurrentChange(); @@ -124,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"