[glade] Fixed C++ compiler errors when including glade.h



commit c4c6f4408540d0ae251c6c0d776ea4df6a086c71
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Tue Jun 14 15:50:18 2011 -0300

    Fixed C++ compiler errors when including glade.h

 ChangeLog                      |    7 +++++++
 gladeui/glade-project.h        |   10 ++++------
 gladeui/glade-property-class.c |    4 ++--
 gladeui/glade-property-class.h |    2 +-
 4 files changed, 14 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 59806ea..0cbfccf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-14  Juan Pablo Ugarte <juanpablougarte gmail com>
+
+	* gladeui/glade-project.h:
+	  glade_property_class_set_virtual() renamed virtual paramenter to value to prevent C++ clash
+
+	* gladeui/glade-property-class.[ch]: fixed _GladePointerMode and _GladeSupportMask enum declaration C++ error
+
 2011-05-20  Juan Pablo Ugarte <juanpablougarte gmail com>
 
 	* gladeui/glade-base-editor.c,
diff --git a/gladeui/glade-project.h b/gladeui/glade-project.h
index 1b9eb83..ab589b0 100644
--- a/gladeui/glade-project.h
+++ b/gladeui/glade-project.h
@@ -19,8 +19,6 @@ G_BEGIN_DECLS
 
 typedef struct _GladeProjectPrivate  GladeProjectPrivate;
 typedef struct _GladeProjectClass    GladeProjectClass;
-typedef enum   _GladePointerMode     GladePointerMode;
-typedef enum   _GladeSupportMask     GladeSupportMask;
 
 /**
  * GladePointerMode:
@@ -31,19 +29,19 @@ typedef enum   _GladeSupportMask     GladeSupportMask;
  *
  * Indicates what the pointer is used for in the workspace.
  */
-enum _GladePointerMode
+typedef enum
 {
   GLADE_POINTER_SELECT = 0,
   GLADE_POINTER_ADD_WIDGET,
   GLADE_POINTER_DRAG_RESIZE
-};
+} GladePointerMode;
 
-enum _GladeSupportMask
+typedef enum
 {
   GLADE_SUPPORT_OK                   = 0,
   GLADE_SUPPORT_DEPRECATED           = (0x01 << 0),
   GLADE_SUPPORT_MISMATCH             = (0x01 << 1)
-};
+} GladeSupportMask;
 
 /**
  * GladeProjectModelColumns:
diff --git a/gladeui/glade-property-class.c b/gladeui/glade-property-class.c
index 9146e65..27ccf6f 100644
--- a/gladeui/glade-property-class.c
+++ b/gladeui/glade-property-class.c
@@ -1224,11 +1224,11 @@ glade_property_class_save_always (GladePropertyClass  *property_class)
 
 void
 glade_property_class_set_virtual (GladePropertyClass  *property_class,
-				  gboolean             virtual)
+				  gboolean             value)
 {
   g_return_if_fail (GLADE_IS_PROPERTY_CLASS (property_class));
 
-  property_class->virt = virtual;
+  property_class->virt = value;
 }
 
 gboolean
diff --git a/gladeui/glade-property-class.h b/gladeui/glade-property-class.h
index 45fe081..66d9b7d 100644
--- a/gladeui/glade-property-class.h
+++ b/gladeui/glade-property-class.h
@@ -80,7 +80,7 @@ gboolean              glade_property_class_save_always             (GladePropert
 gboolean              glade_property_class_is_visible              (GladePropertyClass  *property_class);
 gboolean              glade_property_class_is_object               (GladePropertyClass  *property_class);
 void                  glade_property_class_set_virtual             (GladePropertyClass  *property_class,
-								    gboolean             virtual);
+								    gboolean             value);
 gboolean              glade_property_class_get_virtual             (GladePropertyClass  *property_class);
 void                  glade_property_class_set_ignore              (GladePropertyClass  *property_class,
 								    gboolean             ignore);



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