[gnome-builder/wip/gtk4-port] libide/sourceview: opt out of query_data callbacks



commit b483ffe0066995b7ecc8b48ef37fefcd7ac41ec2
Author: Christian Hergert <chergert redhat com>
Date:   Thu Apr 28 21:28:43 2022 -0700

    libide/sourceview: opt out of query_data callbacks
    
    We don't need these and they result in signal emission for every row that
    is in display.

 src/libide/sourceview/ide-line-change-gutter-renderer.c | 1 +
 src/plugins/omni-gutter/gbp-omni-gutter-renderer.c      | 1 +
 2 files changed, 2 insertions(+)
---
diff --git a/src/libide/sourceview/ide-line-change-gutter-renderer.c 
b/src/libide/sourceview/ide-line-change-gutter-renderer.c
index 1fe45c2e9..4e5c8bad5 100644
--- a/src/libide/sourceview/ide-line-change-gutter-renderer.c
+++ b/src/libide/sourceview/ide-line-change-gutter-renderer.c
@@ -354,6 +354,7 @@ ide_line_change_gutter_renderer_class_init (IdeLineChangeGutterRendererClass *kl
   renderer_class->begin = ide_line_change_gutter_renderer_begin;
   renderer_class->snapshot_line = ide_line_change_gutter_renderer_snapshot_line;
   renderer_class->change_buffer = ide_line_change_gutter_renderer_change_buffer;
+  renderer_class->query_data = NULL; /* opt out */
 
   added_quark = g_quark_from_static_string ("added");
   changed_quark = g_quark_from_static_string ("changed");
diff --git a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c 
b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
index 475e75eed..fb63bb921 100644
--- a/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
+++ b/src/plugins/omni-gutter/gbp-omni-gutter-renderer.c
@@ -1555,6 +1555,7 @@ gbp_omni_gutter_renderer_class_init (GbpOmniGutterRendererClass *klass)
   renderer_class->activate = gbp_omni_gutter_renderer_activate;
   renderer_class->change_buffer = gbp_omni_gutter_renderer_change_buffer;
   renderer_class->change_view = gbp_omni_gutter_renderer_change_view;
+  renderer_class->query_data = NULL; /* opt out */
 
   properties [PROP_SHOW_LINE_CHANGES] =
     g_param_spec_boolean ("show-line-changes", NULL, NULL, TRUE,


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