[gnome-builder] symbols: Added symbols, flags and icons
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] symbols: Added symbols, flags and icons
- Date: Fri, 1 Sep 2017 22:23:45 +0000 (UTC)
commit 67f3085f0b9038f1eb5934a693311f37bef44570
Author: Anoop Chandu <anoopchandu96 gmail com>
Date: Thu Aug 24 00:37:18 2017 +0530
symbols: Added symbols, flags and icons
New symbols IDE_SYMBOL_ALIAS, IDE_SYMBOL_MACRO and
IDE_SYMBOL_TEMPLATE. New flag IDE_SYMBOL_FLAGS_IS_DEFINITION is
added. Icons are added to some symbols. cases in switch statement
are rearranged.
https://bugzilla.gnome.org/show_bug.cgi?id=786700
libide/symbols/ide-symbol.c | 30 +++++++++++++++++++++---------
libide/symbols/ide-symbol.h | 4 ++++
2 files changed, 25 insertions(+), 9 deletions(-)
---
diff --git a/libide/symbols/ide-symbol.c b/libide/symbols/ide-symbol.c
index 5289327..071dc91 100644
--- a/libide/symbols/ide-symbol.c
+++ b/libide/symbols/ide-symbol.c
@@ -191,8 +191,12 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
switch (kind)
{
- case IDE_SYMBOL_FUNCTION:
- icon_name = "lang-function-symbolic";
+ case IDE_SYMBOL_ALIAS:
+ icon_name = "lang-typedef-symbolic";
+ break;
+
+ case IDE_SYMBOL_CLASS:
+ icon_name = "lang-class-symbolic";
break;
case IDE_SYMBOL_ENUM:
@@ -203,20 +207,24 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
icon_name = "lang-enum-value-symbolic";
break;
- case IDE_SYMBOL_STRUCT:
- icon_name = "lang-struct-symbolic";
+ case IDE_SYMBOL_FUNCTION:
+ icon_name = "lang-function-symbolic";
break;
- case IDE_SYMBOL_CLASS:
- icon_name = "lang-class-symbolic";
+ case IDE_SYMBOL_MACRO:
+ icon_name = "lang-define-symbolic";
break;
case IDE_SYMBOL_METHOD:
icon_name = "lang-method-symbolic";
break;
- case IDE_SYMBOL_UNION:
- icon_name = "lang-union-symbolic";
+ case IDE_SYMBOL_NAMESPACE:
+ icon_name = "lang-namespace-symbolic";
+ break;
+
+ case IDE_SYMBOL_STRUCT:
+ icon_name = "lang-struct-symbolic";
break;
case IDE_SYMBOL_SCALAR:
@@ -225,6 +233,10 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
icon_name = "lang-variable-symbolic";
break;
+ case IDE_SYMBOL_UNION:
+ icon_name = "lang-union-symbolic";
+ break;
+
case IDE_SYMBOL_ARRAY:
case IDE_SYMBOL_BOOLEAN:
case IDE_SYMBOL_CONSTANT:
@@ -233,12 +245,12 @@ ide_symbol_kind_get_icon_name (IdeSymbolKind kind)
case IDE_SYMBOL_HEADER:
case IDE_SYMBOL_INTERFACE:
case IDE_SYMBOL_MODULE:
- case IDE_SYMBOL_NAMESPACE:
case IDE_SYMBOL_NUMBER:
case IDE_SYMBOL_NONE:
case IDE_SYMBOL_PACKAGE:
case IDE_SYMBOL_PROPERTY:
case IDE_SYMBOL_STRING:
+ case IDE_SYMBOL_TEMPLATE:
case IDE_SYMBOL_KEYWORD:
icon_name = NULL;
break;
diff --git a/libide/symbols/ide-symbol.h b/libide/symbols/ide-symbol.h
index 2cffa80..d4c7baf 100644
--- a/libide/symbols/ide-symbol.h
+++ b/libide/symbols/ide-symbol.h
@@ -28,6 +28,7 @@ G_BEGIN_DECLS
typedef enum
{
IDE_SYMBOL_NONE,
+ IDE_SYMBOL_ALIAS,
IDE_SYMBOL_ARRAY,
IDE_SYMBOL_BOOLEAN,
IDE_SYMBOL_CLASS,
@@ -40,6 +41,7 @@ typedef enum
IDE_SYMBOL_FUNCTION,
IDE_SYMBOL_HEADER,
IDE_SYMBOL_INTERFACE,
+ IDE_SYMBOL_MACRO,
IDE_SYMBOL_METHOD,
IDE_SYMBOL_MODULE,
IDE_SYMBOL_NAMESPACE,
@@ -49,6 +51,7 @@ typedef enum
IDE_SYMBOL_SCALAR,
IDE_SYMBOL_STRING,
IDE_SYMBOL_STRUCT,
+ IDE_SYMBOL_TEMPLATE,
IDE_SYMBOL_UNION,
IDE_SYMBOL_VARIABLE,
IDE_SYMBOL_KEYWORD,
@@ -79,6 +82,7 @@ typedef enum
IDE_SYMBOL_FLAGS_IS_STATIC = 1 << 0,
IDE_SYMBOL_FLAGS_IS_MEMBER = 1 << 1,
IDE_SYMBOL_FLAGS_IS_DEPRECATED = 1 << 2,
+ IDE_SYMBOL_FLAGS_IS_DEFINITION = 1 << 3
} IdeSymbolFlags;
GType ide_symbol_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]