Commit 07cd8e50 authored by Christian Hergert's avatar Christian Hergert
Browse files

enums: use ide-enums for IdeIndentStyle

No sense in manually managing this enums gtype.
parent d804072d
......@@ -108,7 +108,6 @@ libide_1_0_la_public_sources = \
ide-highlight-index.h \
ide-highlighter.c \
ide-highlighter.h \
ide-indent-style.c \
ide-indent-style.h \
ide-indenter.c \
ide-indenter.h \
......@@ -388,6 +387,7 @@ glib_enum_headers = \
ide-buffer.h \
ide-diagnostic.h \
ide-highlighter.h \
ide-indent-style.h \
ide-source-view.h \
ide-thread-pool.h \
$(NULL)
......
......@@ -8,6 +8,7 @@
#include "ide-buffer.h"
#include "ide-diagnostic.h"
#include "ide-highlighter.h"
#include "ide-indent-style.h"
#include "ide-source-view.h"
#include "ide-thread-pool.h"
......
......@@ -21,6 +21,7 @@
#include <glib/gi18n.h>
#include <gtksourceview/gtksource.h>
#include "ide-enums.h"
#include "ide-file.h"
#include "ide-file-settings.h"
......
/* ide-indent-style.c
*
* Copyright (C) 2015 Christian Hergert <christian@hergert.me>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ide-indent-style.h"
GType
ide_indent_style_get_type (void)
{
static gsize type_id;
if (g_once_init_enter (&type_id))
{
gsize _type_id;
static const GEnumValue values[] = {
{ IDE_INDENT_STYLE_SPACES, "IDE_INDENT_STYLE_SPACES", "SPACES" },
{ IDE_INDENT_STYLE_TABS, "IDE_INDENT_STYLE_TABS", "TABS" },
{ 0 }
};
_type_id = g_enum_register_static ("IdeIndentStyle", values);
g_once_init_leave (&type_id, _type_id);
}
return type_id;
}
......@@ -23,16 +23,12 @@
G_BEGIN_DECLS
#define IDE_TYPE_INDENT_STYLE (ide_indent_style_get_type())
typedef enum
{
IDE_INDENT_STYLE_SPACES = 1,
IDE_INDENT_STYLE_TABS = 2,
} IdeIndentStyle;
GType ide_indent_style_get_type (void);
G_END_DECLS
#endif /* IDE_INDENT_STYLE_H */
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