<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/106058/">http://git.reviewboard.kde.org/r/106058/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Okular.</div>
<div>By Tobias Koenig.</div>
<p style="color: grey;"><i>Updated Aug. 21, 2012, 7:06 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Changed patch that uses only notifyCurrentPageChanged(int previous, int current) instead of two separated callbacks.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The DocumentObserver API currently does not provide a way to notify about page changes, only about viewport changes. That means each implementation of DocumentObserver (e.g. TOC, MiniBar, SideReview etc.) kept a private variable to keep track of the current page to detect page changes.
This patch moves the page change detection into the Okular::Document class and extends the Okular::DocumentObserver API with the two callbacks notifyCurrentPageAboutToBeChanged(int page) and notifyCurrentPageChanged(int page).
That allows the implementations of Okular::DocumentObserver to just reimplement the notifyCurrentPageChanged() callback instead of reimplementing the page-changed-detection logic.
Since the two callbacks are always invoked on _all_ listeners, the PageView has now a chance to get informed about page changes even though it's notifyViewport() method is not invoked if it changes the viewport itself.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> (updated)</h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>core/document.cpp <span style="color: grey">(f6bf699)</span></li>
<li>core/document_p.h <span style="color: grey">(54e922d)</span></li>
<li>core/observer.h <span style="color: grey">(76c096c)</span></li>
<li>core/observer.cpp <span style="color: grey">(0201a1d)</span></li>
<li>ui/minibar.h <span style="color: grey">(acb1163)</span></li>
<li>ui/minibar.cpp <span style="color: grey">(051df72)</span></li>
<li>ui/pagesizelabel.h <span style="color: grey">(ea508b8)</span></li>
<li>ui/pagesizelabel.cpp <span style="color: grey">(4a80779)</span></li>
<li>ui/pageview.h <span style="color: grey">(43ca2ab)</span></li>
<li>ui/pageview.cpp <span style="color: grey">(5e04412)</span></li>
<li>ui/presentationwidget.h <span style="color: grey">(20dbcbb)</span></li>
<li>ui/presentationwidget.cpp <span style="color: grey">(f4da539)</span></li>
<li>ui/side_reviews.h <span style="color: grey">(d063b7b)</span></li>
<li>ui/side_reviews.cpp <span style="color: grey">(a036c48)</span></li>
<li>ui/thumbnaillist.h <span style="color: grey">(0d7136b)</span></li>
<li>ui/thumbnaillist.cpp <span style="color: grey">(8b23025)</span></li>
<li>ui/toc.h <span style="color: grey">(4e63ef6)</span></li>
<li>ui/toc.cpp <span style="color: grey">(3203c79)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/106058/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>