[gnome-builder] sourceview: remove chain-up of indentation to GtkSourceView
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] sourceview: remove chain-up of indentation to GtkSourceView
- Date: Wed, 26 Jul 2017 04:56:27 +0000 (UTC)
commit b087c87f77968eefb7504374b3cf69cc16898859
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 25 21:55:50 2017 -0700
sourceview: remove chain-up of indentation to GtkSourceView
Now that we mimic GtkSourceView, we do not need to setup the base class
to do it's own indentation.
https://bugzilla.gnome.org/show_bug.cgi?id=785425
libide/sourceview/ide-source-view.c | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/libide/sourceview/ide-source-view.c b/libide/sourceview/ide-source-view.c
index f135e36..beb9c37 100644
--- a/libide/sourceview/ide-source-view.c
+++ b/libide/sourceview/ide-source-view.c
@@ -836,22 +836,13 @@ ide_source_view_update_auto_indent_override (IdeSourceView *self)
/*
* Updates our override of auto-indent from the GtkSourceView underneath us.
- * Also updates our mode which needs to know if we have an indenter to
- * provide different CSS selectors.
+ * Since we do our own mimicing of GtkSourceView, we always disable it. Also
+ * updates our mode which needs to know if we have an indenter to provide
+ * different CSS selectors.
*/
-
- if (priv->auto_indent && (indenter == NULL))
- {
- gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (self), TRUE);
- if (priv->mode != NULL)
- ide_source_view_mode_set_has_indenter (priv->mode, FALSE);
- }
- else
- {
- gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (self), FALSE);
- if (priv->mode != NULL)
- ide_source_view_mode_set_has_indenter (priv->mode, (indenter != NULL));
- }
+ gtk_source_view_set_auto_indent (GTK_SOURCE_VIEW (self), FALSE);
+ if (priv->mode != NULL)
+ ide_source_view_mode_set_has_indenter (priv->mode, !!indenter);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]