#!/bin/sh if [ "$1" != "upgrade" ] then # End automatically added section echo -e "Selecting menu location" maemo-select-menu-location mdictionary.desktop # End automatically added section echo -e "Creating 'Finnish - English' dictionary" su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/FinnishEnglish/name Finnish-English' su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/FinnishEnglish/path /usr/share/mdictionary/dictionaries/FinnishEnglish' su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/FinnishEnglish/active true' su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/FinnishEnglish/optimized true' echo -e "Creating 'English - Finnish Sample Dictionary' dictionary" su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/EnglishFinnish/name English-Finnish' su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/EnglishFinnish/path /usr/share/mdictionary/dictionaries/EnglishFinnish' su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/EnglishFinnish/active true' su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/EnglishFinnish/optimized true' echo -e "Adding gconf entries for search engines" su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/engines/xdxf/path /usr/lib/mdictionary/engine_xdxf.so' su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/engines/stardict/path /usr/lib/mdictionary/engine_stardict.so' su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/engines/bookmarks/path /usr/lib/mdictionary/engine_bookmarks.so' su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/bookmarks/name Bookmarks' su $USER -c 'gconftool-2 --type string --set /apps/maemo/mdictionary/dictionaries/bookmarks/path /usr/share/mdictionary/dictionaries/bookmarks' su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/bookmarks/active false' su $USER -c 'gconftool-2 --type bool --set /apps/maemo/mdictionary/dictionaries/bookmarks/optimized true' echo -e "Changing privilages" chmod -R 0777 /usr/share/mdictionary/dictionaries if [ -f /usr/share/applications/uri-action-defaults.list ] then if [ -z $(grep mdict=hildon-mdictionary.desktop /usr/share/applications/uri-action-defaults.list) ] then echo -e "Adding mdict URI action - uri-action-defaults.list" echo -en "mdict=hildon-mdictionary.desktop" >> /usr/share/applications/uri-action-defaults.list else echo -en "\n\nThere is an entry about mdictionary in uri-action already ... \n\n" fi if [ -z `grep 'mdict=hildon-mdictionary.desktop' /usr/share/applications/schemeinfo.cache` ] then echo -e "Adding mdict URI action - schemeinfo.cache" echo -en "mdict=hildon-mdictionary.desktop" >> /usr/share/applications/schemeinfo.cache else echo -en "\n\nThere is an entry about mdictionary in schemeinfo already ... \n\n" fi fi fi