Commit 7b081136 authored by Christian Hergert's avatar Christian Hergert
Browse files

libide: IdeIndentStyle only needs tabs and spaces

I think. I think the combination of both is a setting that will belong
in a particuarly autoindenter implementation. (tabs+spaces for alignment).
parent b6b18b73
......@@ -24,7 +24,7 @@
typedef struct
{
gchar *encoding;
IdeIndentStyle indent_style : 3;
IdeIndentStyle indent_style : 2;
guint indent_width : 6;
guint insert_trailing_newline : 1;
guint tab_width : 6;
......@@ -91,8 +91,8 @@ ide_file_settings_set_indent_style (IdeFileSettings *self,
IdeFileSettingsPrivate *priv = ide_file_settings_get_instance_private (self);
g_return_if_fail (IDE_IS_FILE_SETTINGS (self));
g_return_if_fail (indent_style >= IDE_INDENT_STYLE_NONE);
g_return_if_fail (indent_style <= IDE_INDENT_STYLE_TABS_AND_SPACES);
g_return_if_fail (indent_style >= IDE_INDENT_STYLE_SPACES);
g_return_if_fail (indent_style <= IDE_INDENT_STYLE_TABS);
if (priv->indent_style != indent_style)
{
......@@ -361,7 +361,7 @@ ide_file_settings_class_init (IdeFileSettingsClass *klass)
_("Indent Style"),
_("The indent style to use."),
IDE_TYPE_INDENT_STYLE,
IDE_INDENT_STYLE_NONE,
IDE_INDENT_STYLE_SPACES,
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_INDENT_STYLE,
gParamSpecs [PROP_INDENT_STYLE]);
......@@ -419,7 +419,7 @@ ide_file_settings_init (IdeFileSettings *self)
{
IdeFileSettingsPrivate *priv = ide_file_settings_get_instance_private (self);
priv->indent_style = IDE_INDENT_STYLE_NONE;
priv->indent_style = IDE_INDENT_STYLE_SPACES;
priv->indent_width = 8;
priv->insert_trailing_newline = TRUE;
priv->newline_type = GTK_SOURCE_NEWLINE_TYPE_LF;
......
......@@ -27,12 +27,8 @@ ide_indent_style_get_type (void)
{
gsize _type_id;
static const GEnumValue values[] = {
{ IDE_INDENT_STYLE_NONE, "IDE_INDENT_STYLE_NONE", "NONE" },
{ IDE_INDENT_STYLE_TABS, "IDE_INDENT_STYLE_TABS", "TABS" },
{ IDE_INDENT_STYLE_SPACES, "IDE_INDENT_STYLE_SPACES", "SPACES" },
{ IDE_INDENT_STYLE_TABS_AND_SPACES,
"IDE_INDENT_STYLE_TABS_AND_SPACES",
"TABS_AND_SPACES" },
{ IDE_INDENT_STYLE_TABS, "IDE_INDENT_STYLE_TABS", "TABS" },
{ 0 }
};
......
......@@ -27,10 +27,8 @@ G_BEGIN_DECLS
typedef enum
{
IDE_INDENT_STYLE_NONE = 0,
IDE_INDENT_STYLE_TABS = 1,
IDE_INDENT_STYLE_SPACES = 2,
IDE_INDENT_STYLE_TABS_AND_SPACES = 3,
IDE_INDENT_STYLE_SPACES = 1,
IDE_INDENT_STYLE_TABS = 2,
} IdeIndentStyle;
GType ide_indent_style_get_type (void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment