online-desktop r7254 - in trunk: m4 pyonlinedesktop
- From: marco svn gnome org
- To: svn-commits-list gnome org
- Subject: online-desktop r7254 - in trunk: m4 pyonlinedesktop
- Date: Wed, 18 Jun 2008 16:53:41 +0000 (UTC)
Author: marco
Date: Wed Jun 18 16:53:41 2008
New Revision: 7254
URL: http://svn.gnome.org/viewvc/online-desktop?rev=7254&view=rev
Log:
Expose base_url so that the stock can easily access data files.
Modified:
trunk/m4/intltool.m4
trunk/pyonlinedesktop/widget.py
Modified: trunk/m4/intltool.m4
==============================================================================
--- trunk/m4/intltool.m4 (original)
+++ trunk/m4/intltool.m4 Wed Jun 18 16:53:41 2008
@@ -23,7 +23,7 @@
## the same distribution terms that you use for the rest of that program.
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 36 IT_PROG_INTLTOOL
+# serial 40 IT_PROG_INTLTOOL
AC_DEFUN([IT_PROG_INTLTOOL],
[AC_PREREQ([2.50])dnl
@@ -39,14 +39,21 @@
AC_MSG_CHECKING([for intltool >= $1])
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
- INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
- [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
+ INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+ [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
]
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
fi
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
@@ -101,12 +108,7 @@
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
fi
-# Use the tools built into the package, not the ones that are installed.
-AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
-AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
+AC_PATH_PROG(INTLTOOL_PERL, [perl])
if test -z "$INTLTOOL_PERL"; then
AC_MSG_ERROR([perl not found; required for intltool])
fi
@@ -152,42 +154,6 @@
IT_PO_SUBDIR([po])
-dnl The following is very similar to
-dnl
-dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl - the *.in files are in ac_aux_dir,
-dnl - if the file haven't changed upon reconfigure, it's not touched,
-dnl - the evaluation of the third parameter enables a hack which computes
-dnl the actual value of $libdir,
-dnl - the user sees "executing intltool commands", instead of
-dnl "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
- sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
- -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
- < ${ac_aux_dir}/${file}.in > ${file}.out
- if cmp -s ${file} ${file}.out 2>/dev/null; then
- rm -f ${file}.out
- else
- mv -f ${file}.out ${file}
- fi
- chmod ugo+x ${file}
- chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
-
])
Modified: trunk/pyonlinedesktop/widget.py
==============================================================================
--- trunk/pyonlinedesktop/widget.py (original)
+++ trunk/pyonlinedesktop/widget.py Wed Jun 18 16:53:41 2008
@@ -53,7 +53,7 @@
doc = xml.etree.ElementTree.ElementTree()
self.__lang = os.environ.get('LANG', 'en_US.UTF-8').split('.', 1)[0]
-
+ self.__base_url = baseurl
self.__required_urls = {}
doc.parse(f)
@@ -142,6 +142,9 @@
result.write('''}\n''')
return result.getvalue()
+ def get_base_url(self):
+ return self.__base_url
+
def get_required_urls(self):
for url in self.__required_urls:
yield url
@@ -188,4 +191,4 @@
oldv = getattr(self, k)
newv = self.__substitute_locale_msgs(oldv, msgs)
setattr(self, k, newv)
-
\ No newline at end of file
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]