I just took a quick look at this. It is relatively easy to add the newly created object to the history and MRU lists. This has the side effect of making the newly created object active as well. This is a change to the current behaviour. Currently the active object is not changed when a new object is created. I don’t think that this is necessarily wrong - it is easier to go back to the previously active object than it is to find the newly created object. I think it is worth discussing if this change in behaviour is desirable, or not.
When changing the active object in the navigation views, it changes both the history and MRU lists. It appears that the MRU list is never changed without also changing the history list at the same time. The reverse is not true; the history list can be changed without changing the MRU list. (DisplayState.set_active). I’ve run our of time right now to see if or when this is called.
This would definitely need discussion if updates to the recent-items list started causing the Active Focus to change spontaneously with object creation.
That would make adding/editing children, parents or spouses in the Relationship views feel uncontrollably unstable.
There are already features in Gramps that cause unpredictable shifts in the Active Person focus.
In the Data Entry addon gramplet by @dsblank , there are times that adding a Person unptedictably triggers a jump… either to the new person or back in the Active Person history. Suddenly, adding a sibling (or parent or child) has a generational shift and becomes adding a pibling or nibling. (I’ve encountered this repeatedly when stitching in a cousin’s pedigree. Connecting a cousin to my tree is a normal task after discovering one who is researching a common brickwall ancestor.)
And there’s some other spot that pops the active person focus a couple steps backwards in the history. (If I could figure out that pattern, I would’ve reported it long since.) It is very frustrating when navigating up/down a pedigree (while cleaning/harmonizing data) and are suddenly looking at another twig of the tree.
I believe that @kku may be maintaining a separate list. But it does not change the focus. Maybe he is inserting history differently and can suggest an alternative.
Or maybe creating/changing an object can insert an entry at position 1 in the recent-items list and leave the Active item unmolested at position Zero.
I’m no longer sure that this is correct. set_active calls history.push(handle) which updates both history and mru.
I also had this idea initially but discarded it. I’ll take another look. The history object stores both a list of handles (the history) and an index to the active handle. Conceptually at least the active handle could be in the middle of the history list.
The “Go” menu shows the MRU list, a separate list of handles.
I agree. The Forms addon suffers from similar problems.
I think this approach has potential. Here’s a proof of concept using the example tree, for people. I already had people AA to FF created in the tree when I opened it.
When initially opening the tree, Lewis, the home person, was active. I then manually clicked people AA, BB and CC, making then active, in succession. With CC active, I added a new person, GG. CC remains active and highlighted in the navigation tree. In the Go menu, we see GG, CC, BB, AA and Lewis listed; the correct order for the objects I have “touched”. With this approach it also makes it easy to jump to the object you just created. It will also be top of the Go menu, and Atl+0.
Note that I have temporarily modified the menu to also show the active person so that I can see what is going on. I’ll hide the active person again
To supplement this, I wonder if a gramplet and/or tab on the clipboard window showing the MRU lists (of all object types) would be useful? (assuming I am successful in improving the MRU lists). If this new window supported drag-and-drop it might offer a useful complement to the recent-items addon.
The MRU lists could be shown in a tree, perhaps something like this:
- People
- person 1
- person 2
- person 3
- Families
- family 1
- family 2
+ Events
+ Places
+ Sources
+ Citations
- citation 1
- citation 2
- citation 3
- citation 4
+ Repositories
+ Media
+ Notes
Kari, @kku could you please also update the “name format” add-on for Gramps Master to Gramps 6.0? That also makes searching for names much easier. I miss it too. Please, please, please.
I’m getting an error message.
15587: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\flatbasemodel.py", line 805, in do_get_value
val = self._get_value(handle, col)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gui\views\treemodels\flatbasemodel.py", line 789, in _get_value
return self.fmap[col](self.prev_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Woody\AppData\Roaming\gramps\gramps60\plugins\gramps-master\addons\nameformat\nameformat.py", line 89, in new_column_name
person.unserialize(data)
File "C:\Program Files\GrampsAIO64-6.0.0\gramps\gen\lib\person.py", line 286, in unserialize
(
ValueError: too many values to unpack (expected 21)
v0.9.6 of recent-items (a “GENERAL” Plugin library plug-in type) has been migrated from the experimental repository of @kku and released to the Isotammi currated collection of add-ons.
It is available in the 5.0, 5.1, 5.2 and 6.0 addon lists. As with all Isotammi addons, this addon is for Expert audience under the 5.2 (and newer) Addon Manager.
After installing, all Object Select dialogs will include an extra sublist at the top of the dialog. This feature has no user selectable options or other interface. It can be un-installed (or hidden) via the Plugin Manager.