Revert "room-details: Add spell checker to room topic entry"

This reverts commit b7e4c059e7.
This commit is contained in:
Kévin Commaille 2023-11-04 11:22:57 +01:00
parent 7faaff93f3
commit ace6c07fda
No known key found for this signature in database
GPG key ID: 29A48C1F03620416
2 changed files with 3 additions and 23 deletions

View file

@ -50,7 +50,7 @@ mod imp {
#[template_child]
pub room_name_entry: TemplateChild<gtk::Entry>,
#[template_child]
pub room_topic_text_view: TemplateChild<sourceview::View>,
pub room_topic_text_view: TemplateChild<gtk::TextView>,
#[template_child]
pub room_topic_entry: TemplateChild<CustomEntry>,
#[template_child]
@ -123,26 +123,6 @@ mod imp {
}
}
fn constructed(&self) {
self.parent_constructed();
let buffer = self
.room_topic_text_view
.buffer()
.downcast::<sourceview::Buffer>()
.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();
}

View file

@ -56,14 +56,14 @@
<property name="sensitive">false</property>
<property name="margin-bottom">18</property>
<child>
<object class="GtkSourceView" id="room_topic_text_view">
<object class="GtkTextView" id="room_topic_text_view">
<property name="justification">center</property>
<property name="wrap-mode">word-char</property>
<property name="accepts-tab">False</property>
<property name="top-margin">7</property>
<property name="bottom-margin">7</property>
<property name="buffer">
<object class="GtkSourceBuffer" id="room_topic_buffer">
<object class="GtkTextBuffer" id="room_topic_buffer">
<binding name="text">
<closure type="gchararray" function="unwrap_string_or_empty">
<lookup name="topic">