diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | Makefile.mingw.in | 3 | ||||
-rw-r--r-- | config.h.mingw.in | 2 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | po/POTFILES.in | 1 | ||||
-rw-r--r-- | src/gcompris/Makefile.mingw | 13 | ||||
-rw-r--r-- | src/gcompris/about.c | 112 | ||||
-rw-r--r-- | src/gcompris/properties.c | 12 |
8 files changed, 87 insertions, 69 deletions
@@ -1,3 +1,14 @@ +2007-06-12 Bruno coudoin <bruno.coudoin@free.fr> + + * Makefile.mingw.in: added support for gstreamer compilation, untested + * config.h.mingw.in: updated to compile on windows + * po/POTFILES.in: removed deprecated src/boards/draw.c + * src/gcompris/Makefile.mingw: + * src/gcompris/about.c: (gc_about_start): now the sponsor logo if any replaces + the fsf one. + * src/gcompris/properties.c: (gc_prop_load): added support for user_dir and config_dir + in the config file to make GCompris portable. + 2007-06-09 Bruno coudoin <bruno.coudoin@free.fr> - Added the support for a system configuration file which is diff --git a/Makefile.mingw.in b/Makefile.mingw.in index 697540a..b9a12fcb4 100644 --- a/Makefile.mingw.in +++ b/Makefile.mingw.in @@ -131,6 +131,7 @@ clean: # prep: mkdir $(GCOMPRIS_INSTALL_DIR) + mkdir -p $(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards cd boards ; tar cf - --exclude "Makefile.in" --exclude "*.in" --exclude "*~" --exclude "Makefile" --exclude "Makefile.am" --exclude .svn --exclude .xvpics * | ( cd ../$(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards ; tar xf -) ; cd .. ; @echo "-------------------------------------------------------------------------------" @@ -146,4 +147,4 @@ prep: @echo remove tuxpaint activity rm -f $(GCOMPRIS_INSTALL_DIR)/share/$(pkgdatadir)/boards/tuxpaint.xml @echo "Create the file gcompris-win-prepack.tar.gz" - tar --exclude "Makefile.in" --exclude "*.in" --exclude "*~" --exclude "Makefile" --exclude "Makefile.am" --exclude .svn --exclude .xvpics -czf gcompris-win-prepack.tar.gz win32-install-dir nsis tools + tar --exclude "Makefile.in" --exclude "*.in" --exclude "*~" --exclude "Makefile" --exclude "Makefile.am" --exclude .svn --exclude .xvpics -czf gcompris-win-prepack.tar.gz win32-install-dir nsis tools Makefile.mingw config.h.mingw diff --git a/config.h.mingw.in b/config.h.mingw.in index dd4a60a..c8251f3 100644 --- a/config.h.mingw.in +++ b/config.h.mingw.in @@ -110,7 +110,7 @@ #define PACKAGE_LOCALE_DIR "share/locale" /* System GCompris config directory */ -#define SYSTEM_CONFIG_DIR . +#define SYSTEM_CONFIG_DIR "." /* Define to the full name of this package. */ #define PACKAGE_NAME "" diff --git a/configure.in b/configure.in index f26ece8..d1a19de 100644 --- a/configure.in +++ b/configure.in @@ -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, 8.3.1) +AM_INIT_AUTOMAKE(gcompris, 8.4BETA1) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff --git a/po/POTFILES.in b/po/POTFILES.in index ce9639b..7642e8c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -220,7 +220,6 @@ src/boards/click_on_letter.c src/boards/clickgame.c src/boards/clockgame.c src/boards/colors.c -src/boards/draw.c src/boards/enumerate.c src/boards/erase.c src/boards/fifteen.c diff --git a/src/gcompris/Makefile.mingw b/src/gcompris/Makefile.mingw index 53eca67..446bd02 100644 --- a/src/gcompris/Makefile.mingw +++ b/src/gcompris/Makefile.mingw @@ -13,7 +13,7 @@ GTK_TOP := /gtk GLIB_TOP := /glib GNUWIN32_TOP := /gnuwin32 LIBXML2_TOP := /libxml2 -SDL_TOP := /sdl +GSTREAMER_TOP := /gstreamer CANVAS_TOP := /gnomecanvas PYTHON_TOP := /c/Python24 CAIRO_TOP := /cairo @@ -61,7 +61,7 @@ INCLUDE_PATHS += -I$(INCLUDE_DIR) \ -I$(GTK_TOP)/include/atk-1.0 \ -I$(GTK_TOP)/include/libart-2.0 \ -I$(GTK_TOP)/include/freetype2 \ - -I$(SDL_TOP)/include/SDL \ + -I$(GSTREAME_TOP)/include/gstreamer-0.10 \ -I$(LIBXML2_TOP)/include \ -I$(GNUWIN32_TOP)/include \ -I$(CAIRO_TOP)/include/cairo \ @@ -74,7 +74,7 @@ LIB_PATHS = -L$(GTK_TOP)/lib \ -L$(GLIB_TOP)/lib \ -L$(LIBXML2_TOP)/lib \ -L$(GNUWIN32_TOP)/lib \ - -L$(SDL_TOP)/lib \ + -L$(GSTREAMER_TOP)/lib \ -L$(CANVAS_TOP)/lib \ -L$(PYTHON_TOP)/libs \ -L$(SQLITE_TOP) \ @@ -113,7 +113,6 @@ EXE_C_SRC = \ profile.c \ properties.c \ score.c \ - sdlplayer.c \ skin.c \ soundutil.c \ timer.c \ @@ -132,18 +131,14 @@ EXE_LIBS = ../boards/libboards.a \ -latk-1.0 \ -lpango-1.0 \ -lglib-2.0 \ - -lgthread-2.0 \ -lgdk-win32-2.0 \ -lgobject-2.0 \ -lintl \ -lgmodule-2.0 \ -lgdk_pixbuf-2.0 \ -lws2_32 \ - -lpopt \ -lxml2 \ - -lSDLmain -lSDL -lSDL_mixer \ - -lgnomecanvas-2 \ - -lart_lgpl_2 \ + -lgstreamer-2.0 \ -lpangoft2-1.0 \ -liconv \ -lpython24 \ diff --git a/src/gcompris/about.c b/src/gcompris/about.c index 9428683..dd1e556 100644 --- a/src/gcompris/about.c +++ b/src/gcompris/about.c @@ -156,25 +156,62 @@ void gc_about_start () NULL); y_start += 40; - // FSF Reference - pixmap = gc_skin_pixmap_load("fsflogo.png"); - item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), - gnome_canvas_pixbuf_get_type (), - "pixbuf", pixmap, - "x", (double) (BOARDWIDTH*0.8) - gdk_pixbuf_get_width(pixmap)/2, - "y", (double) y_start - gdk_pixbuf_get_height(pixmap)/2, - NULL); - gdk_pixbuf_unref(pixmap); + /* Location for a potential sponsor */ + gchar *sponsor_image = gc_file_find_absolute("sponsor.png"); + if(sponsor_image) + { + pixmap = gc_pixmap_load("sponsor.png"); + gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), + gnome_canvas_text_get_type (), + "text", "Version parrainée par", + "font", gc_skin_font_content, + "x", (double) BOARDWIDTH*0.75, + "y", (double) y_start - gdk_pixbuf_get_height(pixmap), + "anchor", GTK_ANCHOR_CENTER, + "fill_color_rgba", gc_skin_color_content, + NULL); + gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), + gnome_canvas_text_get_type (), + "text", "Version parrainée par", + "font", gc_skin_font_content, + "x", (double) BOARDWIDTH*0.75 + 1, + "y", (double) y_start - gdk_pixbuf_get_height(pixmap), + "anchor", GTK_ANCHOR_CENTER, + "fill_color", "black", + NULL); - item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), - gnome_canvas_text_get_type (), - "text", "Free Software Foundation\nhttp://www.fsf.org", - "font", gc_skin_font_content, - "x", (double) (BOARDWIDTH*0.75), - "y", (double) y_start + 80, - "anchor", GTK_ANCHOR_CENTER, - "fill_color_rgba", gc_skin_color_subtitle, - NULL); + item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), + gnome_canvas_pixbuf_get_type (), + "pixbuf", pixmap, + "x", (double) (BOARDWIDTH*0.75) - gdk_pixbuf_get_width(pixmap)/2, + "y", (double) y_start - gdk_pixbuf_get_height(pixmap) + 15, + NULL); + + gdk_pixbuf_unref(pixmap); + g_free(sponsor_image); + } + else + { + // Default sponsor is the FSF + pixmap = gc_skin_pixmap_load("fsflogo.png"); + item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), + gnome_canvas_pixbuf_get_type (), + "pixbuf", pixmap, + "x", (double) (BOARDWIDTH*0.8) - gdk_pixbuf_get_width(pixmap)/2, + "y", (double) y_start - gdk_pixbuf_get_height(pixmap)/2, + NULL); + gdk_pixbuf_unref(pixmap); + + item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), + gnome_canvas_text_get_type (), + "text", "Free Software Foundation\nhttp://www.fsf.org", + "font", gc_skin_font_content, + "x", (double) (BOARDWIDTH*0.75), + "y", (double) y_start + 80, + "anchor", GTK_ANCHOR_CENTER, + "fill_color_rgba", gc_skin_color_subtitle, + NULL); + } // GCompris Reference y_start += 80; @@ -182,7 +219,7 @@ void gc_about_start () item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), gnome_canvas_pixbuf_get_type (), "pixbuf", pixmap, - "x", (double) (BOARDWIDTH*0.3) - gdk_pixbuf_get_width(pixmap)/2 -50, + "x", (double) (BOARDWIDTH*0.3) - gdk_pixbuf_get_width(pixmap)/2, "y", (double) y_start - gdk_pixbuf_get_height(pixmap)/2, NULL); @@ -220,41 +257,6 @@ void gc_about_start () "fill_color_rgba", gc_skin_color_content, NULL); - /* Location for a potential sponsor */ - gchar *sponsor_image = gc_file_find_absolute("sponsor.png"); - if(sponsor_image) - { - gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), - gnome_canvas_text_get_type (), - "text", "Version parrainée par", - "font", gc_skin_font_content, - "x", (double) BOARDWIDTH*0.85, - "y", (double) 10, - "anchor", GTK_ANCHOR_CENTER, - "fill_color_rgba", gc_skin_color_content, - NULL); - gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), - gnome_canvas_text_get_type (), - "text", "Version parrainée par", - "font", gc_skin_font_content, - "x", (double) BOARDWIDTH*0.85 + 1, - "y", (double) 10, - "anchor", GTK_ANCHOR_CENTER, - "fill_color", "black", - NULL); - - pixmap = gc_pixmap_load("sponsor.png"); - 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 = gc_skin_pixmap_load("button_large.png"); item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), @@ -311,7 +313,7 @@ void gc_about_start () "x", (double) plane_x, "y", (double) plane_y, NULL); - move_plane_id = gtk_timeout_add (500, + move_plane_id = gtk_timeout_add (300, (GtkFunction) move_plane, NULL); x_start += 150; diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c index 9b309ae..b457146 100644 --- a/src/gcompris/properties.c +++ b/src/gcompris/properties.c @@ -412,10 +412,20 @@ gc_prop_load (GcomprisProperties *props, GCPropSourceConf source_conf) if(!scan_get_int(scanner, &props->filter_style)) g_warning("Config file parsing error on token %s", token); } else if(!strcmp(value.v_identifier, "skin")) { - g_free(props->skin); + g_free(props->skin); props->skin = scan_get_string(scanner); if(!props->skin) g_warning("Config file parsing error on token %s", token); + } else if(!strcmp(value.v_identifier, "user_dir")) { + g_free(props->user_dir); + props->user_dir = scan_get_string(scanner); + if(!props->user_dir) + g_warning("Config file parsing error on token %s", token); + } else if(!strcmp(value.v_identifier, "config_dir")) { + g_free(props->config_dir); + props->config_dir = scan_get_string(scanner); + if(!props->config_dir) + g_warning("Config file parsing error on token %s", token); } else if(!strcmp(value.v_identifier, "locale")) { props->locale = scan_get_string(scanner); if(!props->locale) |