Is there a way to script the swapping of Gramplets?

The Isotammi project offers a set of “Filter+” direct replacements for the core Filter gramplet in each category.

It is rather laborious to remove the default Filter gramplets in each category and replace them with the Filter+ variant. (Moreso if the Preferences default General - > “Show close button in gramplet bar tabs” is in its default deselected state.) The “Restore default gramplets” can undo that work in a moment.

Is there a process that can be scripted (in Python Shell or SuperTool) to find the Filter gramplet, close it, add Filter+ and re-order it to that same spot for all the sidebar/bottombar (or main display area for the Dashboard) of the various categories?

Reference in Sphinx:
https://gramps-project.org/docs/_modules/gramps/gui/widgets/grampletbar.html#GrampletBar.restore

        def restore(self):
        """
        Restore the GrampletBar to its default gramplets.
        """
        list(map(self.remove_gramplet, self.all_gramplets()))
        list(map(self.add_gramplet, self.defaults))
        self.set_current_page(0)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.