Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bcoudoin@src.gnome.org>2006-12-06 00:55:03 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2006-12-06 00:55:03 (GMT)
commit43ad7ca526244fe991228b89704432ea1e2309af (patch)
tree29fa6a927e69100bba75ba662f68e1fb3874bd7d
parent9d7d8c9eb4afbd5bb181cf23657bb87776077bd5 (diff)
-- Merge from HEAD - Fixed 2 annoying bug in anim/draw: It's now easy to
-- Merge from HEAD - Fixed 2 annoying bug in anim/draw: It's now easy to move text by using it's anchor The DEL key works now.
-rw-r--r--ChangeLog12
-rw-r--r--Makefile.mingw.in3
-rw-r--r--po/Makefile.in.in182
-rw-r--r--src/boards/python/anim.py45
-rw-r--r--src/boards/shapegame.c4
5 files changed, 109 insertions, 137 deletions
diff --git a/ChangeLog b/ChangeLog
index f8b2980..dfefb42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-12-06 Bruno coudoin <bruno.coudoin@free.fr>
+
+ -- Merge from HEAD
+ - Fixed 2 annoying bug in anim/draw:
+ It's now easy to move text by using it's anchor
+ The DEL key works now.
+
+ * Makefile.mingw.in: added msvcr71.dll, not all windows have it.
+ * po/Makefile.in.in:
+ * src/boards/python/anim.py:
+ * src/boards/shapegame.c: (create_title): now uses gettext for tittles.
+
*** RELEASE 8.2.2 ***
2006-11-18 Bruno coudoin <bruno.coudoin@free.fr>
diff --git a/Makefile.mingw.in b/Makefile.mingw.in
index 0864473..b4a8a5f 100644
--- a/Makefile.mingw.in
+++ b/Makefile.mingw.in
@@ -62,7 +62,8 @@ NEEDED_DLLS = $(GNUCHESS_TOP)/bin/pthreadGC.dll \
$(GTK_TOP)/bin/iconv.dll \
$(GTK_TOP)/bin/intl.dll \
$(GTK_TOP)/bin/libpng13.dll \
- $(GTK_TOP)/bin/jpeg62.dll
+ $(GTK_TOP)/bin/jpeg62.dll \
+ /c/WINDOWS/system32/msvcr71.dll
NEEDED_FILES = README \
COPYING \
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 1a6961e..d2d4e4c 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -22,7 +22,6 @@ PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
-@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -34,18 +33,17 @@ exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
-localedir = $(libdir)/locale
-gnulocaledir = $(datadir)/locale
-gettextsrcdir = $(datadir)/glib-2.0/gettext/po
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = @install_sh@
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-CC = @CC@
-GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
@@ -54,32 +52,22 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-DEFS = @DEFS@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
-INCLUDES = -I.. -I$(top_srcdir)/intl
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-SOURCES =
-POFILES = @POFILES@
-GMOFILES = @GMOFILES@
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
-$(POFILES) $(SOURCES)
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
POTFILES = \
+#This Gets Replace for some reason
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-INSTOBJEXT = @INSTOBJEXT@
+CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
-.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
-
-.c.o:
- $(COMPILE) $<
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
@@ -94,7 +82,7 @@ INSTOBJEXT = @INSTOBJEXT@
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
- && rm -f $@ && $(GENCAT) $@ $*.msg
+ && rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
@@ -105,120 +93,98 @@ all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
-install: install-exec install-data
-install-exec:
+install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
- if test -n "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ $(mkdir_p) $(DESTDIR)$(itlocaledir)
+ if test -n "$(PO_LINGUAS)"; then \
+ linguas="$(PO_LINGUAS)"; \
else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
- fi
- @catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- case "$$cat" in \
- *.gmo) destdir=$(gnulocaledir);; \
- *) destdir=$(localedir);; \
- esac; \
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
- if test -n "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $$dir; \
+ linguas="$(ALL_LINGUAS)"; \
+ fi; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
- if test -r $$cat; then \
- $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
- echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
- echo "installing $(srcdir)/$$cat as" \
- "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
- fi; \
- if test -r $$cat.m; then \
- $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
- echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
- else \
- if test -r $(srcdir)/$$cat.m ; then \
- $(INSTALL_DATA) $(srcdir)/$$cat.m \
- $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
- echo "installing $(srcdir)/$$cat as" \
- "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
- if test "$(PACKAGE)" = "glib"; then \
- if test -n "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
- else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
- fi; \
- $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
- $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
- else \
- : ; \
- fi
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
# Define this as empty until I found a useful application.
installcheck:
uninstall:
- catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
- rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
- rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ if test -n "$(PO_LINGUAS)"; then \
+ linguas="$(PO_LINGUAS)"; \
+ else \
+ linguas="$(ALL_LINGUAS)"; \
+ fi; \
+ for lang in $$linguas; do \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
- if test "$(PACKAGE)" = "glib"; then \
- rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
- fi
check: all $(GETTEXT_PACKAGE).pot
-dvi info tags TAGS ID:
-
mostlyclean:
- rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
- rm -fr *.o
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
- rm -f Makefile Makefile.in POTFILES
- rm -f *.mo *.msg *.cat *.cat.m $(GMOFILES)
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
-distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
- test -f $$file && dists="$$dists $$file"; \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
- || cp -p $(srcdir)/$$file $(distdir); \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
- catalogs='$(CATALOGS)'; \
- for cat in $$catalogs; do \
- cat=`basename $$cat`; \
- lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ if test -n "$(PO_LINGUAS)"; then \
+ linguas="$(PO_LINGUAS)"; \
+ else \
+ linguas="$(ALL_LINGUAS)"; \
+ fi; \
+ for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
@@ -234,28 +200,20 @@ update-po: Makefile
fi; \
fi; \
else \
- echo "msgmerge for $$cat failed!"; \
+ echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
-# POTFILES is created from POTFILES.in by stripping comments, empty lines
-# and Intltool tags (enclosed in square brackets), and appending a full
-# relative path to them
-POTFILES: POTFILES.in
- ( posrcprefix='$(top_srcdir)/'; \
- rm -f $@-t $@ \
- && (sed -e '/^#/d' \
- -e 's/^[[].*] *//' \
- -e '/^[ ]*$$/d' \
- -e "s@^@ $$posrcprefix@" $(srcdir)/$@.in \
- | sed -e '$$!s/$$/ \\/') > $@-t \
- && chmod a-w $@-t \
- && mv $@-t $@ )
-
-Makefile: Makefile.in.in ../config.status POTFILES
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in ../config.status POTFILES.in
cd .. \
- && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
diff --git a/src/boards/python/anim.py b/src/boards/python/anim.py
index 99bb2be..19772c5 100644
--- a/src/boards/python/anim.py
+++ b/src/boards/python/anim.py
@@ -169,6 +169,7 @@ class Gcompris_anim:
self.ANCHOR_SW = 6
self.ANCHOR_S = 7
self.ANCHOR_SE = 8
+ self.ANCHOR_T = 9
self.anchors = { 'LINE': [ self.ANCHOR_SW , self.ANCHOR_NE ],
'RECT': [ self.ANCHOR_N,
@@ -180,7 +181,7 @@ class Gcompris_anim:
self.ANCHOR_W,
self.ANCHOR_NW
],
- 'TEXT': [ self.ANCHOR_N ]
+ 'TEXT': [ self.ANCHOR_T ]
}
self.anchors ['FILL_RECT'] = self.anchors ['RECT']
self.anchors ['CIRCLE'] = self.anchors ['RECT']
@@ -485,7 +486,7 @@ class Gcompris_anim:
if (self.selected == None):
return True
elif (gobject.type_name(self.selected.item_list[0])!="GnomeCanvasText"):
- print "Not Text object when got key !!!"
+ #print "Not Text object when got key !!!"
return True
textItem = self.selected.item_list[0]
@@ -496,15 +497,12 @@ class Gcompris_anim:
if ((keyval == gtk.keysyms.BackSpace) or
(keyval == gtk.keysyms.Delete)):
- print "DEL", oldtext, len(oldtext)
if (len(oldtext) != 1):
newtext = oldtext[:-1]
else:
newtext = u'?'
+ self.last_commit = newtext
else:
-
-
-
if ((oldtext[:1] == u'?') and (len(oldtext)==1)):
oldtext = u' '
oldtext = oldtext.strip()
@@ -521,9 +519,7 @@ class Gcompris_anim:
else:
newtext = oldtext
-
textItem.set(markup=newtext.encode('UTF-8'))
- self.updated_text(textItem)
return True
@@ -1284,7 +1280,6 @@ class Gcompris_anim:
if self.tools[self.current_tool][0] == "TEXT":
- self.updated_text(self.newitem)
(x1, x2, y1, y2) = self.get_bounds(self.newitem)
self.object_set_size_and_pos(self.newitemgroup, x1, x2, y1, y2)
self.select_item(self.newitemgroup)
@@ -1569,6 +1564,13 @@ class Gcompris_anim:
y1= y2,
y2= y2 + self.DEFAULT_ANCHOR_SIZE
)
+ elif anchor_type == self.ANCHOR_T:
+ anchor.set(
+ x1= (x1 + x2 - self.DEFAULT_ANCHOR_SIZE*3)/2,
+ x2= (x1 + x2 + self.DEFAULT_ANCHOR_SIZE*3)/2,
+ y1= y2,
+ y2= y2 + self.DEFAULT_ANCHOR_SIZE
+ )
elif anchor_type == self.ANCHOR_NE:
anchor.set(
x1= x2,
@@ -1630,11 +1632,9 @@ class Gcompris_anim:
return False
if event.state & gtk.gdk.BUTTON1_MASK:
- # warning: anchor is in a group of anchors, wich is in the object group
+ # warning: anchor is in a group of anchors, which is in the object group
parent=item.get_property("parent").get_property("parent")
real_item=parent.item_list[0]
- if gobject.type_name(real_item)=="GnomeCanvasText":
- return
wx=event.x
wy=event.y
@@ -1652,6 +1652,10 @@ class Gcompris_anim:
y1=real_item.get_property("y")
x2=x1+real_item.get_property("width")
y2=y1+real_item.get_property("height")
+ elif gobject.type_name(real_item)=="GnomeCanvasText":
+ y1=y
+ y2=y+real_item.get_property("text_height")
+ pass
else:
x1=real_item.get_property("x1")
y1=real_item.get_property("y1")
@@ -1665,6 +1669,13 @@ class Gcompris_anim:
x2=x2,
y2=y
)
+ elif (anchor_type == self.ANCHOR_T):
+ self.object_set_size_and_pos(parent,
+ x1=x,
+ y1=y1,
+ x2=x,
+ y2=y2
+ )
elif (anchor_type == self.ANCHOR_NE):
self.object_set_size_and_pos(parent,
x1=x1,
@@ -1843,7 +1854,6 @@ class Gcompris_anim:
anchor.set_data('anchor_type', anchor_type)
anchor.connect("event", self.resize_item_event,anchor_type)
-
def select_item(self, group):
if (self.selected != None):
self.unselect()
@@ -1905,15 +1915,6 @@ class Gcompris_anim:
item.get_property("parent").affine_relative(mat)
- def updated_text(self, item):
- #item.set(clip=1)
- #bounds = self.get_bounds(item)
- #print bounds, bounds[2]-bounds[0], bounds[3]-bounds[1]
- #item.set(clip_width=bounds[2]-bounds[0],
- # clip_height=bounds[3]-bounds[1]
- # )
- return
-
###########################################
# Anim 2 specific
###########################################
diff --git a/src/boards/shapegame.c b/src/boards/shapegame.c
index c5326ee..a2c863e 100644
--- a/src/boards/shapegame.c
+++ b/src/boards/shapegame.c
@@ -1601,7 +1601,7 @@ static void create_title(char *name, double x, double y, GtkJustification justif
item = \
gnome_canvas_item_new (GNOME_CANVAS_GROUP(shape_root_item),
gnome_canvas_text_get_type (),
- "text", name,
+ "text", gettext(name),
"font", gc_skin_font_board_medium,
"x", x + 1.0,
"y", y + 1.0,
@@ -1615,7 +1615,7 @@ static void create_title(char *name, double x, double y, GtkJustification justif
item = \
gnome_canvas_item_new (GNOME_CANVAS_GROUP(shape_root_item),
gnome_canvas_text_get_type (),
- "text", name,
+ "text", gettext(name),
"font", gc_skin_font_board_medium,
"x", x,
"y", y,