[libsecret] Fix for glib deprecations



commit 24cc1e118f34c8d90e05e9a6a9762de5c0415328
Author: Stef Walter <stefw gnome org>
Date:   Mon Oct 22 20:50:48 2012 +0200

    Fix for glib deprecations
    
     * g_type_init() was deprecated in glib 2.35.0

 docs/reference/libsecret/Makefile.am |    4 +++-
 libsecret/tests/test-attributes.c    |    2 ++
 libsecret/tests/test-collection.c    |    2 ++
 libsecret/tests/test-item.c          |    2 ++
 libsecret/tests/test-methods.c       |    2 ++
 libsecret/tests/test-password.c      |    2 ++
 libsecret/tests/test-paths.c         |    2 ++
 libsecret/tests/test-prompt.c        |    2 ++
 libsecret/tests/test-service.c       |    2 ++
 libsecret/tests/test-session.c       |    2 ++
 libsecret/tests/test-value.c         |    3 +++
 tool/secret-tool.c                   |    2 ++
 12 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/libsecret/Makefile.am b/docs/reference/libsecret/Makefile.am
index 917ab98..137be73 100644
--- a/docs/reference/libsecret/Makefile.am
+++ b/docs/reference/libsecret/Makefile.am
@@ -85,7 +85,9 @@ expand_content_files = \
 # signals and properties.
 # e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
 # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS= -I$(top_srcdir) -I$(top_builddir) $(GLIB_CFLAGS) -Wno-error
+GTKDOC_CFLAGS= -I$(top_srcdir) -I$(top_builddir) $(GLIB_CFLAGS) -Wno-error \
+	-Wno-deprecated-declarations
+
 GTKDOC_LIBS= $(GLIB_LIBS) $(GOBJECT_LIBS) \
 	$(top_builddir)/libsecret/libsecret- SECRET_MAJOR@.la
 
diff --git a/libsecret/tests/test-attributes.c b/libsecret/tests/test-attributes.c
index eaf18f2..0d66932 100644
--- a/libsecret/tests/test-attributes.c
+++ b/libsecret/tests/test-attributes.c
@@ -128,7 +128,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-attributes");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add_func ("/attributes/build", test_build);
 	g_test_add_func ("/attributes/build-unknown", test_build_unknown);
diff --git a/libsecret/tests/test-collection.c b/libsecret/tests/test-collection.c
index 6020dc2..4fdfbc8 100644
--- a/libsecret/tests/test-collection.c
+++ b/libsecret/tests/test-collection.c
@@ -987,7 +987,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-collection");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add ("/collection/new-sync", Test, "mock-service-normal.py", setup, test_new_sync, teardown);
 	g_test_add ("/collection/new-async", Test, "mock-service-normal.py", setup, test_new_async, teardown);
diff --git a/libsecret/tests/test-item.c b/libsecret/tests/test-item.c
index a99a9b5..0e5e3e5 100644
--- a/libsecret/tests/test-item.c
+++ b/libsecret/tests/test-item.c
@@ -840,7 +840,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-item");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add ("/item/new-sync", Test, "mock-service-normal.py", setup, test_new_sync, teardown);
 	g_test_add ("/item/new-async", Test, "mock-service-normal.py", setup, test_new_async, teardown);
diff --git a/libsecret/tests/test-methods.c b/libsecret/tests/test-methods.c
index 410a578..ecaf6f5 100644
--- a/libsecret/tests/test-methods.c
+++ b/libsecret/tests/test-methods.c
@@ -909,7 +909,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-service");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add ("/service/search-sync", Test, "mock-service-normal.py", setup, test_search_sync, teardown);
 	g_test_add ("/service/search-async", Test, "mock-service-normal.py", setup, test_search_async, teardown);
diff --git a/libsecret/tests/test-password.c b/libsecret/tests/test-password.c
index 7968f69..65323a6 100644
--- a/libsecret/tests/test-password.c
+++ b/libsecret/tests/test-password.c
@@ -310,7 +310,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-password");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add ("/password/lookup-sync", Test, "mock-service-normal.py", setup, test_lookup_sync, teardown);
 	g_test_add ("/password/lookup-async", Test, "mock-service-normal.py", setup, test_lookup_async, teardown);
diff --git a/libsecret/tests/test-paths.c b/libsecret/tests/test-paths.c
index 6173ed6..7602915 100644
--- a/libsecret/tests/test-paths.c
+++ b/libsecret/tests/test-paths.c
@@ -714,7 +714,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-service");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add ("/service/search-for-paths", Test, "mock-service-normal.py", setup, test_search_paths_sync, teardown);
 	g_test_add ("/service/search-for-paths-async", Test, "mock-service-normal.py", setup, test_search_paths_async, teardown);
diff --git a/libsecret/tests/test-prompt.c b/libsecret/tests/test-prompt.c
index 7cd063e..b4b72c7 100644
--- a/libsecret/tests/test-prompt.c
+++ b/libsecret/tests/test-prompt.c
@@ -390,7 +390,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-prompt");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	/* Suppress these messages in tests */
 	g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG,
diff --git a/libsecret/tests/test-service.c b/libsecret/tests/test-service.c
index 87fa272..0680046 100644
--- a/libsecret/tests/test-service.c
+++ b/libsecret/tests/test-service.c
@@ -563,7 +563,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-service");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add_func ("/service/get-sync", test_get_sync);
 	g_test_add_func ("/service/get-async", test_get_async);
diff --git a/libsecret/tests/test-session.c b/libsecret/tests/test-session.c
index 778470e..4a52190 100644
--- a/libsecret/tests/test-session.c
+++ b/libsecret/tests/test-session.c
@@ -218,7 +218,9 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-session");
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add ("/session/ensure-aes", Test, "mock-service-normal.py", setup, test_ensure, teardown);
 	g_test_add ("/session/ensure-twice", Test, "mock-service-normal.py", setup, test_ensure_twice, teardown);
diff --git a/libsecret/tests/test-value.c b/libsecret/tests/test-value.c
index ac80c84..ceb2448 100644
--- a/libsecret/tests/test-value.c
+++ b/libsecret/tests/test-value.c
@@ -193,7 +193,10 @@ main (int argc, char **argv)
 {
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-value");
+
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	g_test_add_func ("/value/new", test_new);
 	g_test_add_func ("/value/new-terminated", test_new_terminated);
diff --git a/tool/secret-tool.c b/tool/secret-tool.c
index 533647f..9f88ef5 100644
--- a/tool/secret-tool.c
+++ b/tool/secret-tool.c
@@ -345,7 +345,9 @@ main (int argc,
 	textdomain (GETTEXT_PACKAGE);
 #endif
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	if (argc < 2)
 		usage();



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