Closes rhbz#927919
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/applet/applet.c | 5 +----
src/dbus/abrt-dbus.c | 4 +---
src/dbus/abrt-polkit.c | 10 ++++------
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/applet/applet.c b/src/applet/applet.c
index f2d28b6..efb5ad7 100644
--- a/src/applet/applet.c
+++ b/src/applet/applet.c
@@ -1284,10 +1284,7 @@ int main(int argc, char** argv)
gdk_threads_enter();
#endif
-#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 35)
- /* Initialize GType system */
- g_type_init();
-#endif
+ glib_init();
/* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager'
interface */
GError *error = NULL;
diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
index 968890e..72d0260 100644
--- a/src/dbus/abrt-dbus.c
+++ b/src/dbus/abrt-dbus.c
@@ -804,9 +804,7 @@ int main(int argc, char *argv[])
if (getuid() != 0)
error_msg_and_die(_("This program must be run as root."));
-#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 35)
- g_type_init();
-#endif
+ glib_init();
/* We are lazy here - we don't want to manually provide
* the introspection data structures - so we just build
diff --git a/src/dbus/abrt-polkit.c b/src/dbus/abrt-polkit.c
index 39af6f0..a71114a 100644
--- a/src/dbus/abrt-polkit.c
+++ b/src/dbus/abrt-polkit.c
@@ -91,18 +91,16 @@ out:
PolkitResult polkit_check_authorization_dname(const char *dbus_name, const char
*action_id)
{
-#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 35)
- g_type_init();
-#endif
+ glib_init();
+
PolkitSubject *subject = polkit_system_bus_name_new(dbus_name);
return do_check(subject, action_id);
}
PolkitResult polkit_check_authorization_pid(pid_t pid, const char *action_id)
{
-#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 35)
- g_type_init();
-#endif
+ glib_init();
+
PolkitSubject *subject = polkit_unix_process_new(pid);
return do_check(subject, action_id);
}
--
1.8.3.1