1. 27 Oct, 2021 9 commits
    • Gaël Bonithon's avatar
      Load images asynchronously · 55afcd6e
      Gaël Bonithon authored
      Reading files is already handled asynchronously, but data parsing by the
      pixbuf loader is blocking. Unfortunately, gdk-pixbuf does not offer an
      asynchronous API that covers both:
      * loading a single image;
      * loading an animation;
      * loading at reduced scale (the "Limit rendering quality" option of
      GdkPixbufLoader is the only object to cover all these possibilities in a
      unified API, in addition to allowing progressive loading (even if the
      latter is not really used by Ristretto). So it seems easiest to keep the
      current implementation, adding the asynchronous character "by hand", via
      a GTask.
      Closes #16, #29, #32, see !34 for more details.
    • Gaël Bonithon's avatar
      Do not try to load images whose pixbuf is not available · c14022e3
      Gaël Bonithon authored
      A corrupted image may be displayable, but it must be ensured that enough
      data has been parsed for a pixbuf to be available (i.e.
      `GdkPixbufLoader::area-prepared` has been emitted).
      Completes e1951db1, see !34 for more
    • Gaël Bonithon's avatar
      Fix memory management of image loading objects · f996b59c
      Gaël Bonithon authored
      See !34 for more details.
    • Gaël Bonithon's avatar
      Increase image loading buffer size · 178f6c74
      Gaël Bonithon authored
      This size was reduced about ten years ago in
      e49a5262, with the argument that too
      large a size caused problems loading JPEG images. However, no link was
      given as a reference, and the issues of this type found on the
      gdk-pixbuf bug tracker have been closed due to lack of activity.
      So it seems to be safe to assume that the problem has since been fixed,
      perhaps outside of gdk-pixbuf.
      See !34 for more details.
    • Gaël Bonithon's avatar
      Allow to display all files in the open dialog · 1a3a3181
      Gaël Bonithon authored
      This overrides GFileInfo filtering, which is primarily based on file
      extensions, and can therefore eliminate files that are actually valid.
      Previous commits now ensure that only content-based filtering will be
      applied next, warning the user if there are problems.
      See !33 for more details.
    • Gaël Bonithon's avatar
      Directory loading: Filter files using the app filter · 4046c0df
      Gaël Bonithon authored
      Now that the file opening procedure is unique and no longer includes
      additional filtering, the correct filter to use for directory loading is
      the application filter.
      This is consistent with the open dialog on the one hand, and on the
      other hand as close as possible to the final filtering, which takes
      place at the last moment with additional disk access, when the
      thumbnails are displayed.
      See !33 for more details.
    • Gaël Bonithon's avatar
      Rework and complete error handling · 44457d98
      Gaël Bonithon authored
      This addresses in particular the TODOs added between
      db214532 and the previous commit.
      See !33 for more details.
    • Gaël Bonithon's avatar
      Rework the file opening procedure into a single function · 35125d9d
      Gaël Bonithon authored
      Rather than having four more or less similar ones for the open dialog,
      the recent menu, drag and drop and the command line.
      In particular:
      * Files opened explicitly (not implicitly via opening a directory) are
        added to the list of recent files regardless of how they were opened.
      * Filtering on mime type is removed and is now only located in
        `image_list.c`. As a consequence, when opening a file via the command
        line, filtering is only content-based (if libmagic is present).
      Error handling is left for the next commit, since it was not
      already done in this part and remains to be done elsewhere.
      See !33 for more details.
    • Gaël Bonithon's avatar
      Filter deleted recent files on opening · 9a3d24c8
      Gaël Bonithon authored
      This does not completely prevent having a deleted file in the recent
      menu, since it is generated only once on opening. But it limits the risk
      and ensures that the cleanup is done at least every session.
      This commit is a preliminary to a refactoring of the file opening
      See !33 for more details.
  2. 26 Oct, 2021 2 commits
  3. 25 Oct, 2021 6 commits
  4. 23 Oct, 2021 1 commit
  5. 19 Oct, 2021 1 commit
  6. 17 Oct, 2021 1 commit
  7. 15 Oct, 2021 2 commits
  8. 13 Oct, 2021 1 commit
  9. 12 Oct, 2021 2 commits
  10. 11 Oct, 2021 15 commits