[gnome-text-editor] spellcheck: add accessors for :enabled property
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] spellcheck: add accessors for :enabled property
- Date: Thu, 29 Jul 2021 00:16:51 +0000 (UTC)
commit 05b1b15cdeb6bf698af69d6d83792b61617fc0df
Author: Christian Hergert <chergert redhat com>
Date: Wed Jul 28 17:12:39 2021 -0700
spellcheck: add accessors for :enabled property
src/editor-text-buffer-spell-adapter.c | 8 +++++++-
src/editor-text-buffer-spell-adapter.h | 3 +++
2 files changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/editor-text-buffer-spell-adapter.c b/src/editor-text-buffer-spell-adapter.c
index 035f0b8..f0c6087 100644
--- a/src/editor-text-buffer-spell-adapter.c
+++ b/src/editor-text-buffer-spell-adapter.c
@@ -423,7 +423,7 @@ editor_text_buffer_spell_adapter_set_buffer (EditorTextBufferSpellAdapter *self,
}
}
-static void
+void
editor_text_buffer_spell_adapter_set_enabled (EditorTextBufferSpellAdapter *self,
gboolean enabled)
{
@@ -754,3 +754,9 @@ editor_text_buffer_spell_adapter_get_tag (EditorTextBufferSpellAdapter *self)
return self->tag;
}
+
+gboolean
+editor_text_buffer_spell_adapter_get_enabled (EditorTextBufferSpellAdapter *self)
+{
+ return self ? self->enabled : FALSE;
+}
diff --git a/src/editor-text-buffer-spell-adapter.h b/src/editor-text-buffer-spell-adapter.h
index de11866..a019fa3 100644
--- a/src/editor-text-buffer-spell-adapter.h
+++ b/src/editor-text-buffer-spell-adapter.h
@@ -33,6 +33,9 @@ G_DECLARE_FINAL_TYPE (EditorTextBufferSpellAdapter, editor_text_buffer_spell_ada
EditorTextBufferSpellAdapter *editor_text_buffer_spell_adapter_new (GtkTextBuffer
*buffer,
EditorSpellChecker
*checker);
GtkTextBuffer *editor_text_buffer_spell_adapter_get_buffer (EditorTextBufferSpellAdapter
*self);
+gboolean editor_text_buffer_spell_adapter_get_enabled (EditorTextBufferSpellAdapter
*self);
+void editor_text_buffer_spell_adapter_set_enabled (EditorTextBufferSpellAdapter *self,
+ gboolean
enabled);
EditorSpellChecker *editor_text_buffer_spell_adapter_get_checker (EditorTextBufferSpellAdapter
*self);
void editor_text_buffer_spell_adapter_set_checker (EditorTextBufferSpellAdapter *self,
EditorSpellChecker
*checker);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]