[Evolution-users] Latex Equations plugin for Evolution
Milan Crha
mcrha at redhat.com
Mon Apr 7 08:05:57 UTC 2025
On Sat, 2025-04-05 at 15:36 +0200, Cyril Soler via evolution-users
wrote:
> Q2: how can I specify my own svg (or png) icon?
Hi,
covering Q1 here as well, because they are connected, because the icon
you chose is not a standard icon, thus you need to provide it for the
gtk3, to be able to find it.
Evolution has a lot of custom icons, they are in data/icons/. Some are
installed system-wide (/usr/share/icons/hicolor/), some are only for
the Evolution (/usr/share/evolution/icons/hicolor/). You can install
the icon under either of these directories and it'll be found, only
make sure you'll follow the path structure and that you'll regenerate
the icon cache(s).
> Q3: how can I enable/disable a button of the interface (the one
> I added) dynamically depending on whether the editor is HTML of
> plain text
When you add the action into the "html" action group of the
EHTMLEditor, then it'll enable/disable as needed for free. You can get
the EHTMLEditor by e_msg_composer_get_editor().
To answer your question from the
https://discourse.gnome.org/t/development-gnome-evolution-plugin/28185/1
> > I cannot find how to retrieve the message currently edited from
> > the EMsgComposer class.
Everything is covered by the EHTMLEditor (see above hot to get it),
which provides an e_html_editor_get_content_editor() to get to an
EContentEditor, which does all the manipulation with the text, and the
message content as such. Despite the name "EHTMLEditor", it is used as
an upper class for every editing mode, being it plain text, HTML or
markdown. It's the returned EContentEditor, which changes based on the
editing mode.
> > I could not find a proper documentation for writing plugins.
> > There’s a single example available and no tutorial I could find.
> > Even chatgpt doesn’t know ;-).
You are right, there is no real tutorial. The single example you found
is the most comprehensive available example & "tutorial" here. It
covers multiple parts of the application and shows how to get to some
interesting parts. It cannot cover everything, of course, but I guess
it's not as that dull too.
By the way, it seems you use `GtkActionEntry`. Please note the 3.56.0
moved away from that deprecated structure, it has its own EUI... group
of objects. The example module had been updated accordingly; you can
find the old example module on the page too and compare what changes
had been done.
Bye,
Milan
More information about the evolution-users
mailing list