gboolean cd_powermanager_alert (MyAppletCharge alert)
{
    cd_debug ("%s", __func__);
    GString *sInfo = g_string_new ("");

    gchar *hms = NULL;
    if (myData.battery_time > 0.)
        hms = get_hours_minutes (myData.battery_time);
    else
        hms = g_strdup_printf ("%s", D_("Unknown"));

    if ((alert == POWER_MANAGER_CHARGE_LOW && myConfig.lowBatteryWitness) || (alert == POWER_MANAGER_CHARGE_CRITICAL && myConfig.criticalBatteryWitness))
    {
        g_string_printf (sInfo, "%s (%.2f%%%%) \n %s %s \n %s", D_("PowerManager.\nBattery charge seems to be low"), myData.battery_charge, D_("Estimated time with Charge:"), hms, D_("Please put your Laptop on charge."));
        _cd_powermanager_dialog (sInfo);
    }

    else if (alert == POWER_MANAGER_CHARGE_FULL && myConfig.highBatteryWitness)
    {
        g_string_printf (sInfo, "%s (%.2f%%%%) \n %s %s ", D_("PowerManager.\nYour battery is now Charged"), myData.battery_charge, D_("Estimated time with Charge:"), hms);
        _cd_powermanager_dialog (sInfo);
        if (myConfig.cSoundPath[POWER_MANAGER_CHARGE_FULL] != NULL)
            cairo_dock_play_sound (myConfig.cSoundPath[POWER_MANAGER_CHARGE_FULL]);
    }
    if (myConfig.batteryWitness)
    {
        CD_APPLET_ANIMATE_MY_ICON ("rotate", 3);
    }

    g_free (hms);
    g_string_free (sInfo, TRUE);
    myData.alerted = TRUE;
    return FALSE;
}
/* Anime l'icone au changement de musique
 */
void cd_musicplayer_animate_icon (int animationLength)
{
	if (myDock && myConfig.cChangeAnimation != NULL)
	{
		CD_APPLET_ANIMATE_MY_ICON (myConfig.cChangeAnimation, animationLength);
	}
}
void iconWitness(int animationLenght)
{
    CD_APPLET_ANIMATE_MY_ICON (myConfig.batteryWitnessAnimation, animationLenght);
}