[gnome-builder] libide: IdeIndentStyle only needs tabs and spaces
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: IdeIndentStyle only needs tabs and spaces
- Date: Mon, 23 Mar 2015 23:31:10 +0000 (UTC)
commit 7b0811367383ae93b35935842282ac8e362cc36e
Author: Christian Hergert <christian hergert me>
Date: Sat Feb 14 16:36:07 2015 -0800
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).
libide/ide-file-settings.c | 10 +++++-----
libide/ide-indent-style.c | 6 +-----
libide/ide-indent-style.h | 6 ++----
3 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/libide/ide-file-settings.c b/libide/ide-file-settings.c
index c0621e5..4d7c82a 100644
--- a/libide/ide-file-settings.c
+++ b/libide/ide-file-settings.c
@@ -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;
diff --git a/libide/ide-indent-style.c b/libide/ide-indent-style.c
index 76ac972..dcd645e 100644
--- a/libide/ide-indent-style.c
+++ b/libide/ide-indent-style.c
@@ -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 }
};
diff --git a/libide/ide-indent-style.h b/libide/ide-indent-style.h
index 0dbdfc2..eab995f 100644
--- a/libide/ide-indent-style.h
+++ b/libide/ide-indent-style.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]