1. 27 Apr, 2019 3 commits
    • IBBoard's avatar
      Stop chapter number updates breaking navigation to anchor links · dbd6d484
      IBBoard authored
      The reload_current_chapter() function can't check the current URI
      to see whether it has changed and *must* reload the chapter so that
      pagination changes are applied. Instead, we can temporarily remove
      the signal handler to prevent `notify::chapter` triggering a page
      reload that breaks anchor links.
      dbd6d484
    • IBBoard's avatar
      Update the chapter number when the page changes · a5f2952e
      IBBoard authored
      This ensures that hyperlinks between pages trigger chapter number
      change signals, which let UIs update their position
      
      Note: This currently triggers a page reload, which breaks links
      to anchors within pages
      a5f2952e
    • IBBoard's avatar
      Work with file paths, not URI substrings, in custom URI scheme · 98d613be
      IBBoard authored
      Using `…_get_uri()` gives a string that includes the anchor, which
      isn't a valid entry path in the archive. `…_get_path()` gets just
      the path (but with a leading slash).
      
      Rather than special case the widget code to handle the starting slash,
      the archive and doc now ignore the leading slash in paths. This allows
      `…_get_path()` to be used anywhere in the code base without additional
      text manipulation each time.
      98d613be
  2. 21 Apr, 2019 1 commit
  3. 04 Apr, 2019 2 commits
  4. 16 Nov, 2018 1 commit
    • Daniel García Moreno's avatar
      Unscape paths before get from the archive · af28e5b1
      Daniel García Moreno authored
      File paths can be URL encoded because the HTML stuff so we need to
      unescape the string just before try to get from the archive.
      
      I did that in the gepub-doc and not in the gepub-archive because I think
      that the archive shouldn't know nothing about URL conversion.
      
      Fix #7
      af28e5b1
  5. 21 Sep, 2018 2 commits
    • Daniel García Moreno's avatar
      Helper functions to convert from res to chapter · 021364bc
      Daniel García Moreno authored
      The `gepub_doc_resource_uri_to_chapter` and
      `gepub_doc_resource_id_to_chapter` methods are useful to convert a
      resource ID or URI to a chapter number and then use in the
      `gepub_doc_set_chapter` method, to navigate.
      
      This new helper functions can be combined with the new
      `gepub_doc_get_toc` to navigate in the document.
      
      See #6
      021364bc
    • Daniel García Moreno's avatar
      Add TOC parse to GepubDoc · 8680a463
      Daniel García Moreno authored
      The new `gepub_doc_get_toc` function returns a GList of GepubNavPoint
      with the `toc.ncx` information. There you can find the epub index.
      
      I've added a test function to the gepub-test that shows this
      information.
      
      Fix #6
      8680a463
  6. 15 Mar, 2018 2 commits
  7. 24 Feb, 2018 3 commits
  8. 21 Feb, 2018 1 commit
    • Chris Lee's avatar
      Fix the gir generation · 2a0d922f
      Chris Lee authored
      Set the proper C header name for the library, and also save the
      generated gir in a new variable so that it can be accessed to
      more easily generate API bindings.
      2a0d922f
  9. 17 Jan, 2018 4 commits
    • Bastien Nocera's avatar
      widget: Fix warning at run-time · fc0df782
      Bastien Nocera authored
      There's nothing to reload if we don't have a doc already loaded.
      
      ** (org.gnome.Books:19113): CRITICAL **: gepub_doc_get_current_with_epub_uris: assertion 'GEPUB_IS_DOC (doc)' failed
      
       #0  _g_log_abort (breakpoint=breakpoint@entry=1) at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c:583
       #1  0x00007ffff51b6236 in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffff2068) at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c:1391
       #2  0x00007ffff51b6382 in g_log (log_domain=log_domain@entry=0x0, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff51ffffb "%s: assertion '%s' failed")
           at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c:1432
       #3  0x00007ffff51b6989 in g_return_if_fail_warning (log_domain=log_domain@entry=0x0, pretty_function=pretty_function@entry=0x7fffd1b72740 <__func__.30500> "gepub_doc_get_current_with_epub_uris",
           expression=expression@entry=0x7fffd1b724a1 "GEPUB_IS_DOC (doc)") at /home/hadess/Projects/jhbuild/glib/glib/gmessages.c:2755
       #4  0x00007fffd1b706b0 in gepub_doc_get_current_with_epub_uris (doc=0x0) at libgepub/libgepub/gepub-doc.c:541
       #5  0x00007fffd1b7126f in reload_current_chapter (widget=0x5555562341f0) at libgepub/libgepub/gepub-widget.c:446
      fc0df782
    • Daniel García Moreno's avatar
      Updated version number to 0.6 · 3dd04903
      Daniel García Moreno authored
      I've change the base directory and each lib to use the 0.6 in the name
      so we'll be able to have different versions of libgepub installed in the
      system
      3dd04903
    • Daniel García Moreno's avatar
      lib: Fix gepub-widget chapter change signal · e2055cfa
      Daniel García Moreno authored
      The GepubDoc property page has been changed to chapter so we need to
      listen to that property change on the GepubWidget to reload the chapter.
      e2055cfa
    • Daniel García Moreno's avatar
      Merge branch 'wip/rename-pages-to-chapters' into 'master' · 08fb5839
      Daniel García Moreno authored
      This reverts commit 5fc2d0b6.
      08fb5839
  10. 16 Jan, 2018 1 commit
  11. 15 Jan, 2018 8 commits
  12. 13 Nov, 2017 7 commits
  13. 12 Nov, 2017 4 commits
  14. 15 Aug, 2017 1 commit