Can an GUI Menu item be hotlinked from a Gramplet?

The following Gramplet suggests using the “Edit → Add a Person” or “Family Trees… → Import…” menu options. Can those phrases be hotlinked to the menu actions?

(This text ONLY appears when a Tree is verified as loaded and empty of People. I am considering changing it to Add a Family because Adding a Person doesn’t set the initial Active Person while Adding a Family does. And not having an Active Person complicates newbie instructions for using several of the views… particularly Relationships and Charts.)

image

It should be able to be done in the same way links are created in welcomgramplet.py. Special consideration would need to be taken for the Gramps version in the wiki. Instead of putting the link on a separate line (welcomegramplet) you you want an inline link.

1 Like

Those links opens an Edit object dialog, navigate the active record focus or open a browser window. They don’t create objects nor open Action dialogs.

Maybe these should be GUI buttons between paragraphs instead of hotlinks?

Not that I know how to create inline buttons either!

Sorry, I misunderstood. You want to add the ability to open an add new person edit window or the import dialog.

Yes, please. But I don’t want to create a new ambiguity in the interface.

As I was running the Absolute Newbie scenarios, I kept running into hitches where the next step was not intuitive.

(Like the one almost EVERY new convert to Gramps complains about… that it is not intuitive that you have to create a new blank Tree to import an initial GEDCOM or backup .gramps/.gpkg file. Why can’t you just import and, if there’s no Tree loaded, have Gramps create a Tree of the same name… with an incremental versioning, if necessary.)

The Active Person & Home Person are virtually mandatory for views & features to work right. But they are unique to Gramps and should be defaulted once the 1st Person comes into a Tree.

Likewise, a Tree is mandatory for using the GUI. (I think you can use Gramps as a tool framework from the CLI to batch process data.)

2 Likes

Where did you find this gramplet ?
I didn’t find it in the standard gramplets or in the addon gramplets
It depends on what this gramplet is doing ?

That Gramplet is a fork of the “What’s Next?” built-in Gramplet that I have been ineptly hacking. (A zip archive of the beta has been eMailed to you.)

My wishlist include enabling what was discussed elsewhere about making the text in a Gramplet play nice with the Themes, Glade & CSS. The 10pt default size is too small for a program used mostly by senior citizens. (It is WAY too small for my vision difficulties.) 12pt is the typical standard for serif fonts in the digital world.

I’d also like to add the Red error indicator like you have for invalid Lat/Long data. (And which is used to indicate invalid dates.) But I’d only use red on the Critical Errors: no tree loaded, no Active or Home Person. The normal problems the original What’s Next reports do not rise to that critical importance.

In a similar vein of setting newbie expectations, the Geography view is the only view that has content (map tiles) when there isn’t usable tree data. If there is no Tree loaded, this is the ONLY view that gives any indication Gramps is actually a functioning program. (Which makes the Geography view a “good thing”.)

It would be nice if the Geography view had a counter inset box by default that could be disabled. That might indicate an error when the current Geography view had no Tree data ready for map pins or no local/net access to map tiles. So, the counter might list counts of: People, their events, Place counts including total unique and unique with valid Lat/Longs. Where it would be Red if there where no Places with valid Lat/Long or no accessible map tiles. (Although maybe a fallback to the free World country polygon KML file would eliminate the lack of map tiles ever causing a blank view?)

If you want to have this, for the widget you want to have this feature:

     context = self.my_widget.get_style_context()
     context.remove_class('error')

and then depending on what you want, you only need to do:

     context.add_class('error')

1 Like

I’ve dug a bit into the Lat/Long source looking for functional examples of these calls. No success yet. Perhaps if I dig into the validator module and Date entry feature next?

Thank you for the lead!