[libgda] Removed GdaAttributesManager
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Removed GdaAttributesManager
- Date: Sun, 24 Feb 2019 05:59:00 +0000 (UTC)
commit bb6975ad2c32fd7bad8bbf2d184f942767897ed9
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Sat Feb 23 23:58:15 2019 -0600
Removed GdaAttributesManager
Fix issue GNOME/libgda#173
libgda/Makefile.am | 1 -
libgda/gda-attributes-manager.c | 455 ----------------------------------------
libgda/gda-attributes-manager.h | 28 ---
libgda/gda-column.c | 1 -
libgda/gda-meta-struct.c | 1 -
libgda/gda-tree-node.c | 14 +-
libgda/libgda.h.in | 1 +
libgda/meson.build | 1 -
8 files changed, 3 insertions(+), 499 deletions(-)
---
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index b72fff2e2..85246fbcf 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -192,7 +192,6 @@ libgda_sources = \
libcsv.c \
dir-blob-op.h \
dir-blob-op.c \
- gda-attributes-manager.c \
$(gda_headers) \
gda-debug-macros.h \
gda-connection-internal.h \
diff --git a/libgda/gda-attributes-manager.h b/libgda/gda-attributes-manager.h
index ee5d18ff1..f93638e71 100644
--- a/libgda/gda-attributes-manager.h
+++ b/libgda/gda-attributes-manager.h
@@ -25,34 +25,6 @@
G_BEGIN_DECLS
-/* main struct */
-/**
- * GdaAttributesManager:
- */
-typedef struct _GdaAttributesManager GdaAttributesManager;
-typedef void (*GdaAttributesManagerFunc) (const gchar *att_name, const GValue *value, gpointer data);
-typedef void (*GdaAttributesManagerSignal) (GObject *obj, const gchar *att_name, const GValue *value,
gpointer data);
-
-
-#define GDA_TYPE_ATTRIBUTES_MANAGER (gda_attributes_manager_get_type())
-
-GType gda_attributes_manager_get_type (void) G_GNUC_CONST;
-GdaAttributesManager *gda_attributes_manager_new (gboolean for_objects,
- GdaAttributesManagerSignal signal_func, gpointer
signal_data);
-void gda_attributes_manager_free (GdaAttributesManager *mgr);
-
-void gda_attributes_manager_set (GdaAttributesManager *mgr, gpointer ptr,
- const gchar *att_name, const GValue *value);
-void gda_attributes_manager_set_full (GdaAttributesManager *mgr, gpointer ptr,
- const gchar *att_name, const GValue *value,
GDestroyNotify destroy);
-const GValue *gda_attributes_manager_get (GdaAttributesManager *mgr, gpointer ptr, const
gchar *att_name);
-void gda_attributes_manager_copy (GdaAttributesManager *from_mgr, gpointer *from,
- GdaAttributesManager *to_mgr, gpointer *to);
-void gda_attributes_manager_clear (GdaAttributesManager *mgr, gpointer ptr);
-void gda_attributes_manager_foreach (GdaAttributesManager *mgr, gpointer ptr,
- GdaAttributesManagerFunc func, gpointer data);
-
-
/* possible predefined attribute names for gda_holder_get_attribute() or gda_column_get_attribute() */
/**
* GDA_ATTRIBUTE_DESCRIPTION:
diff --git a/libgda/gda-column.c b/libgda/gda-column.c
index eb9edea72..e42d9bace 100644
--- a/libgda/gda-column.c
+++ b/libgda/gda-column.c
@@ -27,7 +27,6 @@
#include <libgda/gda-column.h>
#include <string.h>
#include "gda-marshal.h"
-#include <libgda/gda-attributes-manager.h>
#include <libgda/gda-custom-marshal.h>
#define PARENT_TYPE G_TYPE_OBJECT
diff --git a/libgda/gda-meta-struct.c b/libgda/gda-meta-struct.c
index 8de477526..d61ee6c25 100644
--- a/libgda/gda-meta-struct.c
+++ b/libgda/gda-meta-struct.c
@@ -29,7 +29,6 @@
#include <sql-parser/gda-sql-parser.h>
#include <sql-parser/gda-sql-statement.h>
#include <sql-parser/gda-statement-struct-util.h>
-#include <libgda/gda-attributes-manager.h>
#include <libgda/gda-debug-macros.h>
/*
diff --git a/libgda/gda-tree-node.c b/libgda/gda-tree-node.c
index 27914950c..9d332de1a 100644
--- a/libgda/gda-tree-node.c
+++ b/libgda/gda-tree-node.c
@@ -76,8 +76,6 @@ enum {
PROP_NAME
};
-GdaAttributesManager *_gda_tree_node_attributes_manager;
-
static void m_node_changed (GdaTreeNode *reporting, GdaTreeNode *node);
static void m_node_inserted (GdaTreeNode *reporting, GdaTreeNode *node);
static void m_node_has_child_toggled (GdaTreeNode *reporting, GdaTreeNode *node);
@@ -184,8 +182,6 @@ gda_tree_node_class_init (GdaTreeNodeClass *klass)
object_class->dispose = gda_tree_node_dispose;
- /* extra */
- _gda_tree_node_attributes_manager = gda_attributes_manager_new (TRUE, NULL, NULL);
}
static void
@@ -861,14 +857,8 @@ gda_tree_node_get_child_name (GdaTreeNode *node, const gchar *name)
GdaTreeNodesList *tn = GDA_TREE_NODES_LIST (parts->data);
GSList *list;
for (list = tn->nodes; list; list = list->next) {
- const GValue *cvalue;
- cvalue = gda_attributes_manager_get (_gda_tree_node_attributes_manager,
list->data,
- GDA_ATTRIBUTE_NAME);
- if (cvalue) {
- const gchar *cname = g_value_get_string (cvalue);
- if (cname && !strcmp (name, cname))
- return (GdaTreeNode*) list->data;
- }
+ if (priv->name && !g_strcmp0 (name, priv->name))
+ return (GdaTreeNode*) list->data;
}
}
}
diff --git a/libgda/libgda.h.in b/libgda/libgda.h.in
index 75d0e0171..9d16d06cd 100644
--- a/libgda/libgda.h.in
+++ b/libgda/libgda.h.in
@@ -109,3 +109,4 @@ G_END_DECLS
+
diff --git a/libgda/meson.build b/libgda/meson.build
index 02ea1030e..dd4c85b30 100644
--- a/libgda/meson.build
+++ b/libgda/meson.build
@@ -133,7 +133,6 @@ install_headers(libgda_headers_all,
)
libgda_sources= files([
- 'gda-attributes-manager.c',
'gda-batch.c',
'gda-blob-op.c',
'gda-blob-op-impl.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]