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-11-05 21:41:05 (GMT)
committer Bruno Coudoin <bcoudoin@src.gnome.org>2006-11-05 21:41:05 (GMT)
commit60aa36cbbd6dbfb77f05e440ddf34b95cb9fa8c0 (patch)
tree4d4c2bfe62e67c70ae09280b51607c00df6c8d0f
parentf0c7fa92180522af832b9cb382750ff16a5a384b (diff)
*** RELEASE 8.2 ***
2006-11-05 Bruno coudoin - Fixed new activation system to work on windows. - Fixed Marathi voices by Anand Kulkarni
-rw-r--r--ChangeLog17
-rw-r--r--README.mingw1
-rw-r--r--boards/sounds/mr/misc/about.ogg (renamed from boards/sounds/mr/geography/about.ogg)bin21686 -> 21686 bytes
-rw-r--r--boards/sounds/mr/misc/configuration.ogg (renamed from boards/sounds/mr/geography/configuration.ogg)bin26847 -> 26847 bytes
-rw-r--r--config.h.mingw.in3
-rw-r--r--configure.in1
-rw-r--r--src/gcompris/gcompris.c33
7 files changed, 37 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 362f0e2..265ccd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+ *** RELEASE 8.2 ***
+
+2006-11-05 Bruno coudoin <bruno.coudoin@free.fr>
+
+ - Fixed new activation system to work on windows.
+ - Fixed Marathi voices by Anand Kulkarni
+
+ * README.mingw:
+ * boards/sounds/mr/geography/about.ogg:
+ * boards/sounds/mr/geography/configuration.ogg:
+ * boards/sounds/mr/misc/about.ogg:
+ * boards/sounds/mr/misc/configuration.ogg:
+ * config.h.mingw.in:
+ * configure.in:
+ * src/gcompris/gcompris.c: (display_activation_dialog),
+ (gc_activation_check), (activation_enter_callback):
+
2006-11-05 Bruno coudoin <bruno.coudoin@free.fr>
- Updated Indian Marathi voices by Anand Kulkarni
diff --git a/README.mingw b/README.mingw
index c96c308..fca1203 100644
--- a/README.mingw
+++ b/README.mingw
@@ -64,7 +64,6 @@ GNUCHESS_TOP := /gnuchess
* Now on the windows system:
* Get a tarball or CVS snapshot of gcompris.
* untar the gcompris-win-prepack.tar.gz in it
-* Manual fix draw.xml to use draw instead of python
* Manual fix, replace chess.c by chess.c.windows
* run: make -f Makefile.mingw from gcompris's top-level directory. This will take a long time.
* run: make -f Makefile.mingw prepack to include all necessary libraries in the installer directory
diff --git a/boards/sounds/mr/geography/about.ogg b/boards/sounds/mr/misc/about.ogg
index 08631a4..08631a4 100644
--- a/boards/sounds/mr/geography/about.ogg
+++ b/boards/sounds/mr/misc/about.ogg
Binary files differ
diff --git a/boards/sounds/mr/geography/configuration.ogg b/boards/sounds/mr/misc/configuration.ogg
index 7bb73d1..7bb73d1 100644
--- a/boards/sounds/mr/geography/configuration.ogg
+++ b/boards/sounds/mr/misc/configuration.ogg
Binary files differ
diff --git a/config.h.mingw.in b/config.h.mingw.in
index fdbbb29..ef8a86f 100644
--- a/config.h.mingw.in
+++ b/config.h.mingw.in
@@ -127,3 +127,6 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
+/* Date at which GCompris has been built */
+#define BUILD_DATE "@BUILD_DATE@"
+
diff --git a/configure.in b/configure.in
index 8b72c5f..ffd26dc 100644
--- a/configure.in
+++ b/configure.in
@@ -124,6 +124,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package name])
BUILD_DATE=`date +%y%m`
AC_DEFINE_UNQUOTED(BUILD_DATE,"$BUILD_DATE", [Date at which GCompris has been built])
+AC_SUBST(BUILD_DATE)
dnl Define myprefix depending on wether our user gives us one or not
if test "x${prefix}" = "xNONE"; then
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index 656c62a..02babbd 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -61,6 +61,7 @@ void gc_terminate(int signum);
* For the Activation dialog
*/
#ifdef WIN32
+int gc_activation_check(char *code);
static void activation_enter_callback(GtkWidget *widget,
GtkWidget *entry );
static void activation_done();
@@ -794,18 +795,11 @@ display_activation_dialog()
{
int board_count = 0;
GList *list;
- guint i=0;
guint key_is_valid = 0;
- while(keycode[i++])
- {
- if(strncmp(properties->key, keycode[i-1], 5) == 0)
- {
- key_is_valid = 1;
- }
- }
+ key_is_valid = gc_activation_check(properties->key);
- if(key_is_valid)
+ if(key_is_valid == 1)
return;
/* Count non menu boards */
@@ -820,7 +814,7 @@ display_activation_dialog()
/* Entry area */
widget_activation_entry = (GtkEntry *)gtk_entry_new();
- gtk_entry_set_max_length(widget_activation_entry, 5);
+ gtk_entry_set_max_length(widget_activation_entry, 6);
activation_item = \
gnome_canvas_item_new (gnome_canvas_root(canvas),
gnome_canvas_widget_get_type (),
@@ -867,25 +861,28 @@ int gc_activation_check(char *code)
{
value |= code[i] & 0x07;
value = value << 3;
- crc1 = crc1 ^ code[i] & 0x07;
+ crc1 = (crc1 ^ code[i]) & 0x07;
}
value = value >> 3;
crc1 = 0x30 | crc1;
crc2 = 0x30 | (code[2] ^ code[3]);
- crc1 != code[4] ? return(-1);
- crc2 != code[5] ? return(-1);
+ if(crc1 != code[4])
+ return(-1);
+
+ if(crc2 != code[5])
+ return(-1);
- codeddate[3] = 0x30 | value & 0x000F;
+ codeddate[3] = 0x30 | (value & 0x000F);
value = value >> 4;
- codeddate[2] = 0x30 | value & 0x0001;
+ codeddate[2] = 0x30 | (value & 0x0001);
value = value >> 1;
- codeddate[1] = 0x30 | value & 0x000F;
+ codeddate[1] = 0x30 | (value & 0x000F);
value = value >> 4;
- codeddate[0] = 0x30 | value & 0x0003;
+ codeddate[0] = 0x30 | (value & 0x0003);
codeddate[4] = '\0';
if(atoi(codeddate) + 200 >= atoi(BUILD_DATE))
@@ -904,6 +901,8 @@ activation_enter_callback( GtkWidget *entry,
switch(gc_activation_check((char *)gtk_entry_get_text(GTK_ENTRY(entry))))
{
case 1:
+ gc_prop_get()->key = strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
+ gc_prop_save(properties);
gtk_entry_set_text(GTK_ENTRY(entry), "GOOD");
break;
case 0: