X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiChanges.cpp;h=a27d24f5808bc96255a3d2a5b807c1ab59eed11f;hb=43c09d723435a5b203f2ac0c39e2086de836b386;hp=a2568fed31ea54e9a722f38f698711dc0ba0fce6;hpb=64e5b6de925fdb3fe523ffa6225d25f16b3d035d;p=lyx.git diff --git a/src/frontends/qt4/GuiChanges.cpp b/src/frontends/qt4/GuiChanges.cpp index a2568fed31..a27d24f580 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 @@ -35,16 +34,16 @@ namespace lyx { namespace frontend { using support::bformat; +using support::formatted_time; -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 +54,6 @@ GuiChanges::GuiChanges(LyXView & lv) } -void GuiChanges::closeEvent(QCloseEvent *e) -{ - slotClose(); - e->accept(); -} - - void GuiChanges::updateContents() { docstring text; @@ -83,6 +75,12 @@ void GuiChanges::nextChange() } +void GuiChanges::previousChange() +{ + dispatch(FuncRequest(LFUN_CHANGE_PREVIOUS)); +} + + docstring GuiChanges::changeDate() const { Change const & c = bufferview()->getCurrentChange(); @@ -125,10 +123,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"