From b2512f44d65ba974f6a154515a6d93e075ec2798 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Tue, 7 Sep 2010 11:29:05 +0000 Subject: [PATCH] These things need to be updated for each dialog opening git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35308 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXVC.cpp | 2 +- src/LyXVC.h | 2 +- src/frontends/qt4/GuiCompareHistory.cpp | 6 +++++- src/frontends/qt4/GuiCompareHistory.h | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index 5d3a49fdd9..9efa9ef296 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -282,7 +282,7 @@ string const LyXVC::getLogFile() const } -std::string LyXVC::revisionInfo(RevisionInfo const info) +string LyXVC::revisionInfo(RevisionInfo const info) const { if (!vcs) return string(); diff --git a/src/LyXVC.h b/src/LyXVC.h index fb561a39e2..d787ca46aa 100644 --- a/src/LyXVC.h +++ b/src/LyXVC.h @@ -157,7 +157,7 @@ public: * Its safe to call it regardless VCS is in usage or this * info is (un)available. Returns empty string in such a case. */ - std::string revisionInfo(RevisionInfo const info); + std::string revisionInfo(RevisionInfo const info) const; private: /// diff --git a/src/frontends/qt4/GuiCompareHistory.cpp b/src/frontends/qt4/GuiCompareHistory.cpp index 35cff62151..d33103244a 100644 --- a/src/frontends/qt4/GuiCompareHistory.cpp +++ b/src/frontends/qt4/GuiCompareHistory.cpp @@ -42,8 +42,11 @@ GuiCompareHistory::GuiCompareHistory(GuiView & lv) connect(revbackRB, SIGNAL(clicked()), this, SLOT(selectRevback())); connect(betweenrevRB, SIGNAL(clicked()), this, SLOT(selectBetweenrev())); +} - string revstring = lv.currentBufferView()->buffer().lyxvc().revisionInfo(LyXVC::File); +bool GuiCompareHistory::initialiseParams(std::string const &) +{ + string revstring = lyxview().currentBufferView()->buffer().lyxvc().revisionInfo(LyXVC::File); int rev=0; if (prefixIs(revstring, "r")) revstring = ltrim(revstring,"r"); @@ -61,6 +64,7 @@ GuiCompareHistory::GuiCompareHistory(GuiView & lv) //bc().setOK(okPB); //bc().setCancel(cancelPB); enableControls(); + return true; } diff --git a/src/frontends/qt4/GuiCompareHistory.h b/src/frontends/qt4/GuiCompareHistory.h index bb9eac5a8a..ce75f40333 100644 --- a/src/frontends/qt4/GuiCompareHistory.h +++ b/src/frontends/qt4/GuiCompareHistory.h @@ -42,7 +42,7 @@ private: /// void updateContents(); /// - bool initialiseParams(std::string const &) { return true; } + bool initialiseParams(std::string const &); /// bool isBufferDependent() const { return true; } ///