diff --git a/mac/Info.plist b/mac/Info.plist new file mode 100755 index 000000000..fe940fc78 --- /dev/null +++ b/mac/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + Gramps + CFBundleGetInfoString + 3.2.5, (C) 1997-2010 The Gramps Team http://www.gramps-project.org + CFBundleIconFile + gramps.icns + CFBundleIdentifier + org.gramps-project.gramps + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.2.5 + CFBundleSignature + ???? + CFBundleVersion + 3.2.5 + NSHumanReadableCopyright + Copyright 1997 - 2010 The Gramps Team, GNU General Public License. + LSMinimumSystemVersion + 10.5 + + diff --git a/mac/gramps b/mac/gramps new file mode 100644 index 000000000..7108d264d --- /dev/null +++ b/mac/gramps @@ -0,0 +1,7 @@ + +import sys +import os.path +#Modified from the version shipped with pygtk, to point at where the pygtk-demo modules are in the bundle. +pygtklibdir = os.path.join(os.environ["GTK_EXE_PREFIX"], "lib", "pygtk", "2.0") +sys.path.insert(0, pygtklibdir) +execfile(os.path.join("GTK_DATA_PREFIX", "share", "gramps", "gramps.py")) diff --git a/mac/gramps.accel b/mac/gramps.accel new file mode 100644 index 000000000..b03ff28c4 --- /dev/null +++ b/mac/gramps.accel @@ -0,0 +1,200 @@ +; gramps.py GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; + (gtk_accel_path "/People Tree View/PersonAll/Edit" "Return") +; (gtk_accel_path "/FileWindow/PluginStatus" "") +; (gtk_accel_path "/ReportWindow/place_report" "") +; (gtk_accel_path "/FileWindow/ViewMenu" "") + (gtk_accel_path "/Pedigree/Forward/Forward" "Right") +; (gtk_accel_path "/ReportWindow/birthday_report" "") +; (gtk_accel_path "/ReportWindow/marker_report" "") +; (gtk_accel_path "/ReportWindow/Graphs" "") +; (gtk_accel_path "/FileWindow/FAQ" "") +; (gtk_accel_path "/ToolWindow/mediaman" "") + (gtk_accel_path "/Families/Forward/Forward" "Right") + (gtk_accel_path "/Events/ChangeOrder/Add" "i") +; (gtk_accel_path "/ReportWindow/det_descendant_report" "") +; (gtk_accel_path "/ReportWindow/statistics_chart" "") +; (gtk_accel_path "/Person View/PersonAll/FilterEdit" "") + (gtk_accel_path "/Events/Backward/Back" "Left") +; (gtk_accel_path "/ToolWindow/rebuild_refmap" "") +; (gtk_accel_path "/ToolWindow/Database-Processing" "") + (gtk_accel_path "/Events/Bookmark/EditBook" "b") + (gtk_accel_path "/People Tree View/PersonEdit/Remove" "Delete") + (gtk_accel_path "/Notes/Forward/Forward" "Right") + (gtk_accel_path "/Undo/Undo" "z") + (gtk_accel_path "/MainWindow/Import" "i") +; (gtk_accel_path "/FileWindow/Filter" "") +; (gtk_accel_path "/ReportWindow/summary" "") + (gtk_accel_path "/Media/ChangeOrder/Remove" "Delete") +; (gtk_accel_path "/FileWindow/HelpMenu" "") + (gtk_accel_path "/Place View/Bookmark/AddBook" "d") + (gtk_accel_path "/Repositories/Bookmark/EditBook" "b") +; (gtk_accel_path "/ReportWindow/book" "") +; (gtk_accel_path "/FileWindow/FileMenu" "") + (gtk_accel_path "/Person View/Backward/Back" "Left") +; (gtk_accel_path "/ReportWindow/records" "") +; (gtk_accel_path "/ReportWindow/ancestor_report" "") +; (gtk_accel_path "/ToolWindow/chname" "") +; (gtk_accel_path "/Person View/PersonEdit/FastMerge" "") + (gtk_accel_path "/Relationships/Forward/Forward" "Right") +; (gtk_accel_path "/Person View/PersonEdit/ExportTab" "") + (gtk_accel_path "/Notes/ChangeOrder/Remove" "Delete") +; (gtk_accel_path "/ToolWindow/editowner" "") +; (gtk_accel_path "/ReportWindow/hourglass_graph" "") + (gtk_accel_path "/Repositories/ChangeOrder/Add" "i") + (gtk_accel_path "/Media/Forward/Forward" "Right") + (gtk_accel_path "/AllMainWindow/Delete" "Delete") +; (gtk_accel_path "/FileWindow/Toolbar" "") + (gtk_accel_path "/Place Tree View/ChangeOrder/Add" "i") +; (gtk_accel_path "/ReportWindow/number_of_ancestors_report" "") + (gtk_accel_path "/Families/ChangeOrder/Add" "i") + (gtk_accel_path "/Person View/Bookmark/EditBook" "b") + (gtk_accel_path "/Relationships/Bookmark/AddBook" "d") +; (gtk_accel_path "/ReportWindow/familylines_graph" "") + (gtk_accel_path "/Person View/Forward/Forward" "Right") + (gtk_accel_path "/Place View/ChangeOrder/Remove" "Delete") + (gtk_accel_path "/Sources/ChangeOrder/Remove" "Delete") + (gtk_accel_path "/Person View/ChangeOrder/Remove" "Delete") +; (gtk_accel_path "/ToolWindow/relcalc" "") + (gtk_accel_path "/AllMainWindow/Export" "e") + (gtk_accel_path "/Pedigree/Backward/Back" "Left") + (gtk_accel_path "/Relationships/Bookmark/EditBook" "b") +; (gtk_accel_path "/ToolWindow/reorder_ids" "") + (gtk_accel_path "/Place Tree View/Bookmark/EditBook" "b") +; (gtk_accel_path "/RecentFiles/RecentMenu0" "") + (gtk_accel_path "/Person View/PersonAll/Edit" "Return") +; (gtk_accel_path "/FileWindow/MailingLists" "") + (gtk_accel_path "/Place View/Forward/Forward" "Right") +; (gtk_accel_path "/ReportWindow/kinship_report" "") +; (gtk_accel_path "/MainWindow/BookMenu" "") +; (gtk_accel_path "/ToolWindow/evname" "") +; (gtk_accel_path "/ToolWindow/Analysis-and-Exploration" "") +; (gtk_accel_path "/ReportWindow/indiv_complete" "") +; (gtk_accel_path "/AllMainWindow/F12" "F12") + (gtk_accel_path "/Place Tree View/Bookmark/AddBook" "d") +; (gtk_accel_path "/AllMainWindow/F11" "F11") +; (gtk_accel_path "/ToolWindow/sortevents" "") + (gtk_accel_path "/Fan Chart/Backward/Back" "Left") +; (gtk_accel_path "/Media/Backward/Back" "Left") +; (gtk_accel_path "/Fan Chart/Bookmark/AddBook" "d") +; (gtk_accel_path "/Person View/PersonEdit/CmpMerge" "") +; (gtk_accel_path "/MainWindow/ToolsMenu" "") + (gtk_accel_path "/Events/Forward/Forward" "Right") + (gtk_accel_path "/Families/Backward/Back" "Left") + (gtk_accel_path "/Place View/Backward/Back" "Left") +; (gtk_accel_path "/ReportWindow/descend_chart" "") +; (gtk_accel_path "/ToolWindow/dupfind" "") +; (gtk_accel_path "/MainWindow/EditMenu" "") + (gtk_accel_path "/UndoHistory/UndoHistory" "h") + (gtk_accel_path "/Sources/Bookmark/EditBook" "b") +; (gtk_accel_path "/FileWindow/ReportBug" "") + (gtk_accel_path "/AllMainWindow/Insert" "i") + (gtk_accel_path "/Notes/Bookmark/AddBook" "d") + (gtk_accel_path "/People Tree View/ChangeOrder/Add" "i") +; (gtk_accel_path "/FileWindow/Sidebar" "") +; (gtk_accel_path "/Person View/PersonAll/Dummy" "") + (gtk_accel_path "/Redo/Redo" "z") + (gtk_accel_path "/Person View/PersonEdit/Remove" "Delete") +; (gtk_accel_path "/ReportWindow/family_group" "") +; (gtk_accel_path "/ToolWindow/excity" "") + (gtk_accel_path "/Repositories/ChangeOrder/Remove" "Delete") + (gtk_accel_path "/Repositories/Forward/Forward" "Right") +; (gtk_accel_path "/FileWindow/UserManual" "F1") +; (gtk_accel_path "/FileWindow/OpenRecent" "") + (gtk_accel_path "/Families/Bookmark/AddBook" "d") + (gtk_accel_path "/Place Tree View/Forward/Forward" "Right") +; (gtk_accel_path "/ReportWindow/rel_graph" "") +; (gtk_accel_path "/ReportWindow/Web-Pages" "") +; (gtk_accel_path "/ReportWindow/WebCal" "") +; (gtk_accel_path "/ReportWindow/Text-Reports" "") +; (gtk_accel_path "/Person View/PersonAll/QuickReport" "") +; (gtk_accel_path "/FileWindow/HomePage" "") + (gtk_accel_path "/Relationships/Family/Edit" "Return") +; (gtk_accel_path "/ToolWindow/patchnames" "") + (gtk_accel_path "/Relationships/Backward/Back" "Left") +; (gtk_accel_path "/ReportWindow/det_ancestor_report" "") + (gtk_accel_path "/AllMainWindow/BackSpace" "BackSpace") +; (gtk_accel_path "/ToolWindow/Utilities" "") +; (gtk_accel_path "/AllMainWindow/WindowsMenu" "") + (gtk_accel_path "/Families/Bookmark/EditBook" "b") +; (gtk_accel_path "/AllMainWindow/F9" "F9") +; (gtk_accel_path "/AllMainWindow/F8" "F8") +; (gtk_accel_path "/AllMainWindow/F7" "F7") +; (gtk_accel_path "/AllMainWindow/F6" "F6") + (gtk_accel_path "/Pedigree/Bookmark/AddBook" "d") +; (gtk_accel_path "/AllMainWindow/F5" "F5") +; (gtk_accel_path "/AllMainWindow/F4" "F4") +; (gtk_accel_path "/AllMainWindow/F3" "F3") +; (gtk_accel_path "/AllMainWindow/F2" "F2") + (gtk_accel_path "/Notes/Bookmark/EditBook" "b") + (gtk_accel_path "/Sources/ChangeOrder/Add" "i") +; (gtk_accel_path "/ReportWindow/Books" "") +; (gtk_accel_path "/FileWindow/About" "") + (gtk_accel_path "/Notes/Backward/Back" "Left") +; (gtk_accel_path "/ReportWindow/endofline_report" "") + (gtk_accel_path "/People Tree View/PersonEdit/Add" "i") +; (gtk_accel_path "/ToolWindow/dbrowse" "") + (gtk_accel_path "/Pedigree/Bookmark/EditBook" "b") +; (gtk_accel_path "/ToolWindow/soundgen" "") +; (gtk_accel_path "/FileWindow/ExtraPlugins" "") +; (gtk_accel_path "/AllMainWindow/ReportsMenu" "") + (gtk_accel_path "/categoryviews/personlistview_0" "1") +; (gtk_accel_path "/ReportWindow/descend_report" "") +; (gtk_accel_path "/ReportWindow/fan_chart" "") + (gtk_accel_path "/MainWindow/ScratchPad" "b") + (gtk_accel_path "/Person View/Edit" "Return") +; (gtk_accel_path "/ToolWindow/rebuild" "") +; (gtk_accel_path "/ToolWindow/eventcmp" "") +; (gtk_accel_path "/AllMainWindow/GoMenu" "") +; (gtk_accel_path "/ReportWindow/timeline" "") +; (gtk_accel_path "/ToolWindow/Database-Repair" "") +; (gtk_accel_path "/ReportWindow/Graphical-Reports" "") + (gtk_accel_path "/Person View/HomePerson" "Home") +; (gtk_accel_path "/ReportWindow/ancestor_chart" "") +; (gtk_accel_path "/ToolWindow/check" "") + (gtk_accel_path "/Fan Chart/Forward/Forward" "Right") +; (gtk_accel_path "/ToolWindow/chtype" "") + (gtk_accel_path "/Notes/ChangeOrder/Add" "i") +; (gtk_accel_path "/ReportWindow/calendar" "") +; (gtk_accel_path "/FileWindow/Fullscreen" "F11") + (gtk_accel_path "/Fan Chart/Bookmark/EditBook" "b") +; (gtk_accel_path "/ReportWindow/navwebpage" "") + (gtk_accel_path "/Repositories/Bookmark/AddBook" "d") + (gtk_accel_path "/Families/ChangeOrder/Remove" "Delete") +; (gtk_accel_path "/ToolWindow/verify" "") + (gtk_accel_path "/People Tree View/Forward/Forward" "Right") + (gtk_accel_path "/Sources/Backward/Back" "Left") +; (gtk_accel_path "/ToolWindow/not_related" "") + (gtk_accel_path "/People Tree View/Bookmark/AddBook" "d") +; (gtk_accel_path "/FileWindow/TipOfDay" "") + (gtk_accel_path "/Media/ChangeOrder/Add" "i") + (gtk_accel_path "/FileWindow/Quit" "q") + (gtk_accel_path "/People Tree View/Bookmark/EditBook" "b") + (gtk_accel_path "/Place Tree View/Backward/Back" "Left") + (gtk_accel_path "/FileWindow/Open" "o") + (gtk_accel_path "/Place View/Bookmark/EditBook" "b") + (gtk_accel_path "/Media/Bookmark/EditBook" "b") + (gtk_accel_path "/MainWindow/ConfigView" "c") + (gtk_accel_path "/People Tree View/Backward/Back" "Left") +; (gtk_accel_path "/FileWindow/KeyBindings" "") + (gtk_accel_path "/Repositories/Backward/Back" "Left") + (gtk_accel_path "/Events/Bookmark/AddBook" "d") + (gtk_accel_path "/People Tree View/ChangeOrder/Remove" "Delete") + (gtk_accel_path "/AllMainWindow/P" "p") + (gtk_accel_path "/Person View/ChangeOrder/Add" "i") + (gtk_accel_path "/AllMainWindow/N" "n") + (gtk_accel_path "/Place Tree View/ChangeOrder/Remove" "Delete") +; (gtk_accel_path "/AllMainWindow/Abandon" "") + (gtk_accel_path "/Events/ChangeOrder/Remove" "Delete") + (gtk_accel_path "/AllMainWindow/J" "j") + (gtk_accel_path "/Media/Bookmark/AddBook" "d") +; (gtk_accel_path "/ToolWindow/remove_unused" "") +; (gtk_accel_path "/Person View/PersonOther/SetActive" "") + (gtk_accel_path "/categoryviews/personview_1" "2") + (gtk_accel_path "/Sources/Bookmark/AddBook" "d") + (gtk_accel_path "/Place View/ChangeOrder/Add" "i") + (gtk_accel_path "/Person View/PersonEdit/Add" "i") + (gtk_accel_path "/Sources/Forward/Forward" "Right") + (gtk_accel_path "/Person View/Bookmark/AddBook" "d") +; (gtk_accel_path "/FileWindow/Preferences" "") diff --git a/mac/gramps.bundle b/mac/gramps.bundle new file mode 100644 index 000000000..dd7506f9b --- /dev/null +++ b/mac/gramps.bundle @@ -0,0 +1,157 @@ + + + + + ${env:JHBUILD_PREFIX} + ${env:HOME}/Desktop + + ${project}/launcher.sh + + + ${project}/Info.plist + + + ${prefix}/bin/gramps + + + + + ${prefix}/bin/python + + + + + ${prefix}/lib/gtk-2.0/${pkg:gtk+-2.0:gtk_binary_version}/loaders/*.so + + + + ${prefix}/lib/libpyglib-2.0-python.0.dylib + + + + ${prefix}/lib/python2.6/*.so + + + + ${prefix}/lib/librsvg-2.2.dylib + + + + ${prefix}/lib/libwebkit-1.0.2.dylib + + + + ${prefix}/lib/libgoocanvas.3.dylib + + + + ${prefix}/lib/libigemacintegration.0.dylib + + + + ${prefix}/lib/libart_lgpl_2.2.dylib + + + + ${prefix}/lib/libdb-4.dylib + + + + ${prefix}/lib/libenchant.dylib + + + + ${prefix}/lib/libgettextpo.0.dylib + + + + ${prefix}/lib/libproxy.0.dylib + + + + ${prefix}/lib/enchant + + + + + ${prefix}/share/locale + + + + ${prefix}/share/locale + + + + + + ${prefix}/lib/python2.6/*.py + + + + ${prefix}/share/gramps/ + + + + ${prefix}/share/webkit-1.0/ + + + + ${prefix}/share/enchant/ + + + + ${prefix}/share/mime/ + + + + ${prefix}/share/mime-info/ + + + + + ${prefix}/share/themes + + + + + ${project}/gramps.icns + + + + + + ${project}/gtkrc + + + + ${project}/gramps.accel + + + + + diff --git a/mac/gramps.icns b/mac/gramps.icns new file mode 100644 index 000000000..e8d48887a Binary files /dev/null and b/mac/gramps.icns differ diff --git a/mac/gramps.modules b/mac/gramps.modules new file mode 100644 index 000000000..9f4e54c80 --- /dev/null +++ b/mac/gramps.modules @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ยก + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mac/gtkrc b/mac/gtkrc new file mode 100644 index 000000000..ba5477cae --- /dev/null +++ b/mac/gtkrc @@ -0,0 +1,2 @@ +gtk-icon-theme-name = "Tango" +gtk-enable-mnemonics = 0 diff --git a/mac/launcher.sh b/mac/launcher.sh new file mode 100755 index 000000000..38c62aec1 --- /dev/null +++ b/mac/launcher.sh @@ -0,0 +1,169 @@ +#!/bin/sh + +name="`basename $0`" +tmp="`pwd`/$0" +tmp=`dirname "$tmp"` +tmp=`dirname "$tmp"` +bundle=`dirname "$tmp"` +bundle_contents="$bundle"/Contents +bundle_res="$bundle_contents"/Resources +bundle_lib="$bundle_res"/lib +bundle_bin="$bundle_res"/bin +bundle_data="$bundle_res"/share +bundle_etc="$bundle_res"/etc + +export XDG_DATA_DIRS="$bundle_data" + +export DYLD_LIBRARY_PATH="$bundle_lib" +export LD_LIBRARY_PATH="$DYLD_LIBRARY_PATH" +export GTK_DATA_PREFIX="$bundle_res" +export GTK_EXE_PREFIX="$bundle_res" +export GTK_PATH="$bundle_res" + +export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc" +export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules" +export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders" +export PANGO_RC_FILE="$bundle_etc/pango/pangorc" + +#Set $PYTHON to point inside the bundle +export PYTHON="$bundle_contents/MacOS/python" +#Add the bundle's python modules +PYTHONPATH="$bundle_lib/python2.6:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python2.6/site-packages:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python2.6/site-packages/gtk-2.0:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python2.6/lib-dynload:$PYTHONPATH" +#Add our program's modules to $PYTHONPATH. +PYTHONPATH="$bundle_lib/pygtk/2.0:$PYTHONPATH" +export PYTHONPATH +export GRAMPSDIR="$bundle_data"/gramps +export GRAMPSI18N="$bundle_data"/locale +export GRAMPSHOME="$HOME/Library/Application Support" + +# Set the locale-related variables appropriately: +unset LANG LC_MESSAGES LC_MONETARY + +# Has a language ordering been set? +# If so, set LC_MESSAGES accordingly; otherwise skip it. +# Set the locale-related variables appropriately: +unset LANG LC_MESSAGES LC_MONETARY LC_COLLATE + +# Has a language ordering been set? +# If so, set LC_MESSAGES and LANG accordingly; otherwise skip it. +# First step uses sed to clean off the quotes and commas, to change - to _, and change the names for the chinese scripts from "Hans" to CN and "Hant" to TW. +APPLELANGUAGES=`defaults read .GlobalPreferences AppleLanguages | sed -En -e 's/\-/_/' -e 's/Hant/TW/' -e 's/Hans/CN/' -e 's/[[:space:]]*\"?([[:alnum:]_]+)\"?,?/\1/p' ` +if test "$APPLELANGUAGES"; then + # A language ordering exists. + # Test, item per item, to see whether there is an corresponding locale. + for L in $APPLELANGUAGES; do + #test for exact matches: + if test -f "$GRAMPSI18N/${L}/LC_MESSAGES/gramps.mo"; then + export LANG=$L + break + fi + #This is a special case, because often the original strings are in US + #English and there is no translation file. + if test "x$L" == "xen_US"; then + export LANG=$L + break + fi + #OK, now test for just the first two letters: + if test -f "$GRAMPSI18N/${L:0:2}/LC_MESSAGES/gramps.mo"; then + export LANG=${L:0:2} + break + fi + #Same thing, but checking for any english variant. + if test "x${L:0:2}" == "xen"; then + export LANG=$L + break + fi; + done +fi +unset APPLELANGUAGES L + +# If we didn't get a language from the language list, try the Collation preference, in case it's the only setting that exists. +APPLECOLLATION=`defaults read .GlobalPreferences AppleCollationOrder` +if test -z "$LANG" -a -n "$APPLECOLLATION"; then + if test -f "$GRAMPSI18N/$APPLECOLLATION/LC_MESSAGES/gramps.mo"; then + export LANG=$APPLECOLLATION + fi +fi +if test -n "$APPLECOLLATION"; then + export LC_COLLATE=$APPLECOLLATION +fi +unset APPLECOLLATION + +# Continue by attempting to find the Locale preference. +APPLELOCALE=`defaults read .GlobalPreferences AppleLocale` +if test -f "$GRAMPSI18N/${APPLELOCALE:0:5}/LC_MESSAGES/gramps.mo"; then + if test -z $LANG; then + export LANG="${APPLELOCALE:0:5}" + fi + +elif test -z $LANG -a -f "$GRAMPSI18N/${APPLELOCALE:0:2}/LC_MESSAGES/gramps.mo"; then + export LANG="${APPLELOCALE:0:2}" +fi + +#Next we need to set LC_MESSAGES. If at all possilbe, we want a full +#5-character locale to avoid the "Locale not supported by C library" +#warning from Gtk -- even though Gtk will translate with a +#two-character code. +if test -n $LANG; then +#If the language code matches the applelocale, then that's the message +#locale; otherwise, if it's longer than two characters, then it's +#probably a good message locale and we'll go with it. + if test $LANG == ${APPLELOCALE:0:5} -o $LANG != ${LANG:0:2}; then + export LC_MESSAGES=$LANG +#Next try if the Applelocale is longer than 2 chars and the language +#bit matches $LANG + elif test $LANG == ${APPLELOCALE:0:2} -a $APPLELOCALE > ${APPLELOCALE:0:2}; then + export LC_MESSAGES=${APPLELOCALE:0:5} +#Fail. Get a list of the locales in $PREFIX/share/locale that match +#our two letter language code and pick the first one, special casing +#english to set en_US + elif test $LANG == "en"; then + export LC_MESSAGES="en_US" + else + LOC=`find $PREFIX/share/locale -name $LANG???` + echo "Locales $LOC" + for L in $LOC; do + export LC_MESSAGES=$L + done + fi +else +#All efforts have failed, so default to US english + export LANG="en_US" + export LC_MESSAGES="en_US" +fi +CURRENCY=`echo $APPLELOCALE | sed -En 's/.*currency=([[:alpha:]]+).*/\1/p'` +if test "x$CURRENCY" != "x"; then +#The user has set a special currency. Gtk doesn't install LC_MONETARY files, but Apple does in /usr/share/locale, so we're going to look there for a locale to set LC_CURRENCY to. + if test -f /usr/local/share/$LC_MESSAGES/LC_MONETARY; then + if test -a `cat /usr/local/share/$LC_MESSAGES/LC_MONETARY` == $CURRENCY; then + export LC_MONETARY=$LC_MESSAGES + fi + fi + if test -z "$LC_MONETARY"; then + FILES=`find /usr/share/locale -name LC_MONETARY -exec grep -H $CURRENCY {} \;` + if test -n "$FILES"; then + export LC_MONETARY=`echo $FILES | sed -En 's%/usr/share/locale/([[:alpha:]_]+)/LC_MONETARY.*%\1%p'` + fi + fi +fi +#No currency value means that the AppleLocale governs: +if test -z "$LC_MONETARY"; then + export LC_MONETARY=${APPLELOCALE:0:5} +fi + +#To turn on the appropriate dictionary: +export LC_ALL=$LC_MESSAGES + +unset APPLELOCALE FILES LOC + +# Strip out the argument added by the OS. +if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then + shift 1 +fi + +#Note that we're calling $PYTHON here to override the version in +#pygtk-demo's shebang. +exec $PYTHON -O "$GRAMPSDIR/gramps.py" "$@"