#!/bin/sh

. /usr/share/debconf/confmodule

# DebConf is not a registry, so we try to get the values from the real
# source...
cfgfile="/usr/share/setedit/install.log"
if grep 'CentralDesktopFile=0' $cfgfile >/dev/null 2>&1 ; then
	db_set setedit/central_desktop_file 'Create a desktop file in each directory'
fi
if grep 'CentralDesktopFile=1' $cfgfile >/dev/null 2>&1 ; then
	db_set setedit/central_desktop_file 'Use a central desktop file'
fi
if grep 'TabsForIndent=0' $cfgfile >/dev/null 2>&1 ; then
	db_set setedit/tabs_for_indent 'Spaces'
fi
if grep 'TabsForIndent=1' $cfgfile >/dev/null 2>&1 ; then
	db_set setedit/tabs_for_indent 'Tabs'
fi
if grep 'CreateBackUps=0' $cfgfile >/dev/null 2>&1 ; then
	db_set setedit/create_backups 'No'
fi
if grep 'CreateBackUps=1' $cfgfile >/dev/null 2>&1 ; then
	db_set setedit/create_backups 'Yes'
fi

# Ask the questions now...
db_beginblock
db_input low setedit/central_desktop_file
db_input low setedit/tabs_for_indent
db_input low setedit/create_backups
db_endblock
db_go


