Conditionall call g_type_init() after a version check
There's no need to call g_type_init() since GLib 2.36, so let's hide it when building against newer versions of GLib.
This commit is contained in:
parent
46e8b1cfad
commit
43aac613f1
|
@ -153,7 +153,9 @@ notify_init (const char *app_name)
|
||||||
|
|
||||||
notify_set_app_name (app_name);
|
notify_set_app_name (app_name);
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 36, 0)
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
#endif
|
||||||
|
|
||||||
_initted = TRUE;
|
_initted = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,9 @@ main ()
|
||||||
{
|
{
|
||||||
NotifyNotification *n;
|
NotifyNotification *n;
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 36, 0)
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
#endif
|
||||||
|
|
||||||
notify_init ("Error Handling");
|
notify_init ("Error Handling");
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,9 @@ main ()
|
||||||
GError *error;
|
GError *error;
|
||||||
error = NULL;
|
error = NULL;
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 36, 0)
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
#endif
|
||||||
|
|
||||||
notify_init ("Replace Test");
|
notify_init ("Replace Test");
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,9 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 36, 0)
|
||||||
g_type_init ();
|
g_type_init ();
|
||||||
|
#endif
|
||||||
|
|
||||||
g_set_prgname (argv[0]);
|
g_set_prgname (argv[0]);
|
||||||
g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
|
g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL);
|
||||||
|
|
Loading…
Reference in New Issue