[gdl] Fix build with GDL_DISABLE_DEPRECATED defined
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdl] Fix build with GDL_DISABLE_DEPRECATED defined
- Date: Wed, 21 Nov 2012 20:43:01 +0000 (UTC)
commit 33ac6b024a7b5ea7ecb27458f9d261e29dfd74e0
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Wed Nov 21 21:33:00 2012 +0100
Fix build with GDL_DISABLE_DEPRECATED defined
gdl/Makefile.am | 4 +++-
gdl/deprecated/gdl-dock-tablabel.c | 5 +----
gdl/gdl-deprecated.c | 6 ++----
gdl/gdl-dock-placeholder.c | 6 ++----
gdl/test-dock.c | 2 ++
5 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/gdl/Makefile.am b/gdl/Makefile.am
index 1f4d386..5821f1c 100644
--- a/gdl/Makefile.am
+++ b/gdl/Makefile.am
@@ -91,6 +91,7 @@ EXTRA_DIST = libgdlmarshal.list \
libgdltypebuiltins.c: $(libgdl_headers)
@GLIB_MKENUMS@ \
--fhead "#include <glib-object.h>\n" \
+ --fhead "#undef GDL_DISABLE_DEPRECATED\n\n" \
--fhead "#include \"libgdltypebuiltins.h\"\n\n" \
--fprod "\n/* enumerations from \"@filename \" */" \
--vhead "static const G Type@Value _ enum_name@_values[] = {" \
@@ -143,7 +144,8 @@ introspection_sources = $(libgdl_3_la_SOURCES)
Gdl-3.gir: libgdl-3.la
Gdl_3_gir_INCLUDES = GObject-2.0 Gtk-3.0
-Gdl_3_gir_CFLAGS = $(INCLUDES)
+Gdl_3_gir_CFLAGS = $(INCLUDES) \
+ -UGDL_DISABLE_DEPRECATED
Gdl_3_gir_LIBS = libgdl-3.la
Gdl_3_gir_FILES = $(introspection_sources)
Gdl_3_gir_EXPORT_PACKAGES = gdl-3.0
diff --git a/gdl/deprecated/gdl-dock-tablabel.c b/gdl/deprecated/gdl-dock-tablabel.c
index 5137f48..54369b7 100644
--- a/gdl/deprecated/gdl-dock-tablabel.c
+++ b/gdl/deprecated/gdl-dock-tablabel.c
@@ -25,8 +25,7 @@
#include <config.h>
#endif
-#ifndef GDL_DISABLE_DEPRECATED
-#define GDL_DISABLE_DEPRECATION_WARNINGS
+#undef GDL_DISABLE_DEPRECATED
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
@@ -700,5 +699,3 @@ gdl_dock_tablabel_deactivate (GdlDockTablabel *tablabel)
/* yeah, i know it contradictive */
gtk_widget_set_state (GTK_WIDGET (tablabel), GTK_STATE_ACTIVE);
}
-
-#endif
diff --git a/gdl/gdl-deprecated.c b/gdl/gdl-deprecated.c
index d21eeb0..409c048 100644
--- a/gdl/gdl-deprecated.c
+++ b/gdl/gdl-deprecated.c
@@ -23,9 +23,9 @@
#include <config.h>
#endif
-#include "gdl.h"
+#undef GDL_DISABLE_DEPRECATED
-#ifndef GDL_DISABLE_DEPRECATED
+#include "gdl.h"
/**
* gdl_dock_bar_get_orientation:
@@ -142,5 +142,3 @@ gdl_dock_layout_attach (GdlDockLayout *layout,
gdl_dock_layout_set_master (layout, G_OBJECT (master));
}
-
-#endif
diff --git a/gdl/gdl-dock-placeholder.c b/gdl/gdl-dock-placeholder.c
index 37a9090..6b772ab 100644
--- a/gdl/gdl-dock-placeholder.c
+++ b/gdl/gdl-dock-placeholder.c
@@ -25,11 +25,11 @@
#include <config.h>
#endif
-#ifndef GDL_DISABLE_DEPRECATED
-#define GDL_DISABLE_DEPRECATION_WARNINGS
#include <glib/gi18n-lib.h>
+#undef GDL_DISABLE_DEPRECATED
+
#include "gdl-dock-placeholder.h"
#include "gdl-dock-item.h"
#include "gdl-dock-paned.h"
@@ -866,5 +866,3 @@ gdl_dock_placeholder_attach (GdlDockPlaceholder *ph,
gdl_dock_object_thaw (GDL_DOCK_OBJECT (ph));
}
-
-#endif
diff --git a/gdl/test-dock.c b/gdl/test-dock.c
index 24540d5..9398f68 100644
--- a/gdl/test-dock.c
+++ b/gdl/test-dock.c
@@ -290,10 +290,12 @@ main (int argc, char **argv)
gtk_widget_show_all (win);
+#ifndef GDL_DISABLE_DEPRECATED
gdl_dock_placeholder_new ("ph1", GDL_DOCK_OBJECT (dock), GDL_DOCK_TOP, FALSE);
gdl_dock_placeholder_new ("ph2", GDL_DOCK_OBJECT (dock), GDL_DOCK_BOTTOM, FALSE);
gdl_dock_placeholder_new ("ph3", GDL_DOCK_OBJECT (dock), GDL_DOCK_LEFT, FALSE);
gdl_dock_placeholder_new ("ph4", GDL_DOCK_OBJECT (dock), GDL_DOCK_RIGHT, FALSE);
+#endif
gtk_main ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]