[gnome-builder] snippets: rename tab_size to tab_width to match gtksourceview.



commit 22b68c00bfc5247c3e20eb750728289dae328368
Author: Christian Hergert <christian hergert me>
Date:   Sun Sep 7 19:12:09 2014 -0700

    snippets: rename tab_size to tab_width to match gtksourceview.

 src/editor/gb-source-snippet-context.c |   10 +++++-----
 src/editor/gb-source-snippet-context.h |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/editor/gb-source-snippet-context.c b/src/editor/gb-source-snippet-context.c
index 5c380d3..997c2d6 100644
--- a/src/editor/gb-source-snippet-context.c
+++ b/src/editor/gb-source-snippet-context.c
@@ -43,7 +43,7 @@ struct _GbSourceSnippetContextPrivate
   GHashTable *shared;
   GHashTable *variables;
   gchar      *line_prefix;
-  gint        tab_size;
+  gint        tab_width;
   gboolean    use_spaces;
 };
 
@@ -460,7 +460,7 @@ gb_source_snippet_context_expand (GbSourceSnippetContext *context,
       else if (c == '\t')
         {
           if (priv->use_spaces)
-            for (i = 0; i < priv->tab_size; i++)
+            for (i = 0; i < priv->tab_width; i++)
               g_string_append_c (str, ' ');
 
           else
@@ -481,11 +481,11 @@ gb_source_snippet_context_expand (GbSourceSnippetContext *context,
 }
 
 void
-gb_source_snippet_context_set_tab_size (GbSourceSnippetContext *context,
-                                        gint                    tab_size)
+gb_source_snippet_context_set_tab_width (GbSourceSnippetContext *context,
+                                         gint                    tab_width)
 {
   g_return_if_fail (GB_IS_SOURCE_SNIPPET_CONTEXT (context));
-  context->priv->tab_size = tab_size;
+  context->priv->tab_width = tab_width;
 }
 
 void
diff --git a/src/editor/gb-source-snippet-context.h b/src/editor/gb-source-snippet-context.h
index c27c76f..f2f9f29 100644
--- a/src/editor/gb-source-snippet-context.h
+++ b/src/editor/gb-source-snippet-context.h
@@ -59,7 +59,7 @@ const gchar            *gb_source_snippet_context_get_variable    (GbSourceSnipp
                                                                    const gchar            *key);
 gchar                  *gb_source_snippet_context_expand          (GbSourceSnippetContext *context,
                                                                    const gchar            *input);
-void                    gb_source_snippet_context_set_tab_size    (GbSourceSnippetContext *context,
+void                    gb_source_snippet_context_set_tab_width   (GbSourceSnippetContext *context,
                                                                    gint                    tab_size);
 void                    gb_source_snippet_context_set_use_spaces  (GbSourceSnippetContext *context,
                                                                    gboolean                use_spaces);


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