Hello community, here is the log from the commit of package gnome-photos for openSUSE:Factory checked in at 2016-08-10 19:56:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnome-photos (Old) and /work/SRC/openSUSE:Factory/.gnome-photos.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnome-photos" Changes: -------- --- /work/SRC/openSUSE:Factory/gnome-photos/gnome-photos.changes 2016-06-25 02:23:09.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.gnome-photos.new/gnome-photos.changes 2016-08-10 19:56:17.000000000 +0200 @@ -1,0 +2,13 @@ +Tue Aug 9 19:26:56 UTC 2016 - [email protected] + +- Update to version 3.20.3: + + Can't export photos from online accounts (bgo#766162). + + item-manager: Fix the lifetime of the changes-pending handler + (bgo#767892). + + Keyboard activation leads to a CRITICAL and opens the wrong + item (bgo#768130). + + The sources of remote collections are not shown in + OrganizeCollectionView (bgo#768500). + + utils: Don't leak the query string (bgo#768548). + +------------------------------------------------------------------- Old: ---- gnome-photos-3.20.2.tar.xz New: ---- gnome-photos-3.20.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-photos.spec ++++++ --- /var/tmp/diff_new_pack.gxrk4a/_old 2016-08-10 19:56:19.000000000 +0200 +++ /var/tmp/diff_new_pack.gxrk4a/_new 2016-08-10 19:56:19.000000000 +0200 @@ -17,7 +17,7 @@ Name: gnome-photos -Version: 3.20.2 +Version: 3.20.3 Release: 0 Summary: Photo viewer for GNOME License: GPL-3.0+ ++++++ gnome-photos-3.20.2.tar.xz -> gnome-photos-3.20.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/NEWS new/gnome-photos-3.20.3/NEWS --- old/gnome-photos-3.20.2/NEWS 2016-06-21 11:42:33.000000000 +0200 +++ new/gnome-photos-3.20.3/NEWS 2016-08-09 20:21:52.000000000 +0200 @@ -1,3 +1,15 @@ +Overview of changes in 3.20.3 +============================= + +* Bugs fixed: + 766162 Can't export photos from online accounts + 767892 item-manager: Fix the lifetime of the changes-pending handler + 768130 Keyboard activation leads to a CRITICAL and opens the wrong item + 768500 The sources of remote collections are not shown in + OrganizeCollectionView + 768548 utils: Don't leak the query string + + Overview of changes in 3.20.2 ============================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/configure new/gnome-photos-3.20.3/configure --- old/gnome-photos-3.20.2/configure 2016-06-21 11:46:55.000000000 +0200 +++ new/gnome-photos-3.20.3/configure 2016-08-09 20:23:05.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Photos 3.20.2. +# Generated by GNU Autoconf 2.69 for Photos 3.20.3. # # Report bugs to <https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='Photos' PACKAGE_TARNAME='gnome-photos' -PACKAGE_VERSION='3.20.2' -PACKAGE_STRING='Photos 3.20.2' +PACKAGE_VERSION='3.20.3' +PACKAGE_STRING='Photos 3.20.3' PACKAGE_BUGREPORT='https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos' PACKAGE_URL='https://wiki.gnome.org/Apps/Photos' @@ -1512,7 +1512,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Photos 3.20.2 to adapt to many kinds of systems. +\`configure' configures Photos 3.20.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1582,7 +1582,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Photos 3.20.2:";; + short | recursive ) echo "Configuration of Photos 3.20.3:";; esac cat <<\_ACEOF @@ -1768,7 +1768,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Photos configure 3.20.2 +Photos configure 3.20.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2137,7 +2137,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Photos $as_me 3.20.2, which was +It was created by Photos $as_me 3.20.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3008,7 +3008,7 @@ # Define the identity of the package. PACKAGE='gnome-photos' - VERSION='3.20.2' + VERSION='3.20.3' cat >>confdefs.h <<_ACEOF @@ -18866,7 +18866,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Photos $as_me 3.20.2, which was +This file was extended by Photos $as_me 3.20.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18933,7 +18933,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Photos config.status 3.20.2 +Photos config.status 3.20.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/configure.ac new/gnome-photos-3.20.3/configure.ac --- old/gnome-photos-3.20.2/configure.ac 2016-06-21 11:40:00.000000000 +0200 +++ new/gnome-photos-3.20.3/configure.ac 2016-08-09 20:18:14.000000000 +0200 @@ -1,5 +1,5 @@ AC_INIT([Photos], - [3.20.2], + [3.20.3], [https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos], [gnome-photos], [https://wiki.gnome.org/Apps/Photos]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-base-item.c new/gnome-photos-3.20.3/src/photos-base-item.c --- old/gnome-photos-3.20.2/src/photos-base-item.c 2016-06-21 11:39:17.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-base-item.c 2016-08-09 20:14:03.000000000 +0200 @@ -1425,6 +1425,8 @@ priv->name = g_strdup (title); priv->filename = g_strdup (tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_FILENAME, NULL)); + if ((priv->filename == NULL || priv->filename[0] == '\0') && !priv->collection) + priv->filename = PHOTOS_BASE_ITEM_GET_CLASS (self)->create_filename_fallback (self); priv->width = tracker_sparql_cursor_get_integer (cursor, PHOTOS_QUERY_COLUMNS_WIDTH); priv->height = tracker_sparql_cursor_get_integer (cursor, PHOTOS_QUERY_COLUMNS_HEIGHT); @@ -1671,14 +1673,8 @@ gboolean photos_base_item_can_edit (PhotosBaseItem *self) { - PhotosBaseItemPrivate *priv; - g_return_val_if_fail (PHOTOS_IS_BASE_ITEM (self), FALSE); - priv = self->priv; - - return PHOTOS_BASE_ITEM_GET_CLASS (self)->create_pipeline_path != NULL - && priv->filename != NULL - && priv->filename[0] != '\0'; + return PHOTOS_BASE_ITEM_GET_CLASS (self)->create_pipeline_path != NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-base-item.h new/gnome-photos-3.20.3/src/photos-base-item.h --- old/gnome-photos-3.20.2/src/photos-base-item.h 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-base-item.h 2016-08-09 20:09:13.000000000 +0200 @@ -74,6 +74,7 @@ const gchar *miner_object_path; /* virtual methods */ + gchar *(*create_filename_fallback) (PhotosBaseItem *self); gchar *(*create_name_fallback) (PhotosBaseItem *self); gchar *(*create_pipeline_path) (PhotosBaseItem *self); gboolean (*create_thumbnail) (PhotosBaseItem *self, GCancellable *cancellable, GError **error); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-embed.c new/gnome-photos-3.20.3/src/photos-embed.c --- old/gnome-photos-3.20.2/src/photos-embed.c 2016-06-21 11:39:17.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-embed.c 2016-08-09 20:09:13.000000000 +0200 @@ -48,7 +48,6 @@ #include "photos-tracker-overview-controller.h" #include "photos-utils.h" #include "photos-view-container.h" -#include "photos-view-model.h" typedef struct _PhotosEmbedSearchState PhotosEmbedSearchState; @@ -176,25 +175,12 @@ static void photos_embed_activate_result (PhotosEmbed *self) { - GtkTreeIter iter; - GtkListStore *store; GtkWidget *view_container; PhotosWindowMode mode; mode = photos_mode_controller_get_window_mode (self->mode_cntrlr); view_container = photos_embed_get_view_container_from_mode (self, mode); - store = photos_view_container_get_model (PHOTOS_VIEW_CONTAINER (view_container)); - - if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter)) - { - GObject *item; - gchar *id; - - gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, PHOTOS_VIEW_MODEL_URN, &id, -1); - item = photos_base_manager_get_object_by_id (self->item_mngr, id); - photos_base_manager_set_active_object (self->item_mngr, item); - g_free (id); - } + photos_view_container_activate_result (PHOTOS_VIEW_CONTAINER (view_container)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-facebook-item.c new/gnome-photos-3.20.3/src/photos-facebook-item.c --- old/gnome-photos-3.20.2/src/photos-facebook-item.c 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-facebook-item.c 2016-07-20 14:10:14.000000000 +0200 @@ -63,6 +63,27 @@ static gchar * +photos_facebook_item_create_filename_fallback (PhotosBaseItem *item) +{ + const gchar *identifier; + const gchar *mime_type; + gchar *extension = NULL; + gchar *ret_val; + + identifier = photos_base_item_get_identifier (item) + strlen ("facebook:"); + mime_type = photos_base_item_get_mime_type (item); + extension = photos_utils_get_extension_from_mime_type (mime_type); + if (extension == NULL) + extension = g_strdup ("tmp"); + + ret_val = g_strdup_printf ("%s.%s", identifier, extension); + + g_free (extension); + return ret_val; +} + + +static gchar * photos_facebook_item_create_name_fallback (PhotosBaseItem *item) { PhotosFacebookItem *self = PHOTOS_FACEBOOK_ITEM (item); @@ -171,11 +192,8 @@ GFile *local_file = NULL; GFile *remote_file = NULL; const gchar *cache_dir; - const gchar *mime_type; - const gchar *identifier; - gchar *extension = NULL; + const gchar *local_filename; gchar *local_dir = NULL; - gchar *local_filename = NULL; gchar *local_path = NULL; gchar *ret_val = NULL; @@ -183,12 +201,7 @@ local_dir = g_build_filename (cache_dir, PACKAGE_TARNAME, "facebook", NULL); g_mkdir_with_parents (local_dir, 0700); - identifier = photos_base_item_get_identifier (item) + strlen ("facebook:"); - mime_type = photos_base_item_get_mime_type (item); - extension = photos_utils_get_extension_from_mime_type (mime_type); - if (extension == NULL) - extension = g_strdup ("tmp"); - local_filename = g_strdup_printf ("%s.%s", identifier, extension); + local_filename = photos_base_item_get_filename (item); local_path = g_build_filename (local_dir, local_filename, NULL); if (g_file_test (local_path, G_FILE_TEST_EXISTS)) goto end; @@ -226,9 +239,7 @@ out: g_free (local_path); - g_free (local_filename); g_free (local_dir); - g_free (extension); g_clear_object (&local_file); g_clear_object (&remote_file); g_clear_object (&photo); @@ -318,6 +329,7 @@ object_class->constructed = photos_facebook_item_constructed; object_class->dispose = photos_facebook_item_dispose; + base_item_class->create_filename_fallback = photos_facebook_item_create_filename_fallback; base_item_class->create_name_fallback = photos_facebook_item_create_name_fallback; base_item_class->create_thumbnail = photos_facebook_item_create_thumbnail; base_item_class->download = photos_facebook_item_download; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-flickr-item.c new/gnome-photos-3.20.3/src/photos-flickr-item.c --- old/gnome-photos-3.20.2/src/photos-flickr-item.c 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-flickr-item.c 2016-07-20 14:10:14.000000000 +0200 @@ -73,6 +73,22 @@ static gchar * +photos_flickr_item_create_filename_fallback (PhotosBaseItem *item) +{ + GFile *file = NULL; + const gchar *uri; + gchar *ret_val; + + uri = photos_base_item_get_uri (item); + file = g_file_new_for_uri (uri); + ret_val = g_file_get_basename (file); + + g_object_unref (file); + return ret_val; +} + + +static gchar * photos_flickr_item_create_name_fallback (PhotosBaseItem *item) { PhotosFlickrItem *self = PHOTOS_FLICKR_ITEM (item); @@ -263,9 +279,9 @@ GFile *local_file = NULL; GFile *remote_file = NULL; const gchar *cache_dir; + const gchar *local_filename; const gchar *uri; gchar *local_dir = NULL; - gchar *local_filename = NULL; gchar *local_path = NULL; gchar *ret_val = NULL; @@ -276,7 +292,7 @@ local_dir = g_build_filename (cache_dir, PACKAGE_TARNAME, "flickr", NULL); g_mkdir_with_parents (local_dir, 0700); - local_filename = g_file_get_basename (remote_file); + local_filename = photos_base_item_get_filename (item); local_path = g_build_filename (local_dir, local_filename, NULL); local_file = g_file_new_for_path (local_path); @@ -301,7 +317,6 @@ out: g_free (local_path); - g_free (local_filename); g_free (local_dir); g_object_unref (local_file); g_object_unref (remote_file); @@ -407,6 +422,7 @@ object_class->constructed = photos_flickr_item_constructed; object_class->dispose = photos_flickr_item_dispose; + base_item_class->create_filename_fallback = photos_flickr_item_create_filename_fallback; base_item_class->create_name_fallback = photos_flickr_item_create_name_fallback; base_item_class->create_thumbnail = photos_flickr_item_create_thumbnail; base_item_class->download = photos_flickr_item_download; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-google-item.c new/gnome-photos-3.20.3/src/photos-google-item.c --- old/gnome-photos-3.20.2/src/photos-google-item.c 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-google-item.c 2016-07-20 14:10:14.000000000 +0200 @@ -61,6 +61,31 @@ static gchar * +photos_google_item_create_filename_fallback (PhotosBaseItem *item) +{ + const gchar *identifier; + const gchar *mime_type; + gchar *extension = NULL; + gchar *identifier_hash = NULL; + gchar *ret_val; + + identifier = photos_base_item_get_identifier (item); + identifier_hash = g_compute_checksum_for_string (G_CHECKSUM_SHA1, identifier, -1); + + mime_type = photos_base_item_get_mime_type (item); + extension = photos_utils_get_extension_from_mime_type (mime_type); + if (extension == NULL) + extension = g_strdup ("tmp"); + + ret_val = g_strdup_printf ("%s.%s", identifier_hash, extension); + + g_free (extension); + g_free (identifier_hash); + return ret_val; +} + + +static gchar * photos_google_item_create_name_fallback (PhotosBaseItem *item) { PhotosGoogleItem *self = PHOTOS_GOOGLE_ITEM (item); @@ -203,13 +228,9 @@ GFile *local_file = NULL; GFile *remote_file = NULL; const gchar *cache_dir; - const gchar *identifier; - const gchar *mime_type; + const gchar *local_filename; const gchar *uri; - gchar *extension = NULL; - gchar *identifier_hash = NULL; gchar *local_dir = NULL; - gchar *local_filename = NULL; gchar *local_path = NULL; gchar *ret_val = NULL; @@ -217,13 +238,7 @@ local_dir = g_build_filename (cache_dir, PACKAGE_TARNAME, "google", NULL); g_mkdir_with_parents (local_dir, 0700); - identifier = photos_base_item_get_identifier (item); - identifier_hash = g_compute_checksum_for_string (G_CHECKSUM_SHA1, identifier, -1); - mime_type = photos_base_item_get_mime_type (item); - extension = photos_utils_get_extension_from_mime_type (mime_type); - if (extension == NULL) - extension = g_strdup ("tmp"); - local_filename = g_strdup_printf ("%s.%s", identifier_hash, extension); + local_filename = photos_base_item_get_filename (item); local_path = g_build_filename (local_dir, local_filename, NULL); if (g_file_test (local_path, G_FILE_TEST_EXISTS)) goto end; @@ -255,10 +270,7 @@ out: g_free (local_path); - g_free (local_filename); g_free (local_dir); - g_free (identifier_hash); - g_free (extension); g_clear_object (&local_file); g_clear_object (&remote_file); g_clear_object (&entry); @@ -350,6 +362,7 @@ object_class->constructed = photos_google_item_constructed; object_class->dispose = photos_google_item_dispose; + base_item_class->create_filename_fallback = photos_google_item_create_filename_fallback; base_item_class->create_name_fallback = photos_google_item_create_name_fallback; base_item_class->create_thumbnail = photos_google_item_create_thumbnail; base_item_class->download = photos_google_item_download; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-item-manager.c new/gnome-photos-3.20.3/src/photos-item-manager.c --- old/gnome-photos-3.20.2/src/photos-item-manager.c 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-item-manager.c 2016-08-09 20:09:13.000000000 +0200 @@ -447,10 +447,11 @@ self->monitor = photos_tracker_change_monitor_dup_singleton (NULL, NULL); if (G_LIKELY (self->monitor != NULL)) - g_signal_connect_swapped (self->monitor, - "changes-pending", - G_CALLBACK (photos_item_manager_changes_pending), - self); + g_signal_connect_object (self->monitor, + "changes-pending", + G_CALLBACK (photos_item_manager_changes_pending), + self, + G_CONNECT_SWAPPED); self->fullscreen = FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-local-item.c new/gnome-photos-3.20.3/src/photos-local-item.c --- old/gnome-photos-3.20.2/src/photos-local-item.c 2016-06-21 11:39:17.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-local-item.c 2016-08-09 20:09:13.000000000 +0200 @@ -54,6 +54,14 @@ static gchar * +photos_local_item_create_filename_fallback (PhotosBaseItem *item) +{ + g_warn_if_reached (); + return NULL; +} + + +static gchar * photos_local_item_create_name_fallback (PhotosBaseItem *item) { const gchar *filename; @@ -235,6 +243,7 @@ PhotosBaseItemClass *base_item_class = PHOTOS_BASE_ITEM_CLASS (class); object_class->constructed = photos_local_item_constructed; + base_item_class->create_filename_fallback = photos_local_item_create_filename_fallback; base_item_class->create_name_fallback = photos_local_item_create_name_fallback; base_item_class->create_pipeline_path = photos_local_item_create_pipeline_path; base_item_class->create_thumbnail = photos_local_item_create_thumbnail; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-media-server-item.c new/gnome-photos-3.20.3/src/photos-media-server-item.c --- old/gnome-photos-3.20.2/src/photos-media-server-item.c 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-media-server-item.c 2016-07-20 14:10:14.000000000 +0200 @@ -60,6 +60,22 @@ static gchar * +photos_media_server_item_create_filename_fallback (PhotosBaseItem *item) +{ + GFile *file = NULL; + const gchar *uri; + gchar *ret_val; + + uri = photos_base_item_get_uri (item); + file = g_file_new_for_uri (uri); + ret_val = g_file_get_basename (file); + + g_object_unref (file); + return ret_val; +} + + +static gchar * photos_media_server_item_create_name_fallback (PhotosBaseItem *item) { /* TODO: provide a sane fallback */ @@ -202,6 +218,7 @@ object_class->constructed = photos_media_server_item_constructed; object_class->dispose = photos_media_server_item_dispose; + base_item_class->create_filename_fallback = photos_media_server_item_create_filename_fallback; base_item_class->create_name_fallback = photos_media_server_item_create_name_fallback; base_item_class->create_thumbnail = photos_media_server_item_create_thumbnail; base_item_class->download = photos_media_server_item_download; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-organize-collection-view.c new/gnome-photos-3.20.3/src/photos-organize-collection-view.c --- old/gnome-photos-3.20.2/src/photos-organize-collection-view.c 2016-06-21 11:39:17.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-organize-collection-view.c 2016-08-09 20:09:13.000000000 +0200 @@ -48,7 +48,7 @@ GtkCellRenderer *renderer_text; GtkListStore *model; GtkTreeViewColumn *view_col; - PhotosBaseManager *col_mngr; + PhotosBaseManager *item_mngr; PhotosBaseManager *src_mngr; gboolean choice_confirmed; }; @@ -153,28 +153,26 @@ PhotosOrganizeCollectionView *self = PHOTOS_ORGANIZE_COLLECTION_VIEW (user_data); PhotosOrganizeCollectionViewPrivate *priv = self->priv; GObject *object; + const gchar *identifier = NULL; gchar *id; gtk_tree_model_get (GTK_TREE_MODEL (priv->model), iter, PHOTOS_ORGANIZE_MODEL_ID, &id, -1); - object = photos_base_manager_get_object_by_id (priv->col_mngr, id); + object = photos_base_manager_get_object_by_id (priv->item_mngr, id); if (object != NULL) - { - const gchar *identifier; + identifier = photos_base_item_get_identifier (PHOTOS_BASE_ITEM (object)); - identifier = photos_base_item_get_identifier (PHOTOS_BASE_ITEM (object)); - if (identifier != NULL && !g_str_has_prefix (identifier, PHOTOS_QUERY_LOCAL_COLLECTIONS_IDENTIFIER)) - { - PhotosSource *source; - const gchar *name; - const gchar *resource_urn; - - resource_urn = photos_base_item_get_resource_urn (PHOTOS_BASE_ITEM (object)); - source = PHOTOS_SOURCE (photos_base_manager_get_object_by_id (priv->src_mngr, resource_urn)); - name = photos_source_get_name (source); - g_object_set (cell_renderer, "text", name, NULL); - gtk_cell_renderer_set_visible (cell_renderer, TRUE); - } + if (identifier != NULL && !g_str_has_prefix (identifier, PHOTOS_QUERY_LOCAL_COLLECTIONS_IDENTIFIER)) + { + PhotosSource *source; + const gchar *name; + const gchar *resource_urn; + + resource_urn = photos_base_item_get_resource_urn (PHOTOS_BASE_ITEM (object)); + source = PHOTOS_SOURCE (photos_base_manager_get_object_by_id (priv->src_mngr, resource_urn)); + name = photos_source_get_name (source); + g_object_set (cell_renderer, "text", name, NULL); + gtk_cell_renderer_set_visible (cell_renderer, TRUE); } else { @@ -276,7 +274,7 @@ PhotosOrganizeCollectionViewPrivate *priv = self->priv; g_clear_object (&priv->model); - g_clear_object (&priv->col_mngr); + g_clear_object (&priv->item_mngr); g_clear_object (&priv->src_mngr); G_OBJECT_CLASS (photos_organize_collection_view_parent_class)->dispose (object); @@ -336,7 +334,7 @@ self, NULL); - priv->col_mngr = g_object_ref (state->src_mngr); + priv->item_mngr = g_object_ref (state->item_mngr); priv->src_mngr = g_object_ref (state->src_mngr); gtk_widget_show (GTK_WIDGET (self)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-searchbar.c new/gnome-photos-3.20.3/src/photos-searchbar.c --- old/gnome-photos-3.20.2/src/photos-searchbar.c 2016-06-21 11:39:17.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-searchbar.c 2016-08-09 20:09:13.000000000 +0200 @@ -313,7 +313,7 @@ ret_val = GDK_EVENT_STOP; goto out; } - else if (event->keyval == GDK_KEY_Return) + else if (priv->in && event->keyval == GDK_KEY_Return) { g_signal_emit (self, signals[ACTIVATE_RESULT], 0); ret_val = GDK_EVENT_STOP; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-utils.c new/gnome-photos-3.20.3/src/photos-utils.c --- old/gnome-photos-3.20.2/src/photos-utils.c 2016-04-20 08:48:19.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-utils.c 2016-08-09 20:09:13.000000000 +0200 @@ -1429,7 +1429,7 @@ { GError *error; PhotosTrackerQueue *queue = NULL; - gchar *sparql; + gchar *sparql = NULL; sparql = g_strdup_printf ("%s { <%s> nao:hasTag nao:predefined-tag-favorite }", (is_favorite) ? "INSERT OR REPLACE" : "DELETE", @@ -1447,5 +1447,6 @@ photos_tracker_queue_update (queue, sparql, NULL, photos_utils_update_executed, g_strdup (urn), g_free); out: + g_free (sparql); g_clear_object (&queue); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-view-container.c new/gnome-photos-3.20.3/src/photos-view-container.c --- old/gnome-photos-3.20.2/src/photos-view-container.c 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-view-container.c 2016-07-20 15:20:18.000000000 +0200 @@ -118,6 +118,8 @@ { GObject *object; + g_clear_pointer (&self->current_path, (GDestroyNotify) gtk_tree_path_free); + self->current_path = gtk_tree_path_copy (path); object = photos_base_manager_get_object_by_id (self->item_mngr, id); @@ -477,6 +479,24 @@ } +void +photos_view_container_activate_result (PhotosViewContainer *self) +{ + GtkTreeIter iter; + + if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self->model), &iter)) + { + GtkTreePath *path; + GtkWidget *generic_view; + + path = gtk_tree_model_get_path (GTK_TREE_MODEL (self->model), &iter); + generic_view = gd_main_view_get_generic_view (self->view); + gtk_icon_view_item_activated (GTK_ICON_VIEW (generic_view), path); + gtk_tree_path_free (path); + } +} + + GtkTreePath * photos_view_container_get_current_path (PhotosViewContainer *self) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnome-photos-3.20.2/src/photos-view-container.h new/gnome-photos-3.20.3/src/photos-view-container.h --- old/gnome-photos-3.20.2/src/photos-view-container.h 2016-04-20 08:46:12.000000000 +0200 +++ new/gnome-photos-3.20.3/src/photos-view-container.h 2016-07-20 15:20:18.000000000 +0200 @@ -48,6 +48,8 @@ GtkWidget *photos_view_container_new (PhotosWindowMode mode, const gchar *name); +void photos_view_container_activate_result (PhotosViewContainer *self); + GtkTreePath *photos_view_container_get_current_path (PhotosViewContainer *self); GtkListStore *photos_view_container_get_model (PhotosViewContainer *self);
