Commit 14b11116 authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

HEAD is not 7.1

	* configure.in: HEAD is not 7.1
	* gcompris.spec.in:
	* src/boards/python/pythontest.py: (preparing a board with my son Clement)
	* src/gcompris/Makefile.am:
	* src/gcompris/about.c: (gcompris_about_start): added support for an optional
	                                                icon sponsor
	* src/gcompris/properties.c: (gcompris_properties_save): no more save difficulty
	* src/gcompris/sdlplayer.c: (sdlplayer_quit), (sdlplayer): removed warnings
parent 1c283916
2005-09-21 Bruno coudoin <bruno.coudoin@free.fr>
* configure.in: HEAD is not 7.1
* gcompris.spec.in:
* src/boards/python/pythontest.py: (preparing a board with my son Clement)
* src/gcompris/Makefile.am:
* src/gcompris/about.c: (gcompris_about_start): added support for an optional
icon sponsor
* src/gcompris/properties.c: (gcompris_properties_save): no more save difficulty
* src/gcompris/sdlplayer.c: (sdlplayer_quit), (sdlplayer): removed warnings
2005-09-21 Yves Combe <yves@ycombe.net>
pass text colors for menu into skin (Franck Doucet need it).
......
......@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/gcompris/gcompris.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(gcompris, 7.0.1)
AM_INIT_AUTOMAKE(gcompris, 7.1.0)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
......@@ -142,6 +142,8 @@ AC_ARG_ENABLE(debug,
if test "x$USE_DEBUG" == "xyes" ; then
AC_DEFINE_UNQUOTED(DEBUG, 1, "Enable debug messages.")
CFLAGS="$CFLAGS -Wall -g"
else
CFLAGS="$CFLAGS -Wall"
fi
dnl WIN32 Specifics
......
......@@ -15,15 +15,16 @@ Group: Games/Other
Source: ftp://gcompris.sourceforge.net/gcompris-%{PACKAGE_VERSION}.tar.gz
BuildRoot: %_tmppath/%name-%version-buildroot
Buildrequires: gnuchess
Buildrequires: libxml2-devel libgnomeui2-devel
Buildrequires: libxml2-devel libgnomeui2-devel libsqlite3_0-devel
Buildrequires: texinfo
# (misc) needed for python support
Buildrequires: gnome-python python-devel pygtk2.0-devel
Buildrequires: gnome-python python-devel pygtk2.0-devel
Requires: gnome-libs libxml2 gdk-pixbuf %canvaspackage %canvaslib >= 2.3.6
Requires: gnuchess >= 5.02
Requires: @REQUIRE_PYTHON@
Requires: assetml-flags
Requires: libSDL_mixer1.2
Requires: libsqlite3_0 python-sqlite2
Packager: Bruno Coudoin <bcoudoin.coudoin@free.fr>
URL: http://ofset.sf.net/gcompris
......
......@@ -7,13 +7,15 @@ import gcompris.skin
import gcompris.admin
import gtk
import gtk.gdk
import random
from gcompris import gcompris_gettext as _
class Gcompris_pythontest:
"""Testing gcompris python class"""
def __init__(self, gcomprisBoard):
def __init__(self, gcomprisBoard):
self.gcomprisBoard = gcomprisBoard
self.canvasitems = {}
......@@ -32,6 +34,9 @@ class Gcompris_pythontest:
self.movingline='none'
# Find a number game
self.solution = random.randint(0,9)
print("Gcompris_pythontest __init__.")
#initialisation to default values. Some of them will be replaced by
......@@ -47,7 +52,7 @@ class Gcompris_pythontest:
print wordlist.locale
print wordlist.description
print wordlist.words
print gcompris.get_current_user_dirname()
print gcompris.get_current_board_dirname()
......@@ -259,6 +264,32 @@ class Gcompris_pythontest:
def key_press(self, keyval, commit_str, preedit_str):
print("Gcompris_pythontest key press. %i %s" % (keyval, str))
if (keyval == gtk.keysyms.KP_0):
keyval= gtk.keysyms._0
if (keyval == gtk.keysyms.KP_1):
keyval= gtk.keysyms._1
if (keyval == gtk.keysyms.KP_2):
keyval= gtk.keysyms._2
if (keyval == gtk.keysyms.KP_2):
keyval= gtk.keysyms._2
if (keyval == gtk.keysyms.KP_3):
keyval= gtk.keysyms._3
if (keyval == gtk.keysyms.KP_4):
keyval= gtk.keysyms._4
if (keyval == gtk.keysyms.KP_5):
keyval= gtk.keysyms._5
if (keyval == gtk.keysyms.KP_6):
keyval= gtk.keysyms._6
if (keyval == gtk.keysyms.KP_7):
keyval= gtk.keysyms._7
if (keyval == gtk.keysyms.KP_8):
keyval= gtk.keysyms._8
if (keyval == gtk.keysyms.KP_9):
keyval= gtk.keysyms._9
utf8char = gtk.gdk.keyval_to_unicode(keyval)
strn = u'%c' % utf8char
win = False
if (keyval == gtk.keysyms.Shift_L):
......@@ -304,6 +335,12 @@ class Gcompris_pythontest:
self.canvasitems[7].set(text="Speed="+str(self.timerinc)+" ms")
# Find a number game
if str(self.solution) == strn:
print "WIN"
else:
print "LOST"
# Return True if you did process a key
# Return False if you did not processed a key
# (gtk need to send it to next widget)
......
......@@ -90,9 +90,9 @@ libgcomprisinclude_HEADERS = \
bonus.h \
cursor.h \
gameutil.h \
gcompris.h
gcompris.h \
gcompris-board.h \
board_config.h
board_config.h \
gcompris_config.h \
gcompris_db.h \
gcompris_im.h \
......
/* gcompris - about.c
*
* Time-stamp: <2005/09/08 22:31:34 bruno>
* Time-stamp: <2005/09/20 00:12:28 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -238,6 +238,41 @@ void gcompris_about_start ()
"fill_color_rgba", gcompris_skin_color_content,
NULL);
/* Location for a potential sponsor */
gchar *sponsor_image = gcompris_find_absolute_filename("sponsor.png");
if(sponsor_image)
{
gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
"text", "Version parrainée par",
"font", gcompris_skin_font_content,
"x", (double) BOARDWIDTH*0.85,
"y", (double) 10,
"anchor", GTK_ANCHOR_CENTER,
"fill_color_rgba", gcompris_skin_color_content,
NULL);
gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_text_get_type (),
"text", "Version parrainée par",
"font", gcompris_skin_font_content,
"x", (double) BOARDWIDTH*0.85 + 1,
"y", (double) 10,
"anchor", GTK_ANCHOR_CENTER,
"fill_color", "black",
NULL);
pixmap = gcompris_load_pixmap(sponsor_image);
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
"x", (double) (BOARDWIDTH*0.85) - gdk_pixbuf_get_width(pixmap)/2,
"y", (double) 15,
NULL);
gdk_pixbuf_unref(pixmap);
g_free(sponsor_image);
}
// OK
pixmap = gcompris_load_skin_pixmap("button_large.png");
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem),
......
/* gcompris - properties.c
*
* Time-stamp: <2005/09/18 18:00:12 bruno>
* Time-stamp: <2005/09/19 22:08:44 bruno>
*
* Copyright (C) 2000,2003 Bruno Coudoin
*
......@@ -336,9 +336,12 @@ void gcompris_properties_save (GcomprisProperties *props)
*
fprintf(filefd, "%s=%d\n", "noxrandr", props->noxrandr); */
fprintf(filefd, "%s=%d\n", "timer", props->timer);
fprintf(filefd, "%s=%d\n", "difficulty_filter", props->difficulty_filter);
fprintf(filefd, "%s=%d\n", "filter_style", props->filter_style);
/* No more need to persist these, it's in the base now
fprintf(filefd, "%s=%d\n", "difficulty_filter", props->difficulty_filter);
fprintf(filefd, "%s=%d\n", "filter_style", props->filter_style);
*/
fprintf(filefd, "%s=\"%s\"\n", "skin", props->skin);
fprintf(filefd, "%s=\"%s\"\n", "locale", props->locale);
fprintf(filefd, "%s=\"%s\"\n", "key", props->key);
......
......@@ -99,6 +99,8 @@ int sdlplayer_quit(Mix_Music *music)
Mix_CloseAudio();
printf("SDL PLAYER SDL_Quit\n");
SDL_Quit();
return 0;
}
int sdlplayer_bg(char *filename, int volume)
......@@ -143,7 +145,7 @@ int sdlplayer(char *filename, int volume)
Mix_VolumeChunk(sample, MIX_MAX_VOLUME);
if(channel=Mix_PlayChannel(-1, sample, 0)==-1) {
if((channel=Mix_PlayChannel(-1, sample, 0))==-1) {
return(cleanExit("Mix_LoadChannel(0x%p,1)",channel));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment