GNOME Bugzilla – Bug 760839
Manual export of albums and multiple images
Last modified: 2018-01-23 09:52:19 UTC
Currently we can only export a single image at a time. We should support exporting albums and multiple images from the selection mode. See these mockups from Allan: https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/photos/wires-export.png We should first add an export button to the selection mode (bug 760838) before implementing this.
How does the album export works? Suppose I'm on the Collections view and I select N albums. Which name is displayed in the export dialog? Are all the photos in those N albums saved to the same directory? Or are the albums saved separately? In the latter case, what's the name of the exported album? A similar thing might happen in the Favorites tab. There we might have single items as well as albums. What happens if I select items and albums? What's the name displayed in the dialog? Where are the items saved to? Are the albums preserved somehow?
Created attachment 325186 [details] [review] base-item: rename save_guess_sizes_*
Created attachment 325187 [details] [review] base-item: use more descriptive names for out_size*
Created attachment 325188 [details] [review] base-item: use more descriptive struct for size data
Created attachment 325189 [details] [review] base-item: embed photo loading into guess_save_sizes
Setting ui-review for the questions in comment 1
(In reply to Rafael Fonseca from comment #1) > How does the album export works? Suppose I'm on the Collections view and I > select N albums. Which name is displayed in the export dialog? Are all the > photos in those N albums saved to the same directory? Or are the albums > saved separately? In the latter case, what's the name of the exported album? > > A similar thing might happen in the Favorites tab. There we might have > single items as well as albums. What happens if I select items and albums? > What's the name displayed in the dialog? Where are the items saved to? Are > the albums preserved somehow? I'm not convinced that we want export of multiple albums, to be honest. It will get messy. Likewise, I'm surprised that albums can belong to favorites: I'd imagined that you would only favorite photos. For export of individual albums, I'd imagined that a folder would be created with the album name, inside the Exports directory. This is where the photos would be exported to, and it's the name that would be shown in the folder field in the export dialog.
(In reply to Allan Day from comment #7) > I'm surprised that albums can belong to favorites: > I'd imagined that you would only favorite photos. We can disable / remove the favourites button for albums, if that is what you want. Tthere wasn't too much thought behind allowing albums to belong to favourites.
Review of attachment 325186 [details] [review]: Thanks for the patch, Rafael. Looks good apart from a conflict caused by commit e977b449ae98378b ::: src/photos-base-item.c @@ +849,1 @@ Nitpick: extra newline.
Created attachment 330318 [details] [review] base-item: Rename save_guess_sizes_async as guess_save_sizes_async
Review of attachment 325188 [details] [review]: I like the idea of moving more of the size guessing logic into BaseItem. It will make it more manageable to export multiple items. However, I guess, we will only know once the whole patch set evolves a bit towards the ultimate goal. ::: src/photos-export-dialog.c @@ +171,3 @@ g_free (size_str_markup); + /* FIXME: get this from BaseItem? */ Yes, that will be nice. Maybe add a 'zoom' member to the PhotosBaseItemSize struct?
Review of attachment 325187 [details] [review]: ::: src/photos-base-item.h @@ +177,3 @@ GAsyncResult *res, + gsize *full_size, + gsize *reduced50_size, How about calling it 'reduced_size' instead of 'reduced50_size'? It will be in sync with the changes in attachment 325188 [details] [review] and reduce some of the delta there.
Created attachment 330440 [details] [review] application: add get_selection function This will be used in future patches for exporting the whole selection.
Created attachment 330441 [details] [review] application: rename get_selection_or_active_item
Created attachment 330461 [details] [review] add get_selection function Now submitting the right version.
Created attachment 330462 [details] [review] application: rename get_selection_or_active_item
Created attachment 330464 [details] [review] base-item: embed item loading into guess_save_sizes_async
Created attachment 331305 [details] [review] base-item: use more descriptive names for out_size
Created attachment 331306 [details] [review] base-item: user more descriptive struct for size data
Created attachment 331307 [details] [review] base-item: embed item loading into guess_save_sizes_async
Review of attachment 331305 [details] [review]: ::: src/photos-base-item.h @@ +178,3 @@ GAsyncResult *res, + gsize *full_size, + gsize *reduced_size, Nitpick: I would keep the 'out_' prefix because it denotes that location pointed to by the pointer will be filled in by the function. It's just one of those little things that we copied from glib/gtk+ convention.
Created attachment 331386 [details] [review] base-item: Use more descriptive names instead of out_size Fixed and pushed.
Review of attachment 331306 [details] [review]: Thanks for the nice clean-up, Rafael. ::: src/photos-base-item.c @@ +2357,3 @@ + got_bbox_edited = photos_base_item_get_bbox_edited (self, &bbox); + if (!got_bbox_edited) + goto out; We should ideally set the GError.
Created attachment 331393 [details] [review] base-item, export-dialog: Calculate the size & zoom in guess_save_sizes Rebased against master, fixed it up and pushed.
Review of attachment 331307 [details] [review]: Looks good, thanks.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-photos/issues/40.