[gnome-builder] Revert "ide: add light bulb"



commit 385170a574c2d3b3d5fc5b85570102ad7788d7fc
Author: Christian Hergert <chergert redhat com>
Date:   Mon Dec 6 15:22:17 2021 -0800

    Revert "ide: add light bulb"
    
    This reverts commit d6f11c7288443f38367f08bf0217f64ee0961a0d.
    
    This wasn't ready to be committed because it has numerous memory safety
    issues and ties light-bulb to code-actions. We're only ready to add a
    widget for some of this now, not wire it up to code-actions.

 src/libide/sourceview/ide-light-bulb-private.h     |  36 --
 src/libide/sourceview/ide-light-bulb.c             | 533 ---------------------
 src/libide/sourceview/ide-source-view.c            |  20 -
 src/libide/sourceview/meson.build                  |   2 -
 src/libide/themes/libide-themes.gresource.xml      |   1 -
 src/libide/themes/themes/shared.css                |   1 -
 .../themes/themes/shared/shared-light-bulb.css     |  25 -
 7 files changed, 618 deletions(-)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index e50b3792f..34b73af31 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -38,7 +38,6 @@
 #include "ide-cursor.h"
 #include "ide-hover-private.h"
 #include "ide-indenter.h"
-#include "ide-light-bulb-private.h"
 #include "ide-snippet-chunk.h"
 #include "ide-snippet-context.h"
 #include "ide-snippet-private.h"
@@ -98,7 +97,6 @@ typedef struct
 
   IdeCompletion               *completion;
   IdeHover                    *hover;
-  IdeLightBulb                *light_bulb;
 
   DzlBindingGroup             *file_setting_bindings;
   DzlSignalGroup              *buffer_signals;
@@ -868,17 +866,6 @@ ide_source_view__buffer_changed_cb (IdeSourceView *self,
   priv->change_sequence++;
 }
 
-static void
-ide_source_view__buffer_cursor_moved_cb (IdeSourceView *self,
-                                         IdeBuffer     *buffer)
-{
-  IdeSourceViewPrivate *priv = ide_source_view_get_instance_private (self);
-
-  g_assert (IDE_IS_SOURCE_VIEW (self));
-
-  _ide_light_bulb_show(priv->light_bulb);
-}
-
 static void
 ide_source_view_rebuild_css (IdeSourceView *self)
 {
@@ -5594,7 +5581,6 @@ ide_source_view_dispose (GObject *object)
   g_clear_handle_id (&priv->delay_size_allocate_chainup, g_source_remove);
 
   g_clear_object (&priv->hover);
-  g_clear_object (&priv->light_bulb);
   g_clear_object (&priv->completion);
   g_clear_object (&priv->capture);
   ide_clear_and_destroy_object (&priv->indenter_adapter);
@@ -6801,7 +6787,6 @@ ide_source_view_init (IdeSourceView *self)
   priv->overscroll_num_lines = DEFAULT_OVERSCROLL_NUM_LINES;
 
   priv->hover = _ide_hover_new (self);
-  priv->light_bulb = _ide_light_bulb_new (self);
 
   priv->file_setting_bindings = dzl_binding_group_new ();
   dzl_binding_group_bind (priv->file_setting_bindings, "auto-indent",
@@ -6828,11 +6813,6 @@ ide_source_view_init (IdeSourceView *self)
                                    G_CALLBACK (ide_source_view__buffer_changed_cb),
                                    self,
                                    G_CONNECT_SWAPPED);
-  dzl_signal_group_connect_object (priv->buffer_signals,
-                                   "cursor-moved",
-                                   G_CALLBACK (ide_source_view__buffer_cursor_moved_cb),
-                                   self,
-                                   G_CONNECT_SWAPPED);
   dzl_signal_group_connect_object (priv->buffer_signals,
                                    "request-scroll-to-insert",
                                    G_CALLBACK (ide_source_view__buffer_request_scroll_to_insert_cb),
diff --git a/src/libide/sourceview/meson.build b/src/libide/sourceview/meson.build
index e0d810578..99641298b 100644
--- a/src/libide/sourceview/meson.build
+++ b/src/libide/sourceview/meson.build
@@ -18,7 +18,6 @@ libide_sourceview_private_headers = [
   'ide-cursor.h',
   'ide-hover-popover-private.h',
   'ide-hover-private.h',
-  'ide-light-bulb-private.h',
   'ide-source-view-capture.h',
   'ide-source-view-mode.h',
   'ide-source-view-movements.h',
@@ -69,7 +68,6 @@ libide_sourceview_private_sources = [
   'ide-cursor.c',
   'ide-hover.c',
   'ide-hover-popover.c',
-  'ide-light-bulb.c',
   'ide-line-change-gutter-renderer.c',
   'ide-source-view-capture.c',
   'ide-source-view-mode.c',
diff --git a/src/libide/themes/libide-themes.gresource.xml b/src/libide/themes/libide-themes.gresource.xml
index c844a643a..2d22cd6b7 100644
--- a/src/libide/themes/libide-themes.gresource.xml
+++ b/src/libide/themes/libide-themes.gresource.xml
@@ -23,7 +23,6 @@
     <file compressed="true">themes/shared/shared-greeter.css</file>
     <file compressed="true">themes/shared/shared-hoverer.css</file>
     <file compressed="true">themes/shared/shared-layout.css</file>
-    <file compressed="true">themes/shared/shared-light-bulb.css</file>
     <file compressed="true">themes/shared/shared-omnibar.css</file>
     <file compressed="true">themes/shared/shared-search.css</file>
     <file compressed="true">themes/shared/shared-treeview.css</file>
diff --git a/src/libide/themes/themes/shared.css b/src/libide/themes/themes/shared.css
index a305fc779..e14da6f0b 100644
--- a/src/libide/themes/themes/shared.css
+++ b/src/libide/themes/themes/shared.css
@@ -5,7 +5,6 @@
 @import url("resource:///org/gnome/builder/themes/shared/shared-editor.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-greeter.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-hoverer.css");
-@import url("resource:///org/gnome/builder/themes/shared/shared-light-bulb.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-omnibar.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-search.css");
 @import url("resource:///org/gnome/builder/themes/shared/shared-treeview.css");


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