Spell check in TextView

I’m beginner in desktop development and want to integrate spell check feature for GTK TextView widget. Already know how to work with tags and buffer, just not sure about dictionary provider: with some native API or by using external software.

Where I can start from, to not write lot of code, especially if something already exists in GNOME environment for these needs.

Libspelling makes it very easy GNOME / libspelling · GitLab

1 Like

Thank you!

it’s libaspell-dev in Ubuntu?

No, libaspell is something different. Aspell is a set of dictionnaries, with low-level APIs to access them.

That said, libspelling depends on enchant that itself may (optionally) depend on libaspell :slight_smile:

On ubuntu, the devel package is Ubuntu – Details of package libspelling-1-dev in noble

libspelling-dev is mostly for C, if you use Rust better look at the official libspelling-rs bindings: World / Rust / libspelling-rs · GitLab

1 Like

Sorry, I forgot about my virtual machine with Ubuntu, so yes it’s really libspelling-1-dev

if somebody want integration example, it was really simple.

Interesting, can I remove transparency from popup?

Or it looks like that just because I’m using adwaita osd class for parent widget

Yes, it’s definitely the osd class that gets inherited by the popup.

OSDs have lots of issues (in general, not specifically with gtk), like making everything behind them hidden and inaccessible, even when scrolling down. I would personally recommend to avoid OSDs and use something like a GtkRevealer outside of the view.

1 Like

Maybe some curse with this widget :slight_smile: before I have removed app-notification class as found it is deprecated, then switched to osd and found it’s deprecated also

I won’t rewrite everything just to switch color to dark, lol, have no idea what to do next. It’s just simple widget, appended under the content Box.

UPD. can confirm, it’s really osd class issue, thanks

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