- 31 Mar, 2021 7 commits
-
-
Bastien Nocera authored
-
Bastien Nocera authored
When setting the internal resources paths to use the custom epub scheme, remove all the resources with absolute URIs, they might force us to load data from external locations.
-
Bastien Nocera authored
This fixes warnings when loading basic-v3plus2.epub.zip. CRITICAL **: gepub_doc_get_resource_mime_by_id: assertion 'id != NULL' failed
-
Bastien Nocera authored
Disable Javascript and Java when used in ePubs content.
-
Bastien Nocera authored
Fix critical error in gnome-books: Cannot register URI scheme epub more than once Create a new WebKitWebContext for each widget, so we don't run into the error above.
-
Bastien Nocera authored
The data might not be NULL-terminated, so don't read past the size: ==8841== Invalid read of size 1 ==8841== at 0x483BBF4: strlen (vg_replace_strmem.c:461) ==8841== by 0x7F5552D: __vfprintf_internal (in /usr/lib64/libc-2.29.so) ==8841== by 0x7F66BC4: __vasprintf_internal (in /usr/lib64/libc-2.29.so) ==8841== by 0x7E5E5AD: g_vasprintf (gprintf.c:330) ==8841== by 0x7E378FF: g_strdup_vprintf (gstrfuncs.c:514) ==8841== by 0x7E3799B: g_strdup_printf (gstrfuncs.c:540) ==8841== by 0x403651: test_doc_resources (test-gepub.c:257) ==8841== by 0x403651: main (test-gepub.c:452) ==8841== Address 0x1d5931ff is 0 bytes after a block of size 3,247 alloc'd ==8841== at 0x483AB1A: calloc (vg_replace_malloc.c:762) ==8841== by 0x7E1E580: g_malloc0 (gmem.c:129) ==8841== by 0x484BDAE: gepub_archive_read_entry (gepub-archive.c:149) ==8841== by 0x484BDAE: gepub_archive_read_entry (gepub-archive.c:132) ==8841== by 0x484C441: gepub_doc_get_resource_by_id (gepub-doc.c:537) ==8841== by 0x403632: test_doc_resources (test-gepub.c:255) ==8841== by 0x403632: main (test-gepub.c:452)
-
Bastien Nocera authored
-
- 27 Apr, 2019 3 commits
-
-
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.
-
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
-
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.
-
- 21 Apr, 2019 1 commit
-
-
IBBoard authored
If we rewrite them then we get "epub:///path/#anchor" URLs, which are no-longer page-relative
-
- 04 Apr, 2019 2 commits
-
-
Eddy Castillo authored
-
Eddy Castillo authored
WARNING: -Wl,--version-script,libgepub/gepub.map looks like a linker argument, but has_argument and other similar methods only support checking compiler arguments. Using them to check linker arguments are never supported, and results are likely to be wrong regardless of the compiler you are using. has_link_argument or other similar method can be used instead.
-
- 16 Nov, 2018 1 commit
-
-
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
-
- 21 Sep, 2018 2 commits
-
-
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
-
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
-
- 15 Mar, 2018 2 commits
-
-
Daniel García Moreno authored
-
Daniel García Moreno authored
-
- 24 Feb, 2018 3 commits
-
-
Chris Lee authored
Instead of not serving anything at all, serving an empty document when a resource is not found will usually let the epub render properly.
-
Daniel García Moreno authored
-
- 21 Feb, 2018 1 commit
-
-
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.
-
- 17 Jan, 2018 4 commits
-
-
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
-
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
-
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.
-
Daniel García Moreno authored
This reverts commit 5fc2d0b6.
-
- 16 Jan, 2018 1 commit
-
-
Daniel García Moreno authored
-
- 15 Jan, 2018 8 commits
-
-
Daniel Garcia Moreno authored
Revert "Merge branch 'wip/rename-pages-to-chapters' into 'master'" See merge request !3
-
Daniel Garcia Moreno authored
This reverts merge request !2
-
Daniel Garcia Moreno authored
lib: Rename "pages" to "chapters" in the doc API See merge request !2
-
Daniel Garcia Moreno authored
Misc bug fixes See merge request !1
-
Bastien Nocera authored
Don't change LC_NUMERIC to get a "." as the decimal point, as this could have an effect on the rest of the UI. Use g_ascii_formatd() to "print" the number with "." as the decimal point instead.
-
Bastien Nocera authored
So that it's clear that the "100" value isn't a random magic value but corresponds to 100%. Also mention that the value of chapter_pos is a percentage.
-
Bastien Nocera authored
When the main window is destroyed, and the view widget is as well, we'd receive a property change ("notify") signal for the parent widget of the view changing. Except that we're in the middle of destroying that view. Disconnect from the "notify" signal before exiting, so that we don't crash on exit.
-
Bastien Nocera authored
Pages were actually scrollable pages before the widget added pagination support. I think it best to rename the document API entry points to use "chapters" as this will make it clear that "widget pages" and "document pages" are different things.
-
- 13 Nov, 2017 5 commits
-
-
Daniel Garcia Moreno authored
build: Fix typo in symbol path creation See merge request danigm/libgepub!5
-
Iñigo Martínez authored
There is a type in the symbol path creation. This patch fixes the issue.
-
Daniel Garcia Moreno authored
Meson improvements See merge request danigm/libgepub!4
-
Iñigo Martínez authored
While installing seems to have no issues with absolute paths for install_dir the pkgconfig integration in meson does and create wrong library paths in the .pc file.
-
Iñigo Martínez authored
This patch slightly improves the linker script handling, which now uses the full path into the linker script option itself and also as a dependency for the library.
-