[libgepub/rust] Fixed page next and page prev signals
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgepub/rust] Fixed page next and page prev signals
- Date: Mon, 13 Mar 2017 16:05:16 +0000 (UTC)
commit c4a4f25cccc6ff931672ac676f861a71429db005
Author: Daniel GarcĂa Moreno <danigm wadobo com>
Date: Mon Mar 13 17:03:53 2017 +0100
Fixed page next and page prev signals
libgepub/gepub-doc.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libgepub/gepub-doc.c b/libgepub/gepub-doc.c
index 51e8a95..6630805 100644
--- a/libgepub/gepub-doc.c
+++ b/libgepub/gepub-doc.c
@@ -313,8 +313,11 @@ gepub_doc_get_current_with_epub_uris (GepubDoc *doc)
gboolean
gepub_doc_go_next (GepubDoc *doc)
{
- g_object_notify_by_pspec (G_OBJECT (doc), properties[PROP_PAGE]);
- return epub_next_page (doc->rust_epub_doc);
+ gboolean isok = epub_next_page (doc->rust_epub_doc);
+ if (isok) {
+ g_object_notify_by_pspec (G_OBJECT (doc), properties[PROP_PAGE]);
+ }
+ return isok;
}
/**
@@ -326,8 +329,11 @@ gepub_doc_go_next (GepubDoc *doc)
gboolean
gepub_doc_go_prev (GepubDoc *doc)
{
- g_object_notify_by_pspec (G_OBJECT (doc), properties[PROP_PAGE]);
- return epub_prev_page (doc->rust_epub_doc);
+ gboolean isok = epub_prev_page (doc->rust_epub_doc);
+ if (isok) {
+ g_object_notify_by_pspec (G_OBJECT (doc), properties[PROP_PAGE]);
+ }
+ return isok;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]