[gimp] Remove all calls to g_type_init(), it's deprecated



commit 66ff5dd70b6b6611bd9468838c3ae7c76559324c
Author: Michael Natterer <mitch gimp org>
Date:   Sat May 25 22:44:20 2013 +0200

    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 a8e3169..96c08bb 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 940c826..4f06e96 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 6b6ba2e..48b44a2 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 575a4d3..86113c6 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 8d1ea04..1344fde 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 3e68cbb..a6d3582 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 5205780..40840f6 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 7096899..d846179 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 ce65eca..0489f25 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 9a64771..c87a1e2 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 0bfbafb..7844bf0 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 cf37a83..a7c6b09 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 241b94a..e688510 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--)


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