Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to Selector Dialogs #1836

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

stevenyoungs
Copy link
Contributor

@stevenyoungs stevenyoungs commented Jan 1, 2025

A set of enhancements to the selector dialogs:

  1. Add a Path column to the Select Media Object dialog (SelectObject)
    See image 2 below
  2. Add the standard search bar to the Select Person dialog (SelectPerson)
    See image 1 below
  3. Add (optional) support for multiple selection in the BaseSelector class
    This includes unifying the two different MultiTreeView classes in gramps
  4. Add (optional) support for multiple selection to the Select Media Object dialog
    The existing single thumbnail is replaced with a ScrolledWindow containing an IconView
    See image 2 below
  5. Use multiple selection when sharing media in the GalleryTab

If this PR is accepted, a follow on PR can add support for multiple selection to other selector dialogs. Examples could include: sharing multiple children to a family, sharing multiple events to a person

Currently, where only a single media object can be selected, the Edit Media Ref dialog is shown immediately after selection. The media ref is only added to the primary object when OK is selected from the Edit Media Ref dialog. This PR preserves this behaviour if the user only selects a single object. If multiple media objects are selected by the user, the media refs are immediately created and added. No Edit Media Ref dialogs are shown. The user can manually edit the media ref, using existing GalleryTab functionality (e.g. double click the thumbnail) as required. This avoids a poor user experience of multiple Edit Media Ref dialogs appearing all at once, or in a sequence. It also mirrors the behaviour of drag and drop of multiple files on to the gallery tab.

Image 1
image
Image 2
image

Add a Path column to the SelectObject dialog to make it easier to choose between media with the same title
Basic MultiTreeView now inherits from PersistentTreeView rather than directly from Gtk.TreeView
The clipboard version of MultiTreeView now inherits from MultiTreeView and only adds clipboard specific functionality.
@stevenyoungs
Copy link
Contributor Author

Each commit in the PR handles a single problem but I'm happy to split into multiple PRs if that is preferred.
Can someone add the Enhancement label please?

Allow the client to permit multiple selection. Defaults to single selection for backwaards compatibility. If multiple selection is enabled, the run() method returns a list of handles. The list my be empty.
The previous single thumbnail preview is replaced with a ScrolledWindow containing an IconView.
If multiple objects are selected, add all references immediately to avoid a chain of EditMediaRef dialogs being displayed. The user can manually edit the MediaRef if required
If only a single object is selected, show the EditMediaRef dialog
@stevenyoungs stevenyoungs force-pushed the selectordlg_enhancements branch from 55ce7c8 to 58cfb4a Compare January 1, 2025 12:50
@stevenyoungs
Copy link
Contributor Author

Adding the search bar to the Select Person Dialog seems like an obvious thing to do.
I'm slightly concerned that there is a good reason that this was not already done!

@stevenyoungs
Copy link
Contributor Author

Addresses mantis feature request 683
Related discussion: Enhancing Selector Dialogs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants