[ABRT PATCH v2 +init in s-c-a.c] use shared GLib initialization function
Jiri Moskovcak
jmoskovc at redhat.com
Thu Jul 25 11:37:10 UTC 2013
- pushed, thx
On 07/23/2013 11:01 AM, Jakub Filak wrote:
> Closes rhbz#927919
>
> Signed-off-by: Jakub Filak <jfilak at redhat.com>
> ---
> src/applet/applet.c | 5 +----
> src/configuration-gui/system-config-abrt.c | 4 +---
> src/dbus/abrt-dbus.c | 4 +---
> src/dbus/abrt-polkit.c | 10 ++++------
> 4 files changed, 7 insertions(+), 16 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/configuration-gui/system-config-abrt.c b/src/configuration-gui/system-config-abrt.c
> index cec18d5..1a63096 100644
> --- a/src/configuration-gui/system-config-abrt.c
> +++ b/src/configuration-gui/system-config-abrt.c
> @@ -198,9 +198,7 @@ system_config_abrt_new (void)
>
> int main(int argc, char *argv[])
> {
> -#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 35)
> - g_type_init();
> -#endif
> + glib_init();
>
> SystemConfigAbrt *system_config_abrt = system_config_abrt_new();
>
> 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);
> }
>
More information about the Crash-catcher
mailing list