[libgda] GdaBrowser: resolved class name conflict



commit 035e60350a479a1c9972626d78dbec64e9b54f0a
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Sep 14 21:43:03 2009 +0200

    GdaBrowser: resolved class name conflict
    
    As the popup-container.[ch] files are compiled both in
    Libgdaui and in the gda-browser executable, instantiating them
    in both places resulted in a class name conflict

 libgda-ui/internal/popup-container.c |    7 ++++++-
 tools/browser/common/Makefile.am     |    1 +
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgda-ui/internal/popup-container.c b/libgda-ui/internal/popup-container.c
index 8726d09..c072512 100644
--- a/libgda-ui/internal/popup-container.c
+++ b/libgda-ui/internal/popup-container.c
@@ -243,8 +243,13 @@ popup_container_get_type (void)
 			0,
 			(GInstanceInitFunc) popup_container_init
 		};
-		type = g_type_register_static (GTK_TYPE_WINDOW, "PopupContainer",
+#ifdef PRIV_OBJ_PREFIX
+		type = g_type_register_static (GTK_TYPE_WINDOW, PRIV_OBJ_PREFIX "GdauiPopupContainer",
 					       &info, 0);
+#else
+		type = g_type_register_static (GTK_TYPE_WINDOW, "GdauiPopupContainer",
+					       &info, 0);
+#endif
 	}
 	return type;
 }
diff --git a/tools/browser/common/Makefile.am b/tools/browser/common/Makefile.am
index d9a39a2..07fae25 100644
--- a/tools/browser/common/Makefile.am
+++ b/tools/browser/common/Makefile.am
@@ -4,6 +4,7 @@ AM_CPPFLAGS = \
 	-I$(top_builddir) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/libgda \
+	-DPRIV_OBJ_PREFIX="\"BROWSER\"" \
 	$(LIBGDA_CFLAGS) \
 	$(GTK_CFLAGS)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]