From ace6c07fda0b130a21eca1ece92aaa0f17ee7f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 4 Nov 2023 11:22:57 +0100 Subject: [PATCH] Revert "room-details: Add spell checker to room topic entry" This reverts commit b7e4c059e76d8a05844450660496537fe99e8e9b. --- .../content/room_details/general_page/mod.rs | 22 +------------------ .../content/room_details/general_page/mod.ui | 4 ++-- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/session/view/content/room_details/general_page/mod.rs b/src/session/view/content/room_details/general_page/mod.rs index 180f3b26..2b886d18 100644 --- a/src/session/view/content/room_details/general_page/mod.rs +++ b/src/session/view/content/room_details/general_page/mod.rs @@ -50,7 +50,7 @@ mod imp { #[template_child] pub room_name_entry: TemplateChild, #[template_child] - pub room_topic_text_view: TemplateChild, + pub room_topic_text_view: TemplateChild, #[template_child] pub room_topic_entry: TemplateChild, #[template_child] @@ -123,26 +123,6 @@ mod imp { } } - fn constructed(&self) { - self.parent_constructed(); - - let buffer = self - .room_topic_text_view - .buffer() - .downcast::() - .unwrap(); - crate::utils::sourceview::setup_style_scheme(&buffer); - - // Spell checker. - let spell_checker = spelling::Checker::default(); - let adapter = spelling::TextBufferAdapter::new(&buffer, &spell_checker); - let extra_menu = adapter.menu_model(); - self.room_topic_text_view.set_extra_menu(Some(&extra_menu)); - self.room_topic_text_view - .insert_action_group("spelling", Some(&adapter)); - adapter.set_enabled(true); - } - fn dispose(&self) { self.obj().disconnect_all(); } diff --git a/src/session/view/content/room_details/general_page/mod.ui b/src/session/view/content/room_details/general_page/mod.ui index 9518bad6..25649a04 100644 --- a/src/session/view/content/room_details/general_page/mod.ui +++ b/src/session/view/content/room_details/general_page/mod.ui @@ -56,14 +56,14 @@ false 18 - + center word-char False 7 7 - +