From 66ff5dd70b6b6611bd9468838c3ae7c76559324c Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 25 May 2013 22:44:20 +0200 Subject: [PATCH] Remove all calls to g_type_init(), it's deprecated The type system is initialized automatically now. --- app/app.c | 2 -- app/config/test-config.c | 2 -- app/tests.c | 2 -- app/tests/test-core.c | 1 - app/tests/test-gimpidtable.c | 5 ++--- app/tests/test-xcf.c | 1 - libgimp/gimp.c | 1 - libgimpthumb/gimp-thumbnail-list.c | 2 -- plug-ins/common/file-svg.c | 3 --- plug-ins/common/web-page.c | 3 --- plug-ins/help/gimp-help-lookup.c | 2 -- plug-ins/metadata/metadata.c | 1 - plug-ins/metadata/xmpdump.c | 2 +- 13 files changed, 3 insertions(+), 24 deletions(-) diff --git a/app/app.c b/app/app.c index a8e31691ad..96c08bb853 100644 --- a/app/app.c +++ b/app/app.c @@ -83,8 +83,6 @@ void app_libs_init (GOptionContext *context, gboolean no_interface) { - g_type_init (); - g_option_context_add_group (context, gegl_get_option_group ()); #ifndef GIMP_CONSOLE_COMPILATION diff --git a/app/config/test-config.c b/app/config/test-config.c index 940c826ea3..4f06e96db5 100644 --- a/app/config/test-config.c +++ b/app/config/test-config.c @@ -69,8 +69,6 @@ main (int argc, } } - g_type_init (); - units_init (); g_print ("\nTesting GimpConfig ...\n"); diff --git a/app/tests.c b/app/tests.c index 6b6ba2ee7e..48b44a294e 100644 --- a/app/tests.c +++ b/app/tests.c @@ -62,7 +62,6 @@ gimp_init_for_testing (void) { Gimp *gimp; - g_type_init(); gimp_log_init (); gegl_init (NULL, NULL); @@ -91,7 +90,6 @@ gimp_init_for_gui_testing_internal (gboolean show_gui, Gimp *gimp; /* from main() */ - g_type_init(); gimp_log_init (); gegl_init (NULL, NULL); diff --git a/app/tests/test-core.c b/app/tests/test-core.c index 575a4d3233..86113c6509 100644 --- a/app/tests/test-core.c +++ b/app/tests/test-core.c @@ -264,7 +264,6 @@ main (int argc, Gimp *gimp; int result; - g_type_init (); g_test_init (&argc, &argv, NULL); gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR", diff --git a/app/tests/test-gimpidtable.c b/app/tests/test-gimpidtable.c index 8d1ea04ec8..1344fde07f 100644 --- a/app/tests/test-gimpidtable.c +++ b/app/tests/test-gimpidtable.c @@ -185,7 +185,7 @@ remove (GimpTestFixture *f, void *ret_data = gimp_id_table_lookup (f->id_table, ret_id); gboolean remove_successful = gimp_id_table_remove (f->id_table, ret_id); void *ret_data2 = gimp_id_table_lookup (f->id_table, ret_id); - + g_assert (remove_successful); g_assert (ret_data == data1); g_assert (ret_data2 == NULL); @@ -205,14 +205,13 @@ remove_non_existing (GimpTestFixture *f, gboolean remove_successful = gimp_id_table_remove (f->id_table, id); void *ret_data = gimp_id_table_lookup (f->id_table, id); - + g_assert (! remove_successful); g_assert (ret_data == NULL); } int main(int argc, char **argv) { - g_type_init (); g_test_init (&argc, &argv, NULL); ADD_TEST (insert_and_lookup); diff --git a/app/tests/test-xcf.c b/app/tests/test-xcf.c index 3e68cbb673..a6d3582f9d 100644 --- a/app/tests/test-xcf.c +++ b/app/tests/test-xcf.c @@ -971,7 +971,6 @@ main (int argc, Gimp *gimp; int result; - g_type_init (); g_test_init (&argc, &argv, NULL); gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR", diff --git a/libgimp/gimp.c b/libgimp/gimp.c index 520578084f..40840f6f74 100644 --- a/libgimp/gimp.c +++ b/libgimp/gimp.c @@ -418,7 +418,6 @@ gimp_main (const GimpPlugInInfo *info, gimp_wire_set_writer (gimp_write); gimp_wire_set_flusher (gimp_flush); - g_type_init (); gimp_enums_init (); /* initialize units */ diff --git a/libgimpthumb/gimp-thumbnail-list.c b/libgimpthumb/gimp-thumbnail-list.c index 7096899352..d846179bce 100644 --- a/libgimpthumb/gimp-thumbnail-list.c +++ b/libgimpthumb/gimp-thumbnail-list.c @@ -63,8 +63,6 @@ main (gint argc, const gchar *folder; GError *error = NULL; - g_type_init (); - context = g_option_context_new (NULL); g_option_context_add_main_entries (context, main_entries, NULL); diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c index ce65ecabd8..0489f25881 100644 --- a/plug-ins/common/file-svg.c +++ b/plug-ins/common/file-svg.c @@ -186,9 +186,6 @@ run (const gchar *name, values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; - /* MUST call this before any RSVG funcs */ - g_type_init (); - if (strcmp (name, LOAD_PROC) == 0) { gimp_get_data (LOAD_PROC, &load_vals); diff --git a/plug-ins/common/web-page.c b/plug-ins/common/web-page.c index 9a64771350..c87a1e2c6e 100644 --- a/plug-ins/common/web-page.c +++ b/plug-ins/common/web-page.c @@ -131,9 +131,6 @@ run (const gchar *name, *return_vals = values; values[0].type = GIMP_PDB_STATUS; - /* MUST call this before any RSVG funcs */ - g_type_init (); - gimp_get_data (PLUG_IN_PROC, &save); webpagevals.url = g_strdup (save.url); diff --git a/plug-ins/help/gimp-help-lookup.c b/plug-ins/help/gimp-help-lookup.c index 0bfbafb870..7844bf0d6f 100644 --- a/plug-ins/help/gimp-help-lookup.c +++ b/plug-ins/help/gimp-help-lookup.c @@ -100,8 +100,6 @@ main (gint argc, return EXIT_FAILURE; } - g_type_init (); - if (help_base) uri = g_strdup (help_base); else diff --git a/plug-ins/metadata/metadata.c b/plug-ins/metadata/metadata.c index cf37a835cd..a7c6b09abe 100644 --- a/plug-ins/metadata/metadata.c +++ b/plug-ins/metadata/metadata.c @@ -375,7 +375,6 @@ run (const gchar *name, values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; INIT_I18N(); - g_type_init(); if (! strcmp (name, EDITOR_PROC)) image_ID = param[1].data.d_image; diff --git a/plug-ins/metadata/xmpdump.c b/plug-ins/metadata/xmpdump.c index 241b94a05e..e68851015d 100644 --- a/plug-ins/metadata/xmpdump.c +++ b/plug-ins/metadata/xmpdump.c @@ -173,7 +173,7 @@ main (int argc, char *argv[]) { g_set_prgname ("xmpdump"); - g_type_init(); + if (argc > 1) { for (argv++, argc--; argc; argv++, argc--)