[gnome-builder] Revert "snippets: ensure GbSourceSnippet knows about tab_width."



commit dc77d4ad526db8533bccd497409d98f5fefd9a90
Author: Christian Hergert <christian hergert me>
Date:   Sun Sep 7 19:17:32 2014 -0700

    Revert "snippets: ensure GbSourceSnippet knows about tab_width."
    
    This reverts commit 2725118cde1fa85cde936ed4653ab52ea71cef1e.
    
    Conflicts:
        src/editor/gb-source-view.c

 src/editor/gb-source-snippet.c |   43 ----------------------------------------
 src/editor/gb-source-snippet.h |    3 --
 2 files changed, 0 insertions(+), 46 deletions(-)
---
diff --git a/src/editor/gb-source-snippet.c b/src/editor/gb-source-snippet.c
index 18bd009..1cd3aaf 100644
--- a/src/editor/gb-source-snippet.c
+++ b/src/editor/gb-source-snippet.c
@@ -38,7 +38,6 @@ struct _GbSourceSnippetPrivate
   gint                    tab_stop;
   gint                    max_tab_stop;
   gint                    current_chunk;
-  guint                   tab_width;
   guint                   inserted : 1;
   guint                   insert_spaces_instead_of_tabs : 1;
 };
@@ -50,7 +49,6 @@ enum {
   PROP_MARK_BEGIN,
   PROP_MARK_END,
   PROP_TAB_STOP,
-  PROP_TAB_WIDTH,
   PROP_TRIGGER,
   LAST_PROP
 };
@@ -104,26 +102,6 @@ gb_source_snippet_copy (GbSourceSnippet *snippet)
   RETURN (ret);
 }
 
-guint
-gb_source_snippet_get_tab_width (GbSourceSnippet *snippet)
-{
-  g_return_val_if_fail (GB_IS_SOURCE_SNIPPET (snippet), 0);
-
-  return snippet->priv->tab_width;
-}
-
-void
-gb_source_snippet_set_tab_width (GbSourceSnippet *snippet,
-                                 guint            tab_width)
-{
-  g_return_if_fail (GB_IS_SOURCE_SNIPPET (snippet));
-  g_return_if_fail (tab_width > 0);
-  g_return_if_fail (tab_width <= 32);
-
-  snippet->priv->tab_width = tab_width;
-  g_object_notify_by_pspec (G_OBJECT (snippet), gParamSpecs [PROP_TAB_WIDTH]);
-}
-
 gboolean
 gb_source_snippet_get_insert_spaces_instead_of_tabs (GbSourceSnippet *snippet)
 {
@@ -961,10 +939,6 @@ gb_source_snippet_get_property (GObject    *object,
       g_value_set_uint (value, snippet->priv->tab_stop);
       break;
 
-    case PROP_TAB_WIDTH:
-      g_value_set_uint (value, snippet->priv->tab_width);
-      break;
-
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
     }
@@ -985,10 +959,6 @@ gb_source_snippet_set_property (GObject      *object,
                                                            g_value_get_boolean (value));
       break;
 
-    case PROP_TAB_WIDTH:
-      gb_source_snippet_set_tab_width (snippet, g_value_get_uint (value));
-      break;
-
     case PROP_TRIGGER:
       gb_source_snippet_set_trigger (snippet, g_value_get_string (value));
       break;
@@ -1067,17 +1037,6 @@ gb_source_snippet_class_init (GbSourceSnippetClass *klass)
   g_object_class_install_property (object_class, PROP_TAB_STOP,
                                    gParamSpecs[PROP_TAB_STOP]);
 
-  gParamSpecs [PROP_TAB_WIDTH] =
-    g_param_spec_uint ("tab-width",
-                       _("Tab Width"),
-                       _("Tab Width in Spaces"),
-                       1,
-                       32,
-                       2,
-                       (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (object_class, PROP_TAB_WIDTH,
-                                   gParamSpecs [PROP_TAB_WIDTH]);
-
   EXIT;
 }
 
@@ -1088,8 +1047,6 @@ gb_source_snippet_init (GbSourceSnippet *snippet)
 
   snippet->priv = gb_source_snippet_get_instance_private (snippet);
 
-  snippet->priv->insert_spaces_instead_of_tabs = FALSE;
-  snippet->priv->tab_width = 2;
   snippet->priv->tab_stop = 0;
   snippet->priv->max_tab_stop = -1;
   snippet->priv->chunks = g_ptr_array_new_with_free_func (g_object_unref);
diff --git a/src/editor/gb-source-snippet.h b/src/editor/gb-source-snippet.h
index adb8c2a..c4588e9 100644
--- a/src/editor/gb-source-snippet.h
+++ b/src/editor/gb-source-snippet.h
@@ -73,9 +73,6 @@ GbSourceSnippetContext *gb_source_snippet_get_context     (GbSourceSnippet
 void                    gb_source_snippet_set_insert_spaces_instead_of_tabs
                                                           (GbSourceSnippet      *snippet,
                                                            gboolean              
insert_spaces_instead_of_tabs);
-guint                   gb_source_snippet_get_tab_width   (GbSourceSnippet      *snippet);
-void                    gb_source_snippet_set_tab_width   (GbSourceSnippet      *snippet,
-                                                           guint                 tab_width);
 
 G_END_DECLS
 


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