diff --git a/Cargo.toml b/Cargo.toml index 22285e0c..dd0e6195 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,8 +36,7 @@ ggemini = "0.19.0" ggemtext = "0.7.0" indexmap = "2.10.0" itertools = "0.14.0" -# @TODO pending for glib 0.10 dependencies update -# libspelling = "0.4.0" +libspelling = "0.4.0" maxminddb = "0.26.0" openssl = "0.10.72" plurify = "0.2.0" @@ -46,7 +45,11 @@ r2d2_sqlite = "0.31.0" syntect = "5.2.0" # development -# [patch.crates-io] +[patch.crates-io] + +# @TODO pending for the official gtk-rs 0.10 dependencies update +libspelling = { git = "https://github.com/YGGverse/libspelling-rs.git", branch = "yoda-0.12"} + # ggemini = { git = "https://github.com/YGGverse/ggemini.git" } # ggemtext = { git = "https://github.com/YGGverse/ggemtext.git" } # plurify = { git = "https://github.com/YGGverse/plurify.git" } diff --git a/src/app/browser/window/tab/item/page/input/response/form.rs b/src/app/browser/window/tab/item/page/input/response/form.rs index dda7576b..378174f9 100644 --- a/src/app/browser/window/tab/item/page/input/response/form.rs +++ b/src/app/browser/window/tab/item/page/input/response/form.rs @@ -3,7 +3,7 @@ use gtk::{ glib::GString, prelude::{TextBufferExt, TextViewExt, WidgetExt}, }; -//use libspelling::{Checker, TextBufferAdapter}; +use libspelling::{Checker, TextBufferAdapter}; use sourceview::Buffer; const MARGIN: i32 = 8; @@ -22,16 +22,16 @@ impl Form for TextView { let buffer = Buffer::builder().build(); // Init [libspelling](https://gitlab.gnome.org/GNOME/libspelling) - /*let checker = Checker::default(); + let checker = Checker::default(); let adapter = TextBufferAdapter::new(&buffer, &checker); - adapter.set_enabled(true);*/ + adapter.set_enabled(true); // Init main widget let text_view = TextView::builder() .bottom_margin(MARGIN) .buffer(&buffer) .css_classes(["frame", "view"]) - //.extra_menu(&adapter.menu_model()) + .extra_menu(&adapter.menu_model()) .left_margin(MARGIN) .margin_bottom(MARGIN / 4) .right_margin(MARGIN) @@ -39,7 +39,7 @@ impl Form for TextView { .wrap_mode(WrapMode::Word) .build(); - //text_view.insert_action_group("spelling", Some(&adapter)); + text_view.insert_action_group("spelling", Some(&adapter)); text_view.set_size_request(-1, 38); // @TODO [#635](https://gitlab.gnome.org/GNOME/pygobject/-/issues/635) // Init events diff --git a/src/app/browser/window/tab/item/page/input/titan/text/form.rs b/src/app/browser/window/tab/item/page/input/titan/text/form.rs index 16c2f6af..114c0c99 100644 --- a/src/app/browser/window/tab/item/page/input/titan/text/form.rs +++ b/src/app/browser/window/tab/item/page/input/titan/text/form.rs @@ -1,5 +1,5 @@ use gtk::{TextView, WrapMode, prelude::WidgetExt}; -//use libspelling::{Checker, TextBufferAdapter}; +use libspelling::{Checker, TextBufferAdapter}; use sourceview::Buffer; pub trait Form { @@ -15,9 +15,9 @@ impl Form for TextView { let buffer = Buffer::builder().build(); // Init [libspelling](https://gitlab.gnome.org/GNOME/libspelling) - /*let checker = Checker::default(); + let checker = Checker::default(); let adapter = TextBufferAdapter::new(&buffer, &checker); - adapter.set_enabled(true);*/ + adapter.set_enabled(true); // Init main widget @@ -27,7 +27,7 @@ impl Form for TextView { .bottom_margin(MARGIN) .buffer(&buffer) .css_classes(["frame", "view"]) - //.extra_menu(&adapter.menu_model()) + .extra_menu(&adapter.menu_model()) .left_margin(MARGIN) .right_margin(MARGIN) .top_margin(MARGIN) @@ -35,7 +35,7 @@ impl Form for TextView { .build() }; - //text_view.insert_action_group("spelling", Some(&adapter)); + text_view.insert_action_group("spelling", Some(&adapter)); text_view.set_size_request(-1, 38); // @TODO [#635](https://gitlab.gnome.org/GNOME/pygobject/-/issues/635) // Init events