[anjuta/symbol-db-model] symbol-db: Renamed model-global to model-project
- From: Naba Kumar <naba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/symbol-db-model] symbol-db: Renamed model-global to model-project
- Date: Thu, 18 Mar 2010 20:46:25 +0000 (UTC)
commit 6e36eace1a5c4e8ff753d20805866d1d8432ae42
Author: Naba Kumar <naba gnome org>
Date: Thu Mar 18 20:47:31 2010 +0200
symbol-db: Renamed model-global to model-project
plugins/symbol-db/symbol-db-model-project.c | 92 +++++++++++++-------------
plugins/symbol-db/symbol-db-model-project.h | 44 +++++++-------
2 files changed, 68 insertions(+), 68 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-model-project.c b/plugins/symbol-db/symbol-db-model-project.c
index 2a83805..6e708e3 100644
--- a/plugins/symbol-db/symbol-db-model-project.c
+++ b/plugins/symbol-db/symbol-db-model-project.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * symbol-db-model-global.c
+ * symbol-db-model-project.c
* Copyright (C) Naba Kumar 2010 <naba gnome org>
*
* anjuta is free software: you can redistribute it and/or modify it
@@ -18,17 +18,17 @@
*/
#include "symbol-db-engine.h"
-#include "symbol-db-model-global.h"
+#include "symbol-db-model-project.h"
-typedef struct _SymbolDBModelGlobalPriv SymbolDBModelGlobalPriv;
-struct _SymbolDBModelGlobalPriv
+typedef struct _SymbolDBModelProjectPriv SymbolDBModelProjectPriv;
+struct _SymbolDBModelProjectPriv
{
SymbolDBEngine* dbe;
};
#define GET_PRIV(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- SYMBOL_DB_TYPE_MODEL_GLOBAL, \
- SymbolDBModelGlobalPriv))
+ SYMBOL_DB_TYPE_MODEL_PROJECT, \
+ SymbolDBModelProjectPriv))
enum {
DATA_COL_SYMBOL_ID,
DATA_COL_SYMBOL_NAME,
@@ -50,24 +50,24 @@ enum
PROP_SYMBOL_DB_ENGINE
};
-G_DEFINE_TYPE (SymbolDBModelGlobal, symbol_db_model_global,
+G_DEFINE_TYPE (SymbolDBModelProject, symbol_db_model_project,
SYMBOL_DB_TYPE_MODEL);
static gint
-symbol_db_model_global_get_n_children (SymbolDBModel *model, gint tree_level,
+symbol_db_model_project_get_n_children (SymbolDBModel *model, gint tree_level,
GValue column_values[])
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
SymbolDBEngineIterator *iter;
gint n_children;
gint symbol_id;
- g_return_val_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (model), 0);
+ g_return_val_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (model), 0);
priv = GET_PRIV (model);
/* If engine is not connected, there is nothing we can show */
if (!priv->dbe || !symbol_db_engine_is_connected (priv->dbe))
- return NULL;
+ return 0;
switch (tree_level)
{
@@ -93,16 +93,16 @@ symbol_db_model_global_get_n_children (SymbolDBModel *model, gint tree_level,
}
static GdaDataModel*
-symbol_db_model_global_get_children (SymbolDBModel *model, gint tree_level,
+symbol_db_model_project_get_children (SymbolDBModel *model, gint tree_level,
GValue column_values[], gint offset,
gint limit)
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
SymbolDBEngineIterator *iter;
GdaDataModel *data_model;
gint symbol_id;
- g_return_val_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (model), 0);
+ g_return_val_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (model), 0);
priv = GET_PRIV (model);
/* If engine is not connected, there is nothing we can show */
@@ -138,7 +138,7 @@ symbol_db_model_global_get_children (SymbolDBModel *model, gint tree_level,
}
static gboolean
-symbol_db_model_global_get_query_value (SymbolDBModel *model,
+symbol_db_model_project_get_query_value (SymbolDBModel *model,
GdaDataModel *data_model,
GdaDataModelIter *iter,
gint column,
@@ -151,7 +151,7 @@ symbol_db_model_global_get_query_value (SymbolDBModel *model,
switch (column)
{
- case SYMBOL_DB_MODEL_GLOBAL_COL_PIXBUF:
+ case SYMBOL_DB_MODEL_PROJECT_COL_PIXBUF:
ret_value = gda_data_model_iter_get_value_for_field (iter,
"type_type");
if (ret_value && G_VALUE_HOLDS_STRING (ret_value))
@@ -166,29 +166,29 @@ symbol_db_model_global_get_query_value (SymbolDBModel *model,
return TRUE;
break;
default:
- return SYMBOL_DB_MODEL_CLASS (symbol_db_model_global_parent_class)->
+ return SYMBOL_DB_MODEL_CLASS (symbol_db_model_project_parent_class)->
get_query_value (model, data_model, iter, column, value);
}
}
static void
-on_symbol_db_global_dbe_unref (SymbolDBModelGlobal *model)
+on_symbol_db_project_dbe_unref (SymbolDBModelProject *model)
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
- g_return_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (model));
+ g_return_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (model));
priv = GET_PRIV (model);
priv->dbe = NULL;
/* FIXME: Reset model */
}
static void
-symbol_db_model_global_set_property (GObject *object, guint prop_id,
+symbol_db_model_project_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec)
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
- g_return_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (object));
+ g_return_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (object));
priv = GET_PRIV (object);
switch (prop_id)
@@ -196,11 +196,11 @@ symbol_db_model_global_set_property (GObject *object, guint prop_id,
case PROP_SYMBOL_DB_ENGINE:
if (priv->dbe)
g_object_weak_unref (G_OBJECT (priv->dbe),
- (GWeakNotify)on_symbol_db_global_dbe_unref,
+ (GWeakNotify)on_symbol_db_project_dbe_unref,
object);
priv->dbe = g_value_dup_object (value);
g_object_weak_ref (G_OBJECT (priv->dbe),
- (GWeakNotify)on_symbol_db_global_dbe_unref,
+ (GWeakNotify)on_symbol_db_project_dbe_unref,
object);
/* TODO: Reset model */
break;
@@ -211,12 +211,12 @@ symbol_db_model_global_set_property (GObject *object, guint prop_id,
}
static void
-symbol_db_model_global_get_property (GObject *object, guint prop_id,
+symbol_db_model_project_get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
- g_return_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (object));
+ g_return_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (object));
priv = GET_PRIV (object);
switch (prop_id)
@@ -231,24 +231,24 @@ symbol_db_model_global_get_property (GObject *object, guint prop_id,
}
static void
-symbol_db_model_global_finalize (GObject *object)
+symbol_db_model_project_finalize (GObject *object)
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
- g_return_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (object));
+ g_return_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (object));
priv = GET_PRIV (object);
if (priv->dbe)
g_object_weak_unref (G_OBJECT (priv->dbe),
- (GWeakNotify)on_symbol_db_global_dbe_unref,
+ (GWeakNotify)on_symbol_db_project_dbe_unref,
object);
- G_OBJECT_CLASS (symbol_db_model_global_parent_class)->finalize (object);
+ G_OBJECT_CLASS (symbol_db_model_project_parent_class)->finalize (object);
}
static void
-symbol_db_model_global_init (SymbolDBModelGlobal *object)
+symbol_db_model_project_init (SymbolDBModelProject *object)
{
- SymbolDBModelGlobalPriv *priv;
+ SymbolDBModelProjectPriv *priv;
GType types[] = {
G_TYPE_INT,
@@ -266,7 +266,7 @@ symbol_db_model_global_init (SymbolDBModelGlobal *object)
DATA_COL_SYMBOL_FILE_LINE,
};
- g_return_if_fail (SYMBOL_DB_IS_MODEL_GLOBAL (object));
+ g_return_if_fail (SYMBOL_DB_IS_MODEL_PROJECT (object));
priv = GET_PRIV (object);
priv->dbe = NULL;
@@ -278,20 +278,20 @@ symbol_db_model_global_init (SymbolDBModelGlobal *object)
}
static void
-symbol_db_model_global_class_init (SymbolDBModelGlobalClass *klass)
+symbol_db_model_project_class_init (SymbolDBModelProjectClass *klass)
{
GObjectClass* object_class = G_OBJECT_CLASS (klass);
SymbolDBModelClass* parent_class = SYMBOL_DB_MODEL_CLASS (klass);
- g_type_class_add_private (klass, sizeof (SymbolDBModelGlobalPriv));
+ g_type_class_add_private (klass, sizeof (SymbolDBModelProjectPriv));
- object_class->finalize = symbol_db_model_global_finalize;
- object_class->set_property = symbol_db_model_global_set_property;
- object_class->get_property = symbol_db_model_global_get_property;
+ object_class->finalize = symbol_db_model_project_finalize;
+ object_class->set_property = symbol_db_model_project_set_property;
+ object_class->get_property = symbol_db_model_project_get_property;
- parent_class->get_query_value = symbol_db_model_global_get_query_value;
- parent_class->get_n_children = symbol_db_model_global_get_n_children;
- parent_class->get_children = symbol_db_model_global_get_children;
+ parent_class->get_query_value = symbol_db_model_project_get_query_value;
+ parent_class->get_n_children = symbol_db_model_project_get_n_children;
+ parent_class->get_children = symbol_db_model_project_get_children;
g_object_class_install_property
(object_class, PROP_SYMBOL_DB_ENGINE,
@@ -305,8 +305,8 @@ symbol_db_model_global_class_init (SymbolDBModelGlobalClass *klass)
}
GtkTreeModel*
-symbol_db_model_global_new (SymbolDBEngine* dbe)
+symbol_db_model_project_new (SymbolDBEngine* dbe)
{
- return GTK_TREE_MODEL (g_object_new (SYMBOL_DB_TYPE_MODEL_GLOBAL,
+ return GTK_TREE_MODEL (g_object_new (SYMBOL_DB_TYPE_MODEL_PROJECT,
"symbol-db-engine", dbe, NULL));
}
diff --git a/plugins/symbol-db/symbol-db-model-project.h b/plugins/symbol-db/symbol-db-model-project.h
index 5d69a4b..a16bff5 100644
--- a/plugins/symbol-db/symbol-db-model-project.h
+++ b/plugins/symbol-db/symbol-db-model-project.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
- * symbol-db-model-global.h
+ * symbol-db-model-project.h
* Copyright (C) Naba Kumar 2010 <naba gnome org>
*
* anjuta is free software: you can redistribute it and/or modify it
@@ -17,46 +17,46 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _SYMBOL_DB_MODEL_GLOBAL_H_
-#define _SYMBOL_DB_MODEL_GLOBAL_H_
+#ifndef _SYMBOL_DB_MODEL_PROJECT_H_
+#define _SYMBOL_DB_MODEL_PROJECT_H_
#include <glib-object.h>
#include "symbol-db-model.h"
G_BEGIN_DECLS
-#define SYMBOL_DB_TYPE_MODEL_GLOBAL (symbol_db_model_global_get_type ())
-#define SYMBOL_DB_MODEL_GLOBAL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYMBOL_DB_TYPE_MODEL_GLOBAL, SymbolDBModelGlobal))
-#define SYMBOL_DB_MODEL_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYMBOL_DB_TYPE_MODEL_GLOBAL, SymbolDBModelGlobalClass))
-#define SYMBOL_DB_IS_MODEL_GLOBAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYMBOL_DB_TYPE_MODEL_GLOBAL))
-#define SYMBOL_DB_IS_MODEL_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYMBOL_DB_TYPE_MODEL_GLOBAL))
-#define SYMBOL_DB_MODEL_GLOBAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYMBOL_DB_TYPE_MODEL_GLOBAL, SymbolDBModelGlobalClass))
+#define SYMBOL_DB_TYPE_MODEL_PROJECT (symbol_db_model_project_get_type ())
+#define SYMBOL_DB_MODEL_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYMBOL_DB_TYPE_MODEL_PROJECT, SymbolDBModelProject))
+#define SYMBOL_DB_MODEL_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYMBOL_DB_TYPE_MODEL_PROJECT, SymbolDBModelProjectClass))
+#define SYMBOL_DB_IS_MODEL_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYMBOL_DB_TYPE_MODEL_PROJECT))
+#define SYMBOL_DB_IS_MODEL_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYMBOL_DB_TYPE_MODEL_PROJECT))
+#define SYMBOL_DB_MODEL_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYMBOL_DB_TYPE_MODEL_PROJECT, SymbolDBModelProjectClass))
-typedef struct _SymbolDBModelGlobalClass SymbolDBModelGlobalClass;
-typedef struct _SymbolDBModelGlobal SymbolDBModelGlobal;
+typedef struct _SymbolDBModelProjectClass SymbolDBModelProjectClass;
+typedef struct _SymbolDBModelProject SymbolDBModelProject;
enum {
- SYMBOL_DB_MODEL_GLOBAL_COL_SYMBOL_ID,
- SYMBOL_DB_MODEL_GLOBAL_COL_PIXBUF,
- SYMBOL_DB_MODEL_GLOBAL_COL_LABEL,
- SYMBOL_DB_MODEL_GLOBAL_COL_FILE,
- SYMBOL_DB_MODEL_GLOBAL_COL_LINE,
- SYMBOL_DB_MODEL_GLOBAL_COL_N_COLS
+ SYMBOL_DB_MODEL_PROJECT_COL_SYMBOL_ID,
+ SYMBOL_DB_MODEL_PROJECT_COL_PIXBUF,
+ SYMBOL_DB_MODEL_PROJECT_COL_LABEL,
+ SYMBOL_DB_MODEL_PROJECT_COL_FILE,
+ SYMBOL_DB_MODEL_PROJECT_COL_LINE,
+ SYMBOL_DB_MODEL_PROJECT_COL_N_COLS
};
-struct _SymbolDBModelGlobalClass
+struct _SymbolDBModelProjectClass
{
SymbolDBModelClass parent_class;
};
-struct _SymbolDBModelGlobal
+struct _SymbolDBModelProject
{
SymbolDBModel parent_instance;
};
-GType symbol_db_model_global_get_type (void) G_GNUC_CONST;
-GtkTreeModel* symbol_db_model_global_new (SymbolDBEngine* dbe);
+GType symbol_db_model_project_get_type (void) G_GNUC_CONST;
+GtkTreeModel* symbol_db_model_project_new (SymbolDBEngine* dbe);
G_END_DECLS
-#endif /* _SYMBOL_DB_MODEL_GLOBAL_H_ */
+#endif /* _SYMBOL_DB_MODEL_PROJECT_H_ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]