[gnome-terminal] build: Ifdef g_type_init() call



commit e8a89fb6dfdd8200d296465881efbc869559dcf3
Author: Christian Persch <chpe gnome org>
Date:   Sun Dec 16 23:10:42 2012 +0100

    build: Ifdef g_type_init() call
    
    It's deprecated on glib master, so guard it with a version check.

 src/client.c    |    4 ++--
 src/migration.c |    2 ++
 src/server.c    |    2 ++
 src/terminal.c  |    2 ++
 4 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/client.c b/src/client.c
index 53a49e5..1b91e45 100644
--- a/src/client.c
+++ b/src/client.c
@@ -800,14 +800,14 @@ main (gint argc, gchar *argv[])
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
 
   ret = EXIT_FAILURE;
   completion_cur = NULL;
   completion_prev = NULL;
 
-  g_type_init ();
-
   if (argc < 2)
     {
       usage (&argc, &argv, FALSE);
diff --git a/src/migration.c b/src/migration.c
index 7b4101a..686280a 100644
--- a/src/migration.c
+++ b/src/migration.c
@@ -610,7 +610,9 @@ main (int argc,
 
   setlocale (LC_ALL, "");
 
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
 
   context = g_option_context_new ("");
   g_option_context_add_main_entries (context, options, NULL);
diff --git a/src/server.c b/src/server.c
index baf65ec..f9b302c 100644
--- a/src/server.c
+++ b/src/server.c
@@ -76,7 +76,9 @@ main (int argc, char **argv)
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
 
   _terminal_debug_init ();
 
diff --git a/src/terminal.c b/src/terminal.c
index 36a776d..e48a1bd 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -213,7 +213,9 @@ main (int argc, char **argv)
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
+#if !GLIB_CHECK_VERSION (2, 35, 3)
   g_type_init ();
+#endif
 
   _terminal_debug_init ();
 



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