[gnome-builder] Revert "snippets: plumb if snippets should insert tabs."
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] Revert "snippets: plumb if snippets should insert tabs."
- Date: Mon, 8 Sep 2014 02:19:56 +0000 (UTC)
commit 61bc2b807a4126602341beb55c2a2e4962d6e7e6
Author: Christian Hergert <christian hergert me>
Date: Sun Sep 7 19:19:28 2014 -0700
Revert "snippets: plumb if snippets should insert tabs."
This reverts commit a3925a193df0b2b67c1bf27bcb7809a0809b1eb8.
Conflicts:
src/editor/gb-source-view.c
src/editor/gb-source-snippet.c | 46 +---------------------------------------
src/editor/gb-source-snippet.h | 3 --
2 files changed, 1 insertions(+), 48 deletions(-)
---
diff --git a/src/editor/gb-source-snippet.c b/src/editor/gb-source-snippet.c
index 1cd3aaf..3f605fb 100644
--- a/src/editor/gb-source-snippet.c
+++ b/src/editor/gb-source-snippet.c
@@ -38,14 +38,12 @@ struct _GbSourceSnippetPrivate
gint tab_stop;
gint max_tab_stop;
gint current_chunk;
- guint inserted : 1;
- guint insert_spaces_instead_of_tabs : 1;
+ gboolean inserted;
};
enum {
PROP_0,
PROP_BUFFER,
- PROP_INSERT_SPACES_INSTEAD_OF_TABS,
PROP_MARK_BEGIN,
PROP_MARK_END,
PROP_TAB_STOP,
@@ -75,7 +73,6 @@ gb_source_snippet_copy (GbSourceSnippet *snippet)
GbSourceSnippetPrivate *priv;
GbSourceSnippetChunk *chunk;
GbSourceSnippet *ret;
- gboolean spaces;
gint i;
ENTRY;
@@ -84,10 +81,7 @@ gb_source_snippet_copy (GbSourceSnippet *snippet)
priv = snippet->priv;
- spaces = snippet->priv->insert_spaces_instead_of_tabs;
-
ret = g_object_new (GB_TYPE_SOURCE_SNIPPET,
- "insert-spaces-instead-of-tabs", spaces,
"trigger", snippet->priv->trigger,
NULL);
@@ -102,26 +96,6 @@ gb_source_snippet_copy (GbSourceSnippet *snippet)
RETURN (ret);
}
-gboolean
-gb_source_snippet_get_insert_spaces_instead_of_tabs (GbSourceSnippet *snippet)
-{
- g_return_val_if_fail (GB_IS_SOURCE_SNIPPET (snippet), FALSE);
-
- return snippet->priv->insert_spaces_instead_of_tabs;
-}
-
-void
-gb_source_snippet_set_insert_spaces_instead_of_tabs (GbSourceSnippet *snippet,
- gboolean insert_spaces_instead_of_tabs)
-{
- g_return_if_fail (GB_IS_SOURCE_SNIPPET (snippet));
-
- snippet->priv->insert_spaces_instead_of_tabs =
- insert_spaces_instead_of_tabs;
- g_object_notify_by_pspec (G_OBJECT (snippet),
- gParamSpecs [PROP_INSERT_SPACES_INSTEAD_OF_TABS]);
-}
-
gint
gb_source_snippet_get_tab_stop (GbSourceSnippet *snippet)
{
@@ -919,10 +893,6 @@ gb_source_snippet_get_property (GObject *object,
g_value_set_object (value, snippet->priv->buffer);
break;
- case PROP_INSERT_SPACES_INSTEAD_OF_TABS:
- g_value_set_boolean (value, snippet->priv->insert_spaces_instead_of_tabs);
- break;
-
case PROP_MARK_BEGIN:
g_value_set_object (value, snippet->priv->mark_begin);
break;
@@ -954,11 +924,6 @@ gb_source_snippet_set_property (GObject *object,
switch (prop_id)
{
- case PROP_INSERT_SPACES_INSTEAD_OF_TABS:
- gb_source_snippet_set_insert_spaces_instead_of_tabs (snippet,
- g_value_get_boolean (value));
- break;
-
case PROP_TRIGGER:
gb_source_snippet_set_trigger (snippet, g_value_get_string (value));
break;
@@ -990,15 +955,6 @@ gb_source_snippet_class_init (GbSourceSnippetClass *klass)
g_object_class_install_property (object_class, PROP_BUFFER,
gParamSpecs[PROP_BUFFER]);
- gParamSpecs [PROP_INSERT_SPACES_INSTEAD_OF_TABS] =
- g_param_spec_boolean ("insert-spaces-instead-of-tabs",
- _("Insert Spaces Instead of Tabs"),
- _("Insert Spaces Instead of Tabs"),
- FALSE,
- (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- g_object_class_install_property (object_class, PROP_INSERT_SPACES_INSTEAD_OF_TABS,
- gParamSpecs [PROP_INSERT_SPACES_INSTEAD_OF_TABS]);
-
gParamSpecs[PROP_MARK_BEGIN] =
g_param_spec_object ("mark-begin",
_ ("Mark Begin"),
diff --git a/src/editor/gb-source-snippet.h b/src/editor/gb-source-snippet.h
index c4588e9..ba63228 100644
--- a/src/editor/gb-source-snippet.h
+++ b/src/editor/gb-source-snippet.h
@@ -70,9 +70,6 @@ void gb_source_snippet_get_chunk_range (GbSourceSnippet
GtkTextMark *gb_source_snippet_get_mark_begin (GbSourceSnippet *snippet);
GtkTextMark *gb_source_snippet_get_mark_end (GbSourceSnippet *snippet);
GbSourceSnippetContext *gb_source_snippet_get_context (GbSourceSnippet *snippet);
-void gb_source_snippet_set_insert_spaces_instead_of_tabs
- (GbSourceSnippet *snippet,
- gboolean
insert_spaces_instead_of_tabs);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]