[dia] Make the new Diagram Tree compile with gcc
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Subject: [dia] Make the new Diagram Tree compile with gcc
- Date: Sun, 31 May 2009 06:03:26 -0400 (EDT)
commit 34c4426c024f531feb282c5a1627b468631de19a
Author: Hans Breuer <hans breuer org>
Date: Sun May 31 12:03:58 2009 +0200
Make the new Diagram Tree compile with gcc
---
app/diagram_tree_model.c | 9 +++++++++
app/diagram_tree_view.c | 3 ++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/app/diagram_tree_model.c b/app/diagram_tree_model.c
index c47c61d..235a142 100644
--- a/app/diagram_tree_model.c
+++ b/app/diagram_tree_model.c
@@ -32,9 +32,17 @@
#include "diagram_tree_model.h"
/* accessing iter fileds by name by */
+#ifdef _MSC_VER
+/* GCC does not like the pattern */
+/* error: lvalue required as left operand of assignment */
#define NODE_DIAGRAM(it) ((DiagramData*)(it->user_data))
#define NODE_LAYER(it) ((Layer*)(it->user_data2))
#define NODE_OBJECT(it) ((DiaObject*)(it->user_data3))
+#else
+#define NODE_DIAGRAM(it) (it->user_data)
+#define NODE_LAYER(it) (it->user_data2)
+#define NODE_OBJECT(it) (it->user_data3)
+#endif
typedef struct _DiagramTreeModelClass
{
GObjectClass parent_class;
@@ -45,6 +53,7 @@ typedef struct _DiagramTreeModel
/* no need to store anything */
} DiagramTreeModel;
+static GType _dtm_get_type (void);
static void _dtm_finalize (GObject *object);
static void
diff --git a/app/diagram_tree_view.c b/app/diagram_tree_view.c
index 597fb38..0fcc7df 100644
--- a/app/diagram_tree_view.c
+++ b/app/diagram_tree_view.c
@@ -54,6 +54,7 @@ struct _DiagramTreeViewClass {
#define DIAGRAM_TREE_VIEW_TYPE (_dtv_get_type ())
#define DIAGRAM_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIAGRAM_TREE_VIEW_TYPE, DiagramTreeView))
+static GType _dtv_get_type (void);
#if 0
//future
G_DEFINE_TYPE_WITH_CODE (DiagramTreeView, _dtv, GTK_TYPE_TREE_VIEW,
@@ -217,7 +218,7 @@ _dtv_row_activated (GtkTreeView *view,
if (gtk_tree_model_get_iter (model, &iter, path)) {
gtk_tree_model_get (model, &iter, OBJECT_COLUMN, &object, -1);
- //g_signal_emit (view, signals[REVISION_ACTIVATED], 0, object);
+ /* FIXME: g_signal_emit (view, signals[REVISION_ACTIVATED], 0, object); */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]