gnome-specimen r58 - in branches/import-from-bzr: . data specimen



Author: wbolster
Date: Tue Jun 17 18:52:49 2008
New Revision: 58
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=58&view=rev

Log:
* The "wow, autofu install seems to work!" commit.


Added:
   branches/import-from-bzr/gnome-specimen.in
   branches/import-from-bzr/specimen/config.py.in
   branches/import-from-bzr/specimen/main.py
      - copied, changed from r57, /branches/import-from-bzr/specimen/gnome-specimen.in
Removed:
   branches/import-from-bzr/specimen/gnome-specimen.in
Modified:
   branches/import-from-bzr/   (props changed)
   branches/import-from-bzr/.bzrignore
   branches/import-from-bzr/Makefile.am
   branches/import-from-bzr/configure.ac
   branches/import-from-bzr/data/gnome-specimen.desktop.in.in
   branches/import-from-bzr/specimen/Makefile.am
   branches/import-from-bzr/specimen/__init__.py
   branches/import-from-bzr/specimen/specimenwindow.py

Modified: branches/import-from-bzr/.bzrignore
==============================================================================
--- branches/import-from-bzr/.bzrignore	(original)
+++ branches/import-from-bzr/.bzrignore	Tue Jun 17 18:52:49 2008
@@ -18,3 +18,4 @@
 ./po/stamp-it
 ./py-compile
 specimen/gnome-specimen
+data/gnome-specimen.desktop

Modified: branches/import-from-bzr/Makefile.am
==============================================================================
--- branches/import-from-bzr/Makefile.am	(original)
+++ branches/import-from-bzr/Makefile.am	Tue Jun 17 18:52:49 2008
@@ -6,13 +6,28 @@
 ChangeLog:
 	bzr log --forward > $<
 
+bin_SCRIPTS = gnome-specimen
+
+gnome-specimen: gnome-specimen.in Makefile
+	sed \
+		-e s!\ pyexecdir\@! pyexecdir@! \
+		-e s!\ PYTHON\@! PYTHON@! \
+		< $< \
+		> $@
+	chmod a+x $@
+
+
 EXTRA_DIST = \
-	ChangeLog
+	ChangeLog \
+	gnome-specimen.in \
 	intltool-extract.in \
 	intltool-merge.in \
 	intltool-update.in
 
+CLEANFILES= \
+	gnome-specimen
+
 DISTCLEANFILES = \
-        intltool-extract \
-        intltool-merge \
-        intltool-update
+	intltool-extract \
+	intltool-merge \
+	intltool-update

Modified: branches/import-from-bzr/configure.ac
==============================================================================
--- branches/import-from-bzr/configure.ac	(original)
+++ branches/import-from-bzr/configure.ac	Tue Jun 17 18:52:49 2008
@@ -25,11 +25,10 @@
 
 dnl  create output
 AC_CONFIG_FILES([
-data/gnome-specimen.desktop.in
-data/Makefile
-Makefile
-po/Makefile.in
-specimen/gnome-specimen
-specimen/Makefile
+	data/gnome-specimen.desktop.in
+	data/Makefile
+	Makefile
+	po/Makefile.in
+	specimen/Makefile
 ])
 AC_OUTPUT

Modified: branches/import-from-bzr/data/gnome-specimen.desktop.in.in
==============================================================================
--- branches/import-from-bzr/data/gnome-specimen.desktop.in.in	(original)
+++ branches/import-from-bzr/data/gnome-specimen.desktop.in.in	Tue Jun 17 18:52:49 2008
@@ -2,7 +2,7 @@
 Encoding=UTF-8
 _Name=Specimen Font Preview
 _GenericName=Font Previewer
-_Comment=Preview en compare fonts
+_Comment=Preview and compare fonts
 Exec=gnome-specimen
 StartupNotify=false
 Terminal=false

Added: branches/import-from-bzr/gnome-specimen.in
==============================================================================
--- (empty file)
+++ branches/import-from-bzr/gnome-specimen.in	Tue Jun 17 18:52:49 2008
@@ -0,0 +1,27 @@
+#! PYTHON@
+
+# GNOME Specimen, a font preview application for GNOME
+# Copyright (C) 2006  Wouter Bolsterlee <uws xs4all nl>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA+
+
+import sys
+
+if not "@pyexecdir@" in sys.path:
+    sys.path.insert (0, "@pyexecdir@")
+
+
+import specimen.main
+specimen.main.main(sys.argv[1:])

Modified: branches/import-from-bzr/specimen/Makefile.am
==============================================================================
--- branches/import-from-bzr/specimen/Makefile.am	(original)
+++ branches/import-from-bzr/specimen/Makefile.am	Tue Jun 17 18:52:49 2008
@@ -1,18 +1,28 @@
 
-bin_SCRIPTS = gnome-specimen
+appdir = $(pyexecdir)/specimen
 
-EXTRA_DIST = \
-	gnome-specimen.in
+all-local: config.py
 
-CLEANFILES = \
-	gnome-specimen
-
-appdir = $(pyexecdir)/specimen
 app_PYTHON = \
 	__init__.py \
+	main.py \
 	specimenwindow.py
 
-#gnome-specimen: gnome-specimen.in Makefile
-#	sed -e s!\ pyexecdir\@! pyexecdir@! -e s!\ PYTHON\@! PYTHON@! < $< > $@
-#	chmod a+x $@
+nodist_app_PYTHON = config.py
+
+EXTRA_DIST = \
+	config.py.in
+
+CLEANFILES = \
+	config.py
+
+config.py: config.py.in Makefile
+	sed \
+		-e s!\ LOCALEDIR\@!$(datadir)/locale! \
+		-e s!\ DATADIR\@!$(datadir)! \
+		-e s!\ GLADEDIR\@!$(pkgdatadir)/glade! \
+		-e s!\ PACKAGE_NAME\@!$(PACKAGE_NAME)! \
+		-e s!\ PACKAGE_VERSION\@!$(PACKAGE_VERSION)! \
+		< $< \
+		> $@
 

Modified: branches/import-from-bzr/specimen/__init__.py
==============================================================================
--- branches/import-from-bzr/specimen/__init__.py	(original)
+++ branches/import-from-bzr/specimen/__init__.py	Tue Jun 17 18:52:49 2008
@@ -0,0 +1 @@
+__all__ = ('main', 'specimenwindow')

Added: branches/import-from-bzr/specimen/config.py.in
==============================================================================
--- (empty file)
+++ branches/import-from-bzr/specimen/config.py.in	Tue Jun 17 18:52:49 2008
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+#
+# Copyright (C) 2005 Vincent Untz <vuntz gnome org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
+#
+
+import os.path
+
+PACKAGE   = "@PACKAGE_NAME@"
+VERSION   = "@PACKAGE_VERSION@"
+
+LOCALEDIR = "@LOCALEDIR@"
+DATADIR   = "@DATADIR@"
+GLADEDIR  = "@GLADEDIR@"

Copied: branches/import-from-bzr/specimen/main.py (from r57, /branches/import-from-bzr/specimen/gnome-specimen.in)
==============================================================================
--- /branches/import-from-bzr/specimen/gnome-specimen.in	(original)
+++ branches/import-from-bzr/specimen/main.py	Tue Jun 17 18:52:49 2008
@@ -17,35 +17,24 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA+
 
-import sys
-import os.path
+def main(args):
+    import gettext
+    import locale
+    import sys
 
-if not "@pyexecdir@" in sys.path:
-        sys.path.insert (0, "@pyexecdir@")
-
-PACKAGE   = "@PACKAGE_NAME@"
-VERSION   = "@PACKAGE_VERSION@"
-
-DATADIR   = "@DATADIRNAME@"
-LOCALEDIR = os.path.join(DATADIR, 'locale')
-GLADEDIR  = os.path.join(DATADIR, 'glade')
-
-
-import gettext
-import locale
-
-import pygtk; pygtk.require('2.0');
+    import pygtk; pygtk.require('2.0');
     
-import gtk
-import gtk.glade
-import gnome
+    import gtk
+    import gtk.glade
+    import gnome
 
-from specimenwindow import SpecimenWindow
+    from specimenwindow import SpecimenWindow
+    import config
 
-# run the program
-if __name__ == '__main__':
+    gettext.install (config.PACKAGE, config.LOCALEDIR)
+    gtk.glade.bindtextdomain (config.PACKAGE, config.LOCALEDIR)
 
-    prog = gnome.program_init (PACKAGE, VERSION)
+    prog = gnome.program_init (config.PACKAGE, config.VERSION)
 
     gtk.window_set_default_icon_name ("stock_font")
 

Modified: branches/import-from-bzr/specimen/specimenwindow.py
==============================================================================
--- branches/import-from-bzr/specimen/specimenwindow.py	(original)
+++ branches/import-from-bzr/specimen/specimenwindow.py	Tue Jun 17 18:52:49 2008
@@ -7,6 +7,8 @@
 
 from gettext import gettext as _
 
+import config
+
 class SpecimenWindow:
 
     families = []
@@ -54,11 +56,7 @@
 
         # load glade interface description
         import os.path
-        glade_filename = os.path.join(
-            os.path.dirname(os.path.realpath(__file__)),
-            '../../../../share/gnome-specimen/'
-            'glade',
-            'gnome-specimen.glade')
+        glade_filename = os.path.join(config.GLADEDIR, 'gnome-specimen.glade')
         tree = gtk.glade.XML(glade_filename)
         tree.signal_autoconnect(self)
 
@@ -587,7 +585,7 @@
 
         except (AttributeError):
             name = _('GNOME Specimen')
-            comments = _('Preview en compare fonts')
+            comments = _('Preview and compare fonts')
             copyright = u'Copyright \u00A9 2006 Wouter Bolsterlee'
             authors = ['Wouter Bolsterlee <wbolster gnome org>']
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]