[Okular-devel] Review Request: Introduce currentPageChanged callbacks to DocumentObserver interface
Albert Astals Cid
tsdgeos at terra.es
Wed Sep 5 21:43:46 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106058/#review18593
-----------------------------------------------------------
Seems good, feel free to commit after doing this two minor changes.
Change 1: Since this changes the ABI we need to increase the soname please change CMakeLists.txt
set_target_properties(okularcore PROPERTIES VERSION 1.9.0 SOVERSION 1 )
to
set_target_properties(okularcore PROPERTIES VERSION 2.0.0 SOVERSION 2 )
ui/pageview.h
<http://git.reviewboard.kde.org/r/106058/#comment14714>
Change 2: No need to implement this one if we don't do anything?
- Albert Astals Cid
On Sept. 5, 2012, 6:43 a.m., Tobias Koenig wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106058/
> -----------------------------------------------------------
>
> (Updated Sept. 5, 2012, 6:43 a.m.)
>
>
> Review request for Okular.
>
>
> Description
> -------
>
> 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.
>
>
> Diffs
> -----
>
> ui/toc.h 4e63ef6
> ui/toc.cpp 3203c79
> ui/thumbnaillist.cpp 8b23025
> ui/thumbnaillist.h 0d7136b
> ui/side_reviews.h d063b7b
> ui/side_reviews.cpp a036c48
> ui/pagesizelabel.cpp 4a80779
> ui/pageview.h 43ca2ab
> ui/pageview.cpp 8ffca51
> ui/presentationwidget.h 20dbcbb
> ui/presentationwidget.cpp 37523e8
> ui/pagesizelabel.h ea508b8
> ui/minibar.cpp 051df72
> ui/minibar.h acb1163
> core/document.cpp f6bf699
> core/observer.h 76c096c
> core/observer.cpp 0201a1d
>
> Diff: http://git.reviewboard.kde.org/r/106058/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Tobias Koenig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20120905/6160a4fb/attachment-0001.html>
More information about the Okular-devel
mailing list