#!/bin/sh
if [ "x$D" != "x" ]; then
        exit 1
fi

# Update the pixbuf loaders in case they haven't been registered yet
GDK_PIXBUF_MODULEDIR=/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache

for icondir in /usr/share/icons/* ; do
    if [ -d $icondir ] ; then
        gtk-update-icon-cache -fqt  $icondir
    fi
done
if [ "x$D" != "x" ]; then
	exit 1
fi
SCHEMA_LOCATION=/etc/gconf/schemas
for SCHEMA in gthumb.schemas gthumb_rename_series.schemas gthumb-importer.schemas gthumb-slideshow.schemas gthumb-comments.schemas gthumb_photo_importer.schemas gthumb_resize_images.schemas gthumb-pixbuf-savers.schemas gthumb_crop_options.schemas gthumb_convert_format.schemas gthumb_resize_options.schemas gthumb-image-viewer.schemas gthumb-gstreamer.schemas gthumb_webalbums.schemas gthumb_image_print.schemas; do
	if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
		HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
			gconftool-2 \
			--makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null
	fi
done
