#!/bin/sh

# Update the icon cache
gtk-update-icon-cache -f /usr/share/icons/hicolor

# Add cuteNews to the notification bubble settings
NOTIFICATIONS_CONF="/etc/hildon-desktop/notification-groups.conf"
NOTIFICATIONS_KEY="cutenews-new-articles"


if ! grep -q "$NOTIFICATIONS_KEY" "$NOTIFICATIONS_CONF"; then
    echo -n "Updating $NOTIFICATIONS_CONF..."
    cat >>$NOTIFICATIONS_CONF << EOF

### BEGIN Added by cutenews postinst ###

[cutenews-new-articles]
Destination=cuteNews
Icon=cutenews
Title-Text-Empty=cuteNews
Secondary-Text=New articles available
LED-Pattern=PatternCommonNotification

### END Added by cutenews postinst ###

EOF
    echo "done."
fi


exit 0
