1. 23 Sep, 2020 2 commits
  2. 17 Jan, 2019 1 commit
  3. 23 Nov, 2018 1 commit
  4. 28 Aug, 2018 2 commits
    • Debarshi Ray's avatar
      Don't freeze the UI when launching Settings -> Online Accounts · 924fb4ec
      Debarshi Ray authored
      The UI freezes for a moment when launching Settings -> Online Accounts
      because g_application_register does slow I/O. After creating the
      GApplication's GDBusActionGroup, it queries the list of remote actions
      from the primary application instance over D-Bus to populate it.
      Fortunately, it's not necessary to fill in the GDBusActionGroup for
      activating a GAction. Therefore, this can be solved by directly using
      a GDBusActionGroup instead of going via a launcher GApplication.
      
      This does lose the platform data that the launcher GApplication would
      have passed when invoking the remote GAction, but hopefully that
      won't prove crucial.
      
      The loss of error handling doesn't matter. g_application_register was
      the only fallible step, and it could have only failed while querying
      the list of actions from the primary, something that's not needed
      anyway. If anything, it simplifies the code.
      
      Fallout from 556a9f30
      924fb4ec
    • Debarshi Ray's avatar
      utils: Style fixes · 0b05ddd4
      Debarshi Ray authored
      0b05ddd4
  5. 17 Aug, 2018 1 commit
    • Debarshi Ray's avatar
      build, utils: Adjust how the floating point tolerance is defined · 31fc31a1
      Debarshi Ray authored
      A subsequent commit will switch to using G_APPROX_VALUE instead of
      photos_utils_equal_double. Since G_APPROX_VALUE requires specifying the
      tolerance value, it would be convenient to have it defined somewhere
      that's already accessible to every source file to avoid having to
      #include a separate header to compare floating point values. Every
      source file already #includes config.h, so that's the natural choice.
      31fc31a1
  6. 29 Jun, 2018 1 commit
  7. 06 Mar, 2018 2 commits
    • Debarshi Ray's avatar
      Support fallback pipeline paths · bfed6c0d
      Debarshi Ray authored
      A subsequent commit will change the location where edits are stored for
      local items. In order to provide backwords compatibility with existing
      edits stored at the old location, and to transparently migrate them to
      the new location, it is necessary that a PhotosBaseItem sub-class be
      able to return multiple pipeline locations.
      
      All parameters that accepted a single pipeline path or URI have been
      modified to accept a NULL-terminated array of paths or URIs.
      
      The automatic mapping from an "as" GVariant to the natural GStrv C type
      has been disabled for the GenerateThumbnail()[pipeline_uris] parameter
      because the gdbus-codegen:ed wrapper cannot convert a NULL GStrv to its
      equivalent GVariant. It uses g_variant_new_strv with the length always
      set to -1, which isn't valid when the GStrv is NULL.
      
      #87
      bfed6c0d
    • Debarshi Ray's avatar
      utils: Add photos_utils_convert_paths_to_uris · a97e0ac7
      Debarshi Ray authored
      This will be necessary to support fallback pipeline paths in a
      subsequent commit.
      
      #87
      a97e0ac7
  8. 15 Feb, 2018 2 commits
  9. 14 Feb, 2018 5 commits
    • Debarshi Ray's avatar
      base-item, utils: Simplify code · cd6b4c7c
      Debarshi Ray authored
      #29
      cd6b4c7c
    • Debarshi Ray's avatar
      base-item, utils: Query the GFileInfo directly with the BaseItem · 6eca7a45
      Debarshi Ray authored
      This is required to transparently query the state of the thumbnail
      across different BaseItem sub-classes that might have different
      thumbnail caches.
      
      #29
      6eca7a45
    • Debarshi Ray's avatar
      utils: Shuffle some code around · 8cde3fb2
      Debarshi Ray authored
      A subsequent patch will directly use the BaseItem to query the
      GFileInfo, instead of creating a GFile out of the URI. This is
      required to transparently query the state of the thumbnail across
      different BaseItem sub-classes that might have different thumbnail
      caches.
      
      This is a step in that direction.
      
      #29
      8cde3fb2
    • Debarshi Ray's avatar
      fetch-metas-job, utils: Use BaseItem API instead of the SparqlCursor · 82bbb341
      Debarshi Ray authored
      A subsequent patch will directly use the BaseItem to query the
      GFileInfo, instead of creating a GFile out of the URI. This is
      required to transparently query the state of the thumbnail across
      different BaseItem sub-classes that might have different thumbnail
      caches.
      
      This is a step in that direction.
      
      It's also better to not do the same thing, parsing the SparqlCursor in
      this case, in subtly different ways through different code paths.
      
      #29
      82bbb341
    • Debarshi Ray's avatar
      Let the ThumbnailFactory users specify where to place their thumbnails · 37f4d33e
      Debarshi Ray authored
      So far, all thumbnails were located at:
        ~/.cache/gnome-photos/thumbnails/<size>-<generation>/<hash-of-URI>
      
      A subsequent series of commits will add support for importing content
      from attached devices, and it will be nice to separate out those
      thumbnails a bit. Cameras adhering to DCF [1] can use the same URI to
      refer to different images over time, regardless of whether it is the
      same device or not. Manufacturers use the same URI naming scheme for
      all their products, so it is likely that two different devices made by
      the same manufacturer will have two distinct images at the same URI.
      Given enough time, once various counters have wrapped around, it will
      happen with images taken by the same camera too.
      
      Therefore, it is desirable to not put all those thumbnails in the same
      bucket, and have some degree of separation. This means that
      ThumbnailFactory can't continue to determine the location for
      everything, and should instead let the BaseItem sub-classes specify
      where their thumbnails should be placed.
      
      [1] https://en.wikipedia.org/wiki/Design_rule_for_Camera_File_system
      
      #29
      37f4d33e
  10. 24 Jan, 2018 1 commit
  11. 20 Jan, 2018 1 commit
    • Debarshi Ray's avatar
      Make the license notice of each file match those of the final binaries · 7fdda618
      Debarshi Ray authored
      Having the license notice of each file match the licenses of the final
      binaries reduces confusion. Otherwise one has to know how the code is
      linked together, and the licenses involved, in order to explain the
      dichotomy. It also makes it easy to borrow GPLv3+ and LGPLv3+ licensed
      code from GEGL and GIMP.
      
      Commit 78ea329f explains why the final binaries must be under
      GNU General Public License version 3 or later.
      7fdda618
  12. 18 Jan, 2018 3 commits
  13. 31 Dec, 2017 1 commit
  14. 13 Dec, 2017 3 commits
  15. 05 Dec, 2017 1 commit
  16. 04 Dec, 2017 1 commit
  17. 29 Oct, 2017 1 commit
  18. 17 Oct, 2017 1 commit
    • Debarshi Ray's avatar
      Encode the origin of the zoom event in the zoom-in/out GActions · ca66ca7a
      Debarshi Ray authored
      A subsequent commit will add support for zooming with touch gestures.
      This added flexibility readies the GActions for that.
      
      The current zooming interface provided by the zoom-in/out GActions is
      based on the notion of incremental steps. Each step represents one
      press/release of an accelerator key or mouse button, or one notch on
      the mouse's scroll wheel. A new zoom value is calculated for each step.
      
      However, touch gestures are different. The content needs to stick to
      the touch points while the gesture is active. This means that the ratio
      of the new and initial zoom values should be equal to the ratio of the
      distance between the touch points and their initial distance. This is
      unlike the notion of discrete steps where the content would jump to
      the next zoom level.
      
      Commit 9590011f had hacked in the ability to encode the origin
      of the zoom event by using positive and negative arguments. This has
      been made more explicit by having a separate enumerated value for it.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=783922
      ca66ca7a
  19. 22 Sep, 2017 2 commits
    • Debarshi Ray's avatar
      Let PhotosQuery instances be reference counted · f7f64b92
      Debarshi Ray authored
      ... by turning it into a GObject.
      
      The other option was to implement a boxed type with its own reference
      counting using g_atomic_*. However, there is no proof that using a
      GObject will measurably affect performance and we get the reference
      counting for free.
      
      This paves the way for reduced memory fragmentation, by removing the
      need to copy the sparql and tag fields of a PhotosQuery.
      f7f64b92
    • Debarshi Ray's avatar
      Don't steal the SPARQL string passed to photos_query_new · 6df0ff81
      Debarshi Ray authored
      It is not idiomatic for strings to transfer ownership when passed as
      input arguments to functions, unless the function is explitly named
      as such. eg., "take" functions.
      
      Transferring the ownership of the SPARQL string to the PhotosQuery
      struct did afford us some conveniences. eg., not having to free the
      string. However, in a following patch, PhotosQuery is going to be
      converted into a GObject. It will be even more non-idiomatic to
      retain the current behaviour, and a future port to g_auto* will take
      care of the extra lines of code needed to free the string.
      
      That leaves the possibility of memory fragmentation caused by the
      extra copy. However, one can't say if that's a real issue without
      actual measurements. We don't really create that many PhotosQuery
      instances. In any case, this will be assuaged in the following patch
      where PhotosQuery instances will be made reference counted. That will
      remove the need to copy the sparql and tag fields, and reduce
      fragmentation.
      6df0ff81
  20. 18 Sep, 2017 1 commit
  21. 12 Sep, 2017 1 commit
  22. 10 Jun, 2017 1 commit
  23. 12 May, 2017 1 commit
    • Debarshi Ray's avatar
      Move selection-mode state to a GAction · 1d3e1235
      Debarshi Ray authored
      This lets us use the GAction accelerators instead of a custom event
      listener and keeps the code in sync with gnome-documents.
      
      Original patch from Cosimo Cecchi for gnome-documents.
      1d3e1235
  24. 14 Mar, 2017 1 commit
  25. 02 Mar, 2017 3 commits