Hello community,

here is the log from the commit of package gnome-photos for openSUSE:Factory 
checked in at 2018-02-07 18:38:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-photos (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-photos.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-photos"

Wed Feb  7 18:38:20 2018 rev:39 rq:572959 version:3.26.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-photos/gnome-photos.changes        
2017-12-19 10:46:41.615510821 +0100
+++ /work/SRC/openSUSE:Factory/.gnome-photos.new/gnome-photos.changes   
2018-02-07 18:38:22.076742049 +0100
@@ -1,0 +2,10 @@
+Sat Feb  3 00:07:17 UTC 2018 - [email protected]
+
+- Add gnome-photos-Dont-leak-thumbnailer-path-string.patch:
+  thumbnail-factory: Don't leak the thumbnailer path string.
+- Add gnome-photos-application-fixes.patch: application: Avoid
+  CRITICALs.
+- Add gnome-photos-Check-RDF-type-before-using-it.patch: utils:
+  Check the RDF type before using it, not the MIME type.
+
+-------------------------------------------------------------------

New:
----
  gnome-photos-Check-RDF-type-before-using-it.patch
  gnome-photos-Dont-leak-thumbnailer-path-string.patch
  gnome-photos-application-fixes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-photos.spec ++++++
--- /var/tmp/diff_new_pack.AgvaeC/_old  2018-02-07 18:38:22.608717128 +0100
+++ /var/tmp/diff_new_pack.AgvaeC/_new  2018-02-07 18:38:22.608717128 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gnome-photos
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,14 @@
 Group:          Productivity/Graphics/Viewers
 Url:            https://wiki.gnome.org/Design/Apps/Photos
 Source0:        
https://download.gnome.org/sources/gnome-photos/3.26/%{name}-%{version}.tar.xz
+
+# PATCH-FIX-UPSTREAM gnome-photos-Dont-leak-thumbnailer-path-string.patch 
bjorn.lie@gmail-com -- thumbnail-factory: Don't leak the thumbnailer path string
+Patch0:         gnome-photos-Dont-leak-thumbnailer-path-string.patch
+# PATCH-FIX-UPSTREAM gnome-photos-application-fixes.patch bjorn.lie@gmail-com 
-- application: Avoid CRITICALs
+Patch1:         gnome-photos-application-fixes.patch
+# PATCH-FIX-UPSTREAM gnome-photos-Check-RDF-type-before-using-it.patch 
bjorn.lie@gmail-com -- utils: Check the RDF type before using it, not the MIME 
type
+Patch2:         gnome-photos-Check-RDF-type-before-using-it.patch
+
 BuildRequires:  desktop-file-utils
 BuildRequires:  fdupes
 # Technically seen, glib2-tools would require this, but it introduces a loop 
there. So explictly require here

++++++ gnome-photos-Check-RDF-type-before-using-it.patch ++++++
>From 6d8bbd5b02885f2c0def8e0e4b1daefd76164ebe Mon Sep 17 00:00:00 2001
From: Debarshi Ray <[email protected]>
Date: Wed, 24 Jan 2018 20:29:18 +0100
Subject: [PATCH] utils: Check the RDF type before using it, not the MIME type

---
 src/photos-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/photos-utils.c b/src/photos-utils.c
index a9d8f13..12ff40f 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -470,7 +470,7 @@ photos_utils_get_icon_from_cursor (TrackerSparqlCursor 
*cursor)
     goto out;
 
   rdf_type = tracker_sparql_cursor_get_string (cursor, 
PHOTOS_QUERY_COLUMNS_RDF_TYPE, NULL);
-  if (mime_type != NULL)
+  if (rdf_type != NULL)
     icon = photos_utils_icon_from_rdf_type (rdf_type);
 
   if (icon != NULL)
--
libgit2 0.26.0

++++++ gnome-photos-Dont-leak-thumbnailer-path-string.patch ++++++
>From 88a18f26b3ff979067162f1bdfceabd1d0fa2965 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <[email protected]>
Date: Mon, 1 Jan 2018 14:14:46 +0100
Subject: [PATCH] thumbnail-factory: Don't leak the thumbnailer path string

---
 src/photos-thumbnail-factory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/photos-thumbnail-factory.c b/src/photos-thumbnail-factory.c
index bc84500..522c522 100644
--- a/src/photos-thumbnail-factory.c
+++ b/src/photos-thumbnail-factory.c
@@ -440,13 +440,15 @@ photos_thumbnail_factory_generate_thumbnail 
(PhotosThumbnailFactory *self,
                                      "--address",
                                      address,
                                      NULL);
+
+      g_free (thumbnailer_path);
+
       if (local_error != NULL)
         goto out;
 
       g_mutex_unlock (&self->mutex_connection);
       mutex_connection_unlocked = TRUE;
 
-      g_free (thumbnailer_path);
       g_object_unref (subprocess);
     }
 
--
libgit2 0.26.0

++++++ gnome-photos-application-fixes.patch ++++++
>From b5c57b71a888c1dd531192bf6b5f3b3030c60d93 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <[email protected]>
Date: Tue, 16 Jan 2018 19:24:52 +0100
Subject: [PATCH] application: Don't miss changes to the current child 
BaseManager

ItemManager::items-changed is only emitted if a BaseItem was added or
removed from the union of all the child BaseManagers (ie. the 0th
child). Therefore, due to a mode change, if the current child is
cleared and populated with new items, the addition of new items won't
lead to ItemManager::items-changed if they were already present in one
of the other children. In that case, various GSimpleActions that were
disabled by the clearing of the child BaseManager won't be re-enabled
after the addition of new items.

This is easily observed while searching because entering SEARCH clears
the corresponding BaseManager. eg., if the first 50 items in OVERVIEW
are all LocalItems, and searching for local content would lead to the
same 50 LocalItems to be shown in SEARCH.
---
 src/photos-application.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/photos-application.c b/src/photos-application.c
index 21b61a8..468dc7c 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1589,9 +1589,25 @@ photos_application_theme_changed (GtkSettings *settings)
 
 
 static void
-photos_application_window_mode_changed (PhotosApplication *self)
+photos_application_window_mode_changed (PhotosApplication *self, 
PhotosWindowMode mode, PhotosWindowMode old_mode)
 {
+  PhotosBaseManager *item_mngr_chld;
+
+  g_return_if_fail (mode != PHOTOS_WINDOW_MODE_NONE);
+
+  if (old_mode != PHOTOS_WINDOW_MODE_NONE)
+    {
+      item_mngr_chld = photos_item_manager_get_for_mode (PHOTOS_ITEM_MANAGER 
(self->state->item_mngr), old_mode);
+      g_signal_handlers_disconnect_by_func (item_mngr_chld, 
photos_application_items_changed, self);
+    }
+
   photos_application_actions_update (self);
+
+  item_mngr_chld = photos_item_manager_get_for_mode (PHOTOS_ITEM_MANAGER 
(self->state->item_mngr), mode);
+  g_signal_connect_swapped (item_mngr_chld,
+                            "items-changed",
+                            G_CALLBACK (photos_application_items_changed),
+                            self);
 }
 
 
@@ -2037,10 +2053,6 @@ photos_application_startup (GApplication *application)
   gtk_application_set_accels_for_action (GTK_APPLICATION (self), 
"app.zoom-out(-1.0)", zoom_out_accels);
 
   g_signal_connect_swapped (self->state->item_mngr,
-                            "items-changed",
-                            G_CALLBACK (photos_application_items_changed),
-                            self);
-  g_signal_connect_swapped (self->state->item_mngr,
                             "load-finished",
                             G_CALLBACK (photos_application_load_changed),
                             self);
--
libgit2 0.26.0


>From 0ded49556c4c7ec3b8b78d051b466e4181b90386 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <[email protected]>
Date: Thu, 18 Jan 2018 18:07:15 +0100
Subject: [PATCH] application: Avoid CRITICALs when going to EDIT and PREVIEW

There are no child BaseManagers for the EDIT and PREVIEW modes. Hence
it lead to:
  CRITICAL **: photos_item_manager_get_for_mode: assertion
    'mode != PHOTOS_WINDOW_MODE_PREVIEW' failed

Fallout from d5d28be0e85adaa521c11a0c05ee317c8a3a2a54
---
 src/photos-application.c | 43 +++++++++++++++++++++++++++++++++++++------
 1 file changed, 37 insertions(+), 6 deletions(-)

diff --git a/src/photos-application.c b/src/photos-application.c
index 468dc7c..8b34971 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1595,19 +1595,50 @@ photos_application_window_mode_changed 
(PhotosApplication *self, PhotosWindowMod
 
   g_return_if_fail (mode != PHOTOS_WINDOW_MODE_NONE);
 
-  if (old_mode != PHOTOS_WINDOW_MODE_NONE)
+  switch (old_mode)
     {
+    case PHOTOS_WINDOW_MODE_NONE:
+    case PHOTOS_WINDOW_MODE_EDIT:
+    case PHOTOS_WINDOW_MODE_PREVIEW:
+      break;
+
+    case PHOTOS_WINDOW_MODE_COLLECTIONS:
+    case PHOTOS_WINDOW_MODE_FAVORITES:
+    case PHOTOS_WINDOW_MODE_OVERVIEW:
+    case PHOTOS_WINDOW_MODE_SEARCH:
       item_mngr_chld = photos_item_manager_get_for_mode (PHOTOS_ITEM_MANAGER 
(self->state->item_mngr), old_mode);
       g_signal_handlers_disconnect_by_func (item_mngr_chld, 
photos_application_items_changed, self);
+      break;
+
+    default:
+      g_assert_not_reached ();
+      break;
     }
 
   photos_application_actions_update (self);
 
-  item_mngr_chld = photos_item_manager_get_for_mode (PHOTOS_ITEM_MANAGER 
(self->state->item_mngr), mode);
-  g_signal_connect_swapped (item_mngr_chld,
-                            "items-changed",
-                            G_CALLBACK (photos_application_items_changed),
-                            self);
+  switch (mode)
+    {
+    case PHOTOS_WINDOW_MODE_COLLECTIONS:
+    case PHOTOS_WINDOW_MODE_FAVORITES:
+    case PHOTOS_WINDOW_MODE_OVERVIEW:
+    case PHOTOS_WINDOW_MODE_SEARCH:
+      item_mngr_chld = photos_item_manager_get_for_mode (PHOTOS_ITEM_MANAGER 
(self->state->item_mngr), mode);
+      g_signal_connect_swapped (item_mngr_chld,
+                                "items-changed",
+                                G_CALLBACK (photos_application_items_changed),
+                                self);
+      break;
+
+    case PHOTOS_WINDOW_MODE_EDIT:
+    case PHOTOS_WINDOW_MODE_PREVIEW:
+      break;
+
+    case PHOTOS_WINDOW_MODE_NONE:
+    default:
+      g_assert_not_reached ();
+      break;
+    }
 }
 
 
--
libgit2 0.26.0


Reply via email to