Esempio n. 1
0
/**
 * gpm_control_shutdown:
 * @control: This class instance
 *
 * Shuts down the computer
 **/
gboolean
gpm_control_shutdown (GpmControl *control, GError **error)
{
	gboolean ret;
	EggConsoleKit *console;
	console = egg_console_kit_new ();
	ret = egg_console_kit_stop (console, error);
	g_object_unref (console);
	return ret;
}
Esempio n. 2
0
/**
 * gpm_control_shutdown:
 * @control: This class instance
 *
 * Shuts down the computer
 **/
gboolean
gpm_control_shutdown (GpmControl *control, GError **error)
{
    gboolean ret;
    EggConsoleKit *console;

    if (LOGIND_RUNNING()) {
        ret = gpm_control_systemd_shutdown ();
    } else {
        console = egg_console_kit_new ();
        ret = egg_console_kit_stop (console, error);
        g_object_unref (console);
    }
    return ret;
}