Windows 11 GrampsAIO64-5.2.2 dutch version.
The gramps.ini
is almost continuosly updated.
During startup that file would be updated with the history of which view category was last active and inserts it in the history of the last 10 view modes.
So I’m guessing that changing any setting here is useless?
Manually changing? I suppose the level of futility depends on which setting you change.
What are you trying to accomplish?
Gramps.ini
is updated after changes are made in Preferences and as you use and navigate your database. It remembers the last directory you used to add a media file. It remembers your last used view so if you set it to open in the last view in Preferences, it can do so.
The only time it is created new, is if you have deleted the previous file.
I’m trying stop displaying use-tips (tooltips) when hovering over an area or button.
You should only manually change gramps.ini
while Gramps is closed.
A caveat there… if you have previous version of the Gramps User Directory, it still doesn’t create “new”. Gramps will upgrade the gramps.ini
from the previous version.
That’s a tough one.
Just looked up a few things. One reference noted that the gtk-enable-tooltips
option in Gtk had been deprecated and is ignored in new releases.
Another suggested hacking the timeout in the gtk_tooltip.c
file and inserting an absurdly high. But that require recompiling Gtk in C language. That’s not viable for most users.
I wonder if GREPping the Gramps source and plugins folders might not be a better option? Redefining the name of the tooltip string variable with search and replace might be risky but workable.
Let’s see if I understand the problem you encounter…
when trying to select objects (or open a context menu), sometimes the tooltips from an object obscure the target object. Thus making it frustrating to select any closely positioned objects. (Pins on maps being a prime example.)
The problem can be alleviated (somewhat) by approaching with the mouse pointer from below rather than from above. But if the target is small, you may have to “wave off” attempts for the approach several times. (Still frustrating, but doable.)
Put the question to Perplexity and this was its response: (untested)
To rename the gtk_widget_set_tooltip_text
method to something innocuous that accepts the same parameters and can be easily reversed, you could use a unique and descriptive name like gtk_widget_ignore_tooltip_text
. This name is unlikely to conflict with existing functions and makes it clear that the function is intended to be a placeholder without functionality. Here’s an example of how you might perform the search and replace using grep
and sed
:
grep -rl 'gtk_widget_set_tooltip_text' ./ | xargs sed -i 's/gtk_widget_set_tooltip_text/gtk_widget_ignore_tooltip_text/g'
This command searches for all occurrences of gtk_widget_set_tooltip_text
in the current directory and replaces them with gtk_widget_ignore_tooltip_text
.
Citations:
[1] Gtk.Widget.set_tooltip_text
[2] Gtk.Widget:tooltip-text
[3] [SOLVED] Disable GTK3 Tooltips - Clean Or Dirty / Applications & Desktop Environments / Arch Linux Forums
[4] button - Add tooltip to GtkButton - Stack Overflow
[5] GtkTooltips
[6] [Question] How to 'disable' a tooltip? · Issue #6690 · PySimpleGUI/PySimpleGUI · GitHub
[7] Gtk.Tooltip
[8] How to turn off tooltips in wxpython - Stack Overflow
This problem description is correct. So, to my understanding use-tips or tooltips is beyond control of Gramps software and originates from GUI framework (Gtk) used?
To a certain degree. The original text (content) of the tooltip is controlled by Gramps. That includes choosing whether to associate any text for a tooltip text for a specific Gtk element.
The rendering (font family, font size, color of foreground and background, opacity, container shape, offset, connector) is of the tip is controlled by CSS theme. (I recall seeing semi-transparent tooltips in some themes.) And there is a translation abstraction layer too.
Gtk combines all these factors, tracks what is being indicated by the mouse pointer, and determines how (and how quickly) the tooltip is displayed.
- I’ve been looking in the gramps.ini file and found under the section [behavior] an item ;;use-tips=0.
- all Gtk widget appears to have an parameter like this: button.set_has_tooltip(True)
Any comments on these two points?
While expanding the description of the probably CSS options, the thought occurs that it might be possible to adjust the offset. So the box might be moved further out of the ‘hot area’.
It would take some exploring of the CSS to see if that is true.
You’ve now exceeded my experience.
I suspect that this is a relict of a deprecated feature that was available in a superseded release of Gtk.
It might also just be the following Preferences option, Which would have the “saved immediately” set_tooltip wrapped in an if
condition:
“Suppress tooltip warning about data being saved immediatly” is the immediate-warn
boolean setting in [behavior]
. Counter to typical settings, Suppress/Hide is 1
(True) and Show is 0
(False).
This setting refers to displaying the Tip of the Day on startup.
self.add_checkbox(
grid,
_("Display Tip of the Day"),
row,
"behavior.use-tips",
start=1,
stop=3,
tooltip=_("Show useful information about using " "Gramps on startup."),
)
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.