Skip to content

Commit

Permalink
UNITY: Call g_type_init only with GLib < 2.36
Browse files Browse the repository at this point in the history
With GLib >= 2.36 g_type_init() is deprecated and only throws an ugly
warning
  • Loading branch information
tobiatesan committed Oct 5, 2014
1 parent 2f4f7d4 commit fee66db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backends/taskbar/unity/unity-taskbar.cpp
Expand Up @@ -33,7 +33,13 @@
#include <unity.h>

UnityTaskbarManager::UnityTaskbarManager() {
#if GLIB_CHECK_VERSION(2, 36, 0) == FALSE
/*
* Glib version is < 2.36.0, it still needs g_type_init(),
* deprecated in later versions
*/
g_type_init();
#endif

_loop = g_main_loop_new(NULL, FALSE);

Expand Down

0 comments on commit fee66db

Please sign in to comment.