[gnome-text-editor] spellcheck: use gtk_source_scheduler_add()



commit 6bff4ba7b685b3220167d429277edf3415c2a6b9
Author: Christian Hergert <chergert redhat com>
Date:   Tue Aug 10 15:40:23 2021 -0700

    spellcheck: use gtk_source_scheduler_add()
    
    This is in GtkSourceView now, so we can use it there and drop our
    version that was upstreamed.

 src/editor-buffer-scheduler.c          | 271 ---------------------------------
 src/editor-buffer-scheduler.h          |  49 ------
 src/editor-text-buffer-spell-adapter.c |   9 +-
 src/meson.build                        |   1 -
 4 files changed, 4 insertions(+), 326 deletions(-)
---
diff --git a/src/editor-text-buffer-spell-adapter.c b/src/editor-text-buffer-spell-adapter.c
index e53d247..b4cf8db 100644
--- a/src/editor-text-buffer-spell-adapter.c
+++ b/src/editor-text-buffer-spell-adapter.c
@@ -22,7 +22,6 @@
 
 #include "cjhtextregionprivate.h"
 
-#include "editor-buffer-scheduler.h"
 #include "editor-document.h"
 #include "editor-spell-checker.h"
 #include "editor-spell-cursor.h"
@@ -284,12 +283,12 @@ editor_text_buffer_spell_adapter_queue_update (EditorTextBufferSpellAdapter *sel
 
   if (self->checker == NULL || self->buffer == NULL || !self->enabled)
     {
-      editor_buffer_scheduler_clear (&self->update_source);
+      gtk_source_scheduler_clear (&self->update_source);
       return;
     }
 
   if (self->update_source == 0)
-    self->update_source = editor_buffer_scheduler_add (editor_text_buffer_spell_adapter_run, self);
+    self->update_source = gtk_source_scheduler_add (editor_text_buffer_spell_adapter_run, self);
 }
 
 void
@@ -466,7 +465,7 @@ editor_text_buffer_spell_adapter_dispose (GObject *object)
   EditorTextBufferSpellAdapter *self = (EditorTextBufferSpellAdapter *)object;
 
   g_clear_weak_pointer (&self->buffer);
-  editor_buffer_scheduler_clear (&self->update_source);
+  gtk_source_scheduler_clear (&self->update_source);
 
   G_OBJECT_CLASS (editor_text_buffer_spell_adapter_parent_class)->dispose (object);
 }
@@ -599,7 +598,7 @@ editor_text_buffer_spell_adapter_set_checker (EditorTextBufferSpellAdapter *self
     {
       gsize length = _cjh_text_region_get_length (self->region);
 
-      editor_buffer_scheduler_clear (&self->update_source);
+      gtk_source_scheduler_clear (&self->update_source);
 
       if (length > 0)
         {
diff --git a/src/meson.build b/src/meson.build
index eb26248..9959ecf 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -5,7 +5,6 @@ editor_sources = [
   'editor-application-actions.c',
   'editor-binding-group.c',
   'editor-buffer-monitor.c',
-  'editor-buffer-scheduler.c',
   'editor-document.c',
   'editor-info-bar.c',
   'editor-frame-source.c',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]