[gcr] Update for deprecations



commit ded634e529ea5b627d4eb7a319604e0a70dd5028
Author: Stef Walter <stefw gnome org>
Date:   Mon Oct 22 15:56:23 2012 +0200

    Update for deprecations
    
     * Remove old version checks for new stable dependencies
     * g_type_init() has been deprecated in glib 2.35.0

 egg/egg-testing.c                   |    3 ++-
 gck/tests/test-gck-attributes.c     |    2 ++
 gck/tests/test-gck-crypto.c         |    2 ++
 gck/tests/test-gck-enumerator.c     |    2 ++
 gck/tests/test-gck-module.c         |    2 ++
 gck/tests/test-gck-modules.c        |    2 ++
 gck/tests/test-gck-object.c         |    2 ++
 gck/tests/test-gck-session.c        |    2 ++
 gck/tests/test-gck-slot.c           |    2 ++
 gck/tests/test-gck-uri.c            |    2 ++
 gcr/gcr-prompter-tool.c             |    2 ++
 gcr/gcr-unlock-renderer.c           |    2 --
 gcr/gcr-viewer-tool.c               |    2 ++
 gcr/tests/frob-parser.c             |    2 ++
 gcr/tests/test-certificate-chain.c  |    2 ++
 gcr/tests/test-certificate.c        |    2 ++
 gcr/tests/test-filter-collection.c  |    2 ++
 gcr/tests/test-fingerprint.c        |    2 ++
 gcr/tests/test-gnupg-collection.c   |    2 ++
 gcr/tests/test-gnupg-key.c          |    2 ++
 gcr/tests/test-gnupg-process.c      |    2 ++
 gcr/tests/test-memory-icon.c        |    2 ++
 gcr/tests/test-openpgp.c            |    2 ++
 gcr/tests/test-openssh.c            |    2 ++
 gcr/tests/test-parser.c             |    2 ++
 gcr/tests/test-pkcs11-certificate.c |    2 ++
 gcr/tests/test-record.c             |    2 ++
 gcr/tests/test-secret-exchange.c    |    2 ++
 gcr/tests/test-simple-certificate.c |    2 ++
 gcr/tests/test-subject-public-key.c |    2 ++
 gcr/tests/test-system-prompt.c      |    2 ++
 gcr/tests/test-trust.c              |    2 ++
 gcr/tests/test-util.c               |    2 ++
 33 files changed, 64 insertions(+), 3 deletions(-)
---
diff --git a/egg/egg-testing.c b/egg/egg-testing.c
index 7633267..2f7aada 100644
--- a/egg/egg-testing.c
+++ b/egg/egg-testing.c
@@ -261,7 +261,9 @@ egg_tests_run_with_loop (void)
 	GMainLoop *loop;
 	gpointer ret;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 	loop = g_main_loop_new (NULL, FALSE);
 	wait_condition = g_cond_new ();
@@ -281,7 +283,6 @@ egg_tests_run_with_loop (void)
 
 	return GPOINTER_TO_INT (ret);
 }
-<<<<<<< HEAD
 #endif
 
 
diff --git a/gck/tests/test-gck-attributes.c b/gck/tests/test-gck-attributes.c
index 04ae70e..7be1cb6 100644
--- a/gck/tests/test-gck-attributes.c
+++ b/gck/tests/test-gck-attributes.c
@@ -1276,7 +1276,9 @@ test_find_attributes (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/gck/value/to_boolean", test_value_to_boolean);
diff --git a/gck/tests/test-gck-crypto.c b/gck/tests/test-gck-crypto.c
index d26ccf9..c70a765 100644
--- a/gck/tests/test-gck-crypto.c
+++ b/gck/tests/test-gck-crypto.c
@@ -646,7 +646,9 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_set_prgname ("test-gck-crypto");
diff --git a/gck/tests/test-gck-enumerator.c b/gck/tests/test-gck-enumerator.c
index 2d5df63..bbbea5f 100644
--- a/gck/tests/test-gck-enumerator.c
+++ b/gck/tests/test-gck-enumerator.c
@@ -601,7 +601,9 @@ test_chained (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_set_prgname ("test-gck-enumerator");
diff --git a/gck/tests/test-gck-module.c b/gck/tests/test-gck-module.c
index 2a1d3a1..99d2d61 100644
--- a/gck/tests/test-gck-module.c
+++ b/gck/tests/test-gck-module.c
@@ -164,7 +164,9 @@ test_module_info (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/gck/module/initialize_async", test_initialize_async);
diff --git a/gck/tests/test-gck-modules.c b/gck/tests/test-gck-modules.c
index e212d1c..80cdb95 100644
--- a/gck/tests/test-gck-modules.c
+++ b/gck/tests/test-gck-modules.c
@@ -191,7 +191,9 @@ test_enumerate_uri (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gck/modules/enumerate_objects", Test, NULL, setup, test_enumerate_objects, teardown);
diff --git a/gck/tests/test-gck-object.c b/gck/tests/test-gck-object.c
index e0cdfd3..9cd316d 100644
--- a/gck/tests/test-gck-object.c
+++ b/gck/tests/test-gck-object.c
@@ -398,7 +398,9 @@ test_find_objects (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gck/object/object_props", Test, NULL, setup, test_object_props, teardown);
diff --git a/gck/tests/test-gck-session.c b/gck/tests/test-gck-session.c
index 438a361..f23a832 100644
--- a/gck/tests/test-gck-session.c
+++ b/gck/tests/test-gck-session.c
@@ -497,7 +497,9 @@ test_auto_login (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_set_prgname ("test-gck-session");
diff --git a/gck/tests/test-gck-slot.c b/gck/tests/test-gck-slot.c
index 3048026..a8f66db 100644
--- a/gck/tests/test-gck-slot.c
+++ b/gck/tests/test-gck-slot.c
@@ -242,7 +242,9 @@ test_token_info_match_different (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gck/slot/slot_info", Test, NULL, setup, test_slot_info, teardown);
diff --git a/gck/tests/test-gck-uri.c b/gck/tests/test-gck-uri.c
index 8c733d3..db44442 100644
--- a/gck/tests/test-gck-uri.c
+++ b/gck/tests/test-gck-uri.c
@@ -525,7 +525,9 @@ null_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	/* Suppress these messages in tests */
diff --git a/gcr/gcr-prompter-tool.c b/gcr/gcr-prompter-tool.c
index e888b41..093aec4 100644
--- a/gcr/gcr-prompter-tool.c
+++ b/gcr/gcr-prompter-tool.c
@@ -210,7 +210,9 @@ main (int argc, char *argv[])
 	guint system_owner_id;
 	guint private_owner_id;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	gtk_init (&argc, &argv);
 
 #ifdef HAVE_LOCALE_H
diff --git a/gcr/gcr-unlock-renderer.c b/gcr/gcr-unlock-renderer.c
index 0038e82..127c448 100644
--- a/gcr/gcr-unlock-renderer.c
+++ b/gcr/gcr-unlock-renderer.c
@@ -121,9 +121,7 @@ _gcr_unlock_renderer_init (GcrUnlockRenderer *self)
 	gtk_box_pack_start (GTK_BOX (box), GTK_WIDGET (self->pv->entry), TRUE, FALSE, 0);
 	gtk_widget_show (GTK_WIDGET (self->pv->entry));
 	g_object_unref (buffer);
-#if GTK_CHECK_VERSION (3,1,1)
 	gtk_entry_set_placeholder_text (self->pv->entry, _("Password"));
-#endif
 
 	button = gtk_button_new_with_label (_("Unlock"));
 	gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
diff --git a/gcr/gcr-viewer-tool.c b/gcr/gcr-viewer-tool.c
index 1ca34f9..ad4368c 100644
--- a/gcr/gcr-viewer-tool.c
+++ b/gcr/gcr-viewer-tool.c
@@ -87,7 +87,9 @@ main (int argc, char *argv[])
 	GError *error = NULL;
 	GtkWindow *window;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 
 #ifdef HAVE_LOCALE_H
 	/* internationalisation */
diff --git a/gcr/tests/frob-parser.c b/gcr/tests/frob-parser.c
index 2ed392a..7061a5f 100644
--- a/gcr/tests/frob-parser.c
+++ b/gcr/tests/frob-parser.c
@@ -79,7 +79,9 @@ main(int argc, char *argv[])
 	const gchar *filename;
 	gchar *path;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_set_prgname ("frob-parser");
 
 	if (argc != 2) {
diff --git a/gcr/tests/test-certificate-chain.c b/gcr/tests/test-certificate-chain.c
index fe49fb8..cbeaeb9 100644
--- a/gcr/tests/test-certificate-chain.c
+++ b/gcr/tests/test-certificate-chain.c
@@ -633,7 +633,9 @@ test_with_anchor_error_async (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-certificate-chain");
 
diff --git a/gcr/tests/test-certificate.c b/gcr/tests/test-certificate.c
index ddab791..a90bd1d 100644
--- a/gcr/tests/test-certificate.c
+++ b/gcr/tests/test-certificate.c
@@ -269,7 +269,9 @@ test_basic_constraints (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-certificate");
 
diff --git a/gcr/tests/test-filter-collection.c b/gcr/tests/test-filter-collection.c
index ac63051..8520bff 100644
--- a/gcr/tests/test-filter-collection.c
+++ b/gcr/tests/test-filter-collection.c
@@ -261,7 +261,9 @@ test_add_remove (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-filter-collection");
 
diff --git a/gcr/tests/test-fingerprint.c b/gcr/tests/test-fingerprint.c
index ba90f54..d817412 100644
--- a/gcr/tests/test-fingerprint.c
+++ b/gcr/tests/test-fingerprint.c
@@ -199,7 +199,9 @@ test_dsa (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gcr/fingerprint/rsa", Test, NULL, setup, test_rsa, teardown);
diff --git a/gcr/tests/test-gnupg-collection.c b/gcr/tests/test-gnupg-collection.c
index 4f6d854..55b518d 100644
--- a/gcr/tests/test-gnupg-collection.c
+++ b/gcr/tests/test-gnupg-collection.c
@@ -210,7 +210,9 @@ test_reload (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-gnupg-collection");
 
diff --git a/gcr/tests/test-gnupg-key.c b/gcr/tests/test-gnupg-key.c
index 8fa1770..c31c264 100644
--- a/gcr/tests/test-gnupg-key.c
+++ b/gcr/tests/test-gnupg-key.c
@@ -211,7 +211,9 @@ test_secret_mismatched_keyid (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gcr/gnupg-key/label", Test, NULL, setup, test_label, teardown);
diff --git a/gcr/tests/test-gnupg-process.c b/gcr/tests/test-gnupg-process.c
index b68cd40..aa18c01 100644
--- a/gcr/tests/test-gnupg-process.c
+++ b/gcr/tests/test-gnupg-process.c
@@ -556,7 +556,9 @@ test_run_and_cancel_later (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-gnupg-process");
 
diff --git a/gcr/tests/test-memory-icon.c b/gcr/tests/test-memory-icon.c
index 2cda798..bbcacae 100644
--- a/gcr/tests/test-memory-icon.c
+++ b/gcr/tests/test-memory-icon.c
@@ -202,7 +202,9 @@ test_load_async (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add ("/gcr/memory-icon/equal_same", Test, NULL, setup, test_equal_same, teardown);
diff --git a/gcr/tests/test-openpgp.c b/gcr/tests/test-openpgp.c
index 0645a08..c221e94 100644
--- a/gcr/tests/test-openpgp.c
+++ b/gcr/tests/test-openpgp.c
@@ -337,7 +337,9 @@ main (int argc, char **argv)
 	guint i;
 	gchar *test_path;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-openpgp");
 
diff --git a/gcr/tests/test-openssh.c b/gcr/tests/test-openssh.c
index 376efe0..6347359 100644
--- a/gcr/tests/test-openssh.c
+++ b/gcr/tests/test-openssh.c
@@ -195,7 +195,9 @@ test_parse_v2_options (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-gnupg-process");
 
diff --git a/gcr/tests/test-parser.c b/gcr/tests/test-parser.c
index 18164a0..8b8b186 100644
--- a/gcr/tests/test-parser.c
+++ b/gcr/tests/test-parser.c
@@ -211,7 +211,9 @@ main (int argc, char **argv)
 	gchar *test;
 	int ret;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-parser");
 
diff --git a/gcr/tests/test-pkcs11-certificate.c b/gcr/tests/test-pkcs11-certificate.c
index d1885ea..16572a8 100644
--- a/gcr/tests/test-pkcs11-certificate.c
+++ b/gcr/tests/test-pkcs11-certificate.c
@@ -269,7 +269,9 @@ test_lookup_certificate_issuer_fail_async (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-pkcs11-certificate");
 
diff --git a/gcr/tests/test-record.c b/gcr/tests/test-record.c
index cfb6593..79c0829 100644
--- a/gcr/tests/test-record.c
+++ b/gcr/tests/test-record.c
@@ -269,7 +269,9 @@ test_boxed (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/gcr/record/parse_colons", test_parse_colons);
diff --git a/gcr/tests/test-secret-exchange.c b/gcr/tests/test-secret-exchange.c
index ea26d15..7c7fd5b 100644
--- a/gcr/tests/test-secret-exchange.c
+++ b/gcr/tests/test-secret-exchange.c
@@ -153,7 +153,9 @@ test_perform_multiple (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-secret-exchange");
 
diff --git a/gcr/tests/test-simple-certificate.c b/gcr/tests/test-simple-certificate.c
index eae162b..3a0344e 100644
--- a/gcr/tests/test-simple-certificate.c
+++ b/gcr/tests/test-simple-certificate.c
@@ -91,7 +91,9 @@ test_new_static (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-simple-certificate");
 
diff --git a/gcr/tests/test-subject-public-key.c b/gcr/tests/test-subject-public-key.c
index 594d3a4..eb06ec2 100644
--- a/gcr/tests/test-subject-public-key.c
+++ b/gcr/tests/test-subject-public-key.c
@@ -681,7 +681,9 @@ main (int argc, char **argv)
 	gint ret;
 	guint i;
 
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	test_names = g_ptr_array_new_with_free_func (g_free);
diff --git a/gcr/tests/test-system-prompt.c b/gcr/tests/test-system-prompt.c
index 944d773..d0450b5 100644
--- a/gcr/tests/test-system-prompt.c
+++ b/gcr/tests/test-system-prompt.c
@@ -547,7 +547,9 @@ test_close_cancels (Test *test,
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-system-prompt");
 
diff --git a/gcr/tests/test-trust.c b/gcr/tests/test-trust.c
index 9f003be..e650e05 100644
--- a/gcr/tests/test-trust.c
+++ b/gcr/tests/test-trust.c
@@ -309,7 +309,9 @@ test_is_certificate_anchored_async (Test *test, gconstpointer unused)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 	g_set_prgname ("test-trust");
 
diff --git a/gcr/tests/test-util.c b/gcr/tests/test-util.c
index 96819ac..3e40e56 100644
--- a/gcr/tests/test-util.c
+++ b/gcr/tests/test-util.c
@@ -101,7 +101,9 @@ test_parse_lines_dos (void)
 int
 main (int argc, char **argv)
 {
+#if !GLIB_CHECK_VERSION(2,35,0)
 	g_type_init ();
+#endif
 	g_test_init (&argc, &argv, NULL);
 
 	g_test_add_func ("/gcr/util/test_parse_lines", test_parse_lines);



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