diff options
author | Bruno Coudoin <bcoudoin@src.gnome.org> | 2004-05-24 22:47:15 (GMT) |
---|---|---|
committer | Bruno Coudoin <bcoudoin@src.gnome.org> | 2004-05-24 22:47:15 (GMT) |
commit | 5ca1a6bc81c6d6905f92fe877e6d26ec0245ff7f (patch) | |
tree | 1e353c376e2be97a4bbc2a374e3d993e4f1c02e2 | |
parent | 7bf0f6107c98598f906de1b6f33e9e6060dd9168 (diff) |
-1- changed austere drawing by a new cute colored one -1- remade to beR_6_0
* boards/boardicons/enumerate.png: -1- changed austere drawing by a new cute colored one
* boards/images/enumerate_background.jpg: -1-
* boards/skins/default/dialogbox.png: remade to be less exantric
* gcompris.spec.in: fixed devel package
* src/boards/menu.c: (menu_pause), (item_event): can be paused now
* src/gcompris/about.c: (gcompris_about_start): fixed layout
* src/gcompris/gameutil.c: (gcompris_add_xml_to_data),
(gcompris_read_xml_file), (gcompris_get_board_from_section),
(gcompris_load_menus), (gcompris_dialog): removed traces. now dialogbox uses richtext canvas.
* src/gcompris/gcompris.c: (board_widget_key_press_callback),
(setup_window), (load_properties), (gcompris_get_properties): -2- sync with the windows version
* src/gcompris/properties.c: (gcompris_properties_new),
(gcompris_properties_save), (read_boards_status): -2-
* src/gcompris/properties.h: -2-
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | boards/boardicons/enumerate.png | bin | 15608 -> 8746 bytes | |||
-rw-r--r-- | boards/images/enumerate_background.jpg | bin | 36447 -> 31979 bytes | |||
-rw-r--r-- | boards/skins/default/dialogbox.png | bin | 76710 -> 15002 bytes | |||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | gcompris.spec.in | 18 | ||||
-rw-r--r-- | src/boards/menu.c | 9 | ||||
-rw-r--r-- | src/gcompris/about.c | 9 | ||||
-rw-r--r-- | src/gcompris/gameutil.c | 51 | ||||
-rw-r--r-- | src/gcompris/gcompris.c | 29 | ||||
-rw-r--r-- | src/gcompris/properties.c | 23 | ||||
-rw-r--r-- | src/gcompris/properties.h | 3 |
12 files changed, 128 insertions, 40 deletions
@@ -1,3 +1,27 @@ +2004-05-25 Bruno coudoin <bruno.coudoin@free.fr> + + * boards/boardicons/enumerate.png: -1- changed austere drawing by a new cute colored one + * boards/images/enumerate_background.jpg: -1- + * boards/skins/default/dialogbox.png: remade to be less exantric + * gcompris.spec.in: fixed devel package + * src/boards/menu.c: (menu_pause), (item_event): can be paused now + * src/gcompris/about.c: (gcompris_about_start): fixed layout + * src/gcompris/gameutil.c: (gcompris_add_xml_to_data), + (gcompris_read_xml_file), (gcompris_get_board_from_section), + (gcompris_load_menus), (gcompris_dialog): removed traces. now dialogbox uses richtext canvas. + * src/gcompris/gcompris.c: (board_widget_key_press_callback), + (setup_window), (load_properties), (gcompris_get_properties): -2- sync with the windows version + * src/gcompris/properties.c: (gcompris_properties_new), + (gcompris_properties_save), (read_boards_status): -2- + * src/gcompris/properties.h: -2- + +2004-05-19 Bruno coudoin <bruno.coudoin@free.fr> + + * src/boards/menu.c: (item_event), (create_info_area): now use a multiline area for the + board description. There is no more need to manually multi line descriptions in the po + files. One more long standing annoying issue. + * src/gcompris/about.c: (gcompris_about_start): fixed layout + 2004-05-18 Bruno coudoin <bruno.coudoin@free.fr> * boards/sounds/fr/geography/alaska.ogg: all .ogg remixed to mono and normalized diff --git a/boards/boardicons/enumerate.png b/boards/boardicons/enumerate.png Binary files differindex 0756f6e..073b881 100644 --- a/boards/boardicons/enumerate.png +++ b/boards/boardicons/enumerate.png diff --git a/boards/images/enumerate_background.jpg b/boards/images/enumerate_background.jpg Binary files differindex 1ae08f4..0cf46b4 100644 --- a/boards/images/enumerate_background.jpg +++ b/boards/images/enumerate_background.jpg diff --git a/boards/skins/default/dialogbox.png b/boards/skins/default/dialogbox.png Binary files differindex 65c6842..1f9ea2e 100644 --- a/boards/skins/default/dialogbox.png +++ b/boards/skins/default/dialogbox.png diff --git a/configure.in b/configure.in index b50503a..a3ec1a2 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/gcompris/gcompris.c) -AM_INIT_AUTOMAKE(gcompris, 6.0PRE1) +AM_INIT_AUTOMAKE(gcompris, 6.0) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff --git a/gcompris.spec.in b/gcompris.spec.in index 0ef59aa..65fdd3b 100644 --- a/gcompris.spec.in +++ b/gcompris.spec.in @@ -65,6 +65,14 @@ Le jeu est inclus dans les icones sous le menu Jeux. A installer si vous avez des enfants utilisant cet ordinateur. +%package devel +Summary: Development package for gcompris +Group: Amusements/Games +Version: %version + +%description devel +Development package for gcompris + %package -n assetml-voices-alphabet-de Summary: Alphabet voices in German Group: Amusements/Games @@ -320,6 +328,8 @@ rm -rf $RPM_BUILD_ROOT %dir %_libdir/%{name}/ %_libdir/%{name}/* +%_libdir/libgcompris-1.so.0.0.0 +%_libdir/libgcompris-1.so.0 %_menudir/* %dir %{prefix}/share/gcompris @@ -340,6 +350,14 @@ rm -rf $RPM_BUILD_ROOT %{prefix}/share/pixmaps/*.png %_infodir/* +%files devel +%dir %_includedir/libgcompris-1.0/libgcompris +%_includedir/libgcompris-1.0/libgcompris/* +%dir %_libdir +%_libdir/libgcompris-1.la +%_libdir/libgcompris-1.so +%_libdir/pkgconfig/libgcompris-1.0.pc + %files -n assetml-voices-alphabet-de %defattr(-, root, root) %{prefix}/share/gcompris/boards/sounds/de/alphabet diff --git a/src/boards/menu.c b/src/boards/menu.c index aa7a514..0f1e9cf 100644 --- a/src/boards/menu.c +++ b/src/boards/menu.c @@ -1,6 +1,6 @@ /* gcompris - menu.c * - * Time-stamp: <2004/05/19 21:05:50 bcoudoin> + * Time-stamp: <2004/05/24 02:14:02 bcoudoin> * * Copyright (C) 2000 Bruno Coudoin * @@ -38,6 +38,7 @@ static GList *item_list = NULL; static GcomprisBoard *gcomprisBoard = NULL; +static gboolean board_paused = TRUE; /* Hash table of all displayed images */ static GHashTable *menu_table= NULL; @@ -117,6 +118,7 @@ static void menu_pause (gboolean pause) if(gcomprisBoard==NULL) return; + board_paused = pause; } /* @@ -191,7 +193,7 @@ menu_end () boardRootItem=NULL; } -static gboolean +gboolean menu_is_our_board (GcomprisBoard *gcomprisBoard) { if (gcomprisBoard) @@ -407,6 +409,9 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, MenuItem *menuitem) GtkTextBuffer *buffer; GtkTextTag *txt_tag; + if(board_paused) + return FALSE; + switch (event->type) { case GDK_ENTER_NOTIFY: diff --git a/src/gcompris/about.c b/src/gcompris/about.c index e8f5e70..f0058cd 100644 --- a/src/gcompris/about.c +++ b/src/gcompris/about.c @@ -1,6 +1,6 @@ /* gcompris - about.c * - * Time-stamp: <2004/05/19 21:28:25 bcoudoin> + * Time-stamp: <2004/05/19 23:22:02 bcoudoin> * * Copyright (C) 2000 Bruno Coudoin * @@ -26,6 +26,11 @@ #include "gcompris.h" #include "about.h" +#if defined _WIN32 || defined __WIN32__ +# undef WIN32 /* avoid warning on mingw32 */ +# define WIN32 +#endif + static GnomeCanvasItem *rootitem = NULL; static GnomeCanvasItem *plane_item = NULL; static GdkPixbuf *pixmap_about = NULL; @@ -253,6 +258,7 @@ void gcompris_about_start () NULL); // GCompris HELP +#ifndef WIN32 pixmap = gcompris_load_skin_pixmap("button_large.png"); item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(rootitem), gnome_canvas_pixbuf_get_type (), @@ -285,6 +291,7 @@ void gcompris_about_start () gtk_signal_connect(GTK_OBJECT(item2), "event", (GtkSignalFunc) gcompris_item_event_focus, item); +#endif // OK pixmap = gcompris_load_skin_pixmap("button_large.png"); diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c index cd98010..38257b6 100644 --- a/src/gcompris/gameutil.c +++ b/src/gcompris/gameutil.c @@ -1,6 +1,6 @@ /* gcompris - gameutil.c * - * Time-stamp: <2004/05/16 23:08:46 bcoudoin> + * Time-stamp: <2004/05/24 23:22:05 bcoudoin> * * Copyright (C) 2000 Bruno Coudoin * @@ -309,8 +309,6 @@ static void gcompris_add_xml_to_data(xmlDocPtr doc, xmlNodePtr xmlnode, GNode * child, GcomprisBoard *gcomprisBoard) { - g_message("gcompris_add_xml_to_data xmlnode->name=%s\n", xmlnode->name); - if(/* if the node has no name */ !xmlnode->name || /* or if the name is not "Board" */ @@ -461,8 +459,6 @@ GcomprisBoard *gcompris_read_xml_file(GcomprisBoard *gcomprisBoard, char *fname) g_return_val_if_fail(fname!=NULL,FALSE); - g_message("gcompris_read_xml_file for %s\n", fname); - filename = g_strdup(fname); /* if the file doesn't exist */ @@ -512,7 +508,6 @@ GcomprisBoard *gcompris_read_xml_file(GcomprisBoard *gcomprisBoard, char *fname) xmlFreeDoc(doc); /* Store the file that belong to this board for trace and further need */ - g_message("gcompris_read_xml_file for %s found name %s\n", fname, gcomprisBoard->name); gcomprisBoard->filename=filename; gcomprisBoard->board_ready=FALSE; gcomprisBoard->canvas=canvas; @@ -534,19 +529,14 @@ GcomprisBoard *gcompris_get_board_from_section(gchar *section) { GList *list = NULL; - printf("gcompris_get_board_from_section(%s)\n", section); for(list = boards_list; list != NULL; list = list->next) { GcomprisBoard *board = list->data; - printf(" gcompris_get_board_from_section(%s) looking for board->name=%s board->section=%s\n", - section, board->name, board->section); if( board->section && (strcmp (board->section, section) == 0)) { - printf(" gcompris_get_board_from_section(%s) FOUND IT: board->name=%s\n", section, board->name); return board; } } - printf("gcompris_get_board_from_section(%s): Section not found\n", section); return NULL; } @@ -644,8 +634,6 @@ void gcompris_load_menus() continue; } - g_message("gcompris_load_menus is parsing file %s", filename); - if(selectMenuXML(one_dirent->d_name)) { gcomprisBoard = g_malloc (sizeof (GcomprisBoard)); @@ -751,8 +739,9 @@ void gcompris_dialog(gchar *str, DialogBoxCallBack dbcb) GnomeCanvasItem *item_dialog = NULL; GnomeCanvasItem *item_text = NULL; GdkPixbuf *pixmap_dialog = NULL; - GtkWidget *gtktext; - GdkFont *gdk_font; + GtkTextIter iter_start, iter_end; + GtkTextBuffer *buffer; + GtkTextTag *txt_tag; /* If we already running delete the previous one */ if(rootDialogItem) @@ -787,17 +776,33 @@ void gcompris_dialog(gchar *str, DialogBoxCallBack dbcb) dbcb); item_text = gnome_canvas_item_new (rootDialogItem, - gnome_canvas_text_get_type (), + gnome_canvas_rich_text_get_type (), + "x", (double) BOARDWIDTH/2, + "y", (double) 100.0, + "width", (double)BOARDWIDTH-260.0, + "height", 400.0, + "anchor", GTK_ANCHOR_NORTH, + "justification", GTK_JUSTIFY_CENTER, + "grow_height", FALSE, + "cursor_visible", FALSE, + "cursor_blink", FALSE, + "editable", FALSE, + NULL); + + gnome_canvas_item_set (item_text, "text", str, - "font", gcompris_skin_font_subtitle, - "x", (double) (BOARDWIDTH/2), - "y", (double) (BOARDHEIGHT - gdk_pixbuf_get_height(pixmap_dialog))/2 + - 100, - "anchor", GTK_ANCHOR_NORTH, - "fill_color", "white", - "justification", GTK_JUSTIFY_CENTER, NULL); + buffer = gnome_canvas_rich_text_get_buffer(GNOME_CANVAS_RICH_TEXT(item_text)); + txt_tag = gtk_text_buffer_create_tag(buffer, NULL, + "font", gcompris_skin_font_board_medium, + "foreground", "blue", + "family-set", TRUE, + NULL); + gtk_text_buffer_get_end_iter(buffer, &iter_end); + gtk_text_buffer_get_start_iter(buffer, &iter_start); + gtk_text_buffer_apply_tag(buffer, txt_tag, &iter_start, &iter_end); + gtk_signal_connect(GTK_OBJECT(item_text), "event", (GtkSignalFunc) item_event_ok, dbcb); diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c index 4df5fc9..128108a 100644 --- a/src/gcompris/gcompris.c +++ b/src/gcompris/gcompris.c @@ -1,6 +1,6 @@ /* gcompris - gcompris.c * - * Time-stamp: <2004/05/19 00:47:39 bcoudoin> + * Time-stamp: <2004/05/24 02:35:38 bcoudoin> * * Copyright (C) 2000-2003 Bruno Coudoin * @@ -115,6 +115,21 @@ board_widget_key_press_callback (GtkWidget *widget, return TRUE; } + if(event->state & GDK_CONTROL_MASK && ((event->keyval == GDK_p) + || (event->keyval == GDK_P))) { + properties->key="thanks_for_your_help"; + gcompris_properties_save(properties); + gcompris_load_menus(); + + /* Remove any dialog box */ + gcompris_help_stop(); + gcompris_config_stop(); + gcompris_about_stop(); + + board_stop(); + return TRUE; + } + if(event->state & GDK_CONTROL_MASK && ((event->keyval == GDK_q) || (event->keyval == GDK_Q))) { gcompris_exit(); @@ -469,6 +484,13 @@ static void setup_window () board_play (gcomprisBoardMenu); init_background(); + +#ifdef WIN32 + if(strncmp(properties->key, "thanks_for_your_help", 20)!=0) { + board_pause(); + gcompris_dialog(_("This is a Demo version of gcompris,\nonly 12 on 45 activities are available.\nTo get the full version,\ngo to http://ofset.sf.net/gcompris/order.html"), NULL); + } +#endif } void gcompris_end_board() @@ -509,6 +531,11 @@ static void load_properties () gcompris_skin_load(properties->skin); } +GcomprisProperties *gcompris_get_properties () +{ + return (properties); +} + /* * This returns the locale for which text must be displayed * diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c index 6420153..950bece 100644 --- a/src/gcompris/properties.c +++ b/src/gcompris/properties.c @@ -1,6 +1,6 @@ /* gcompris - properties.c * - * Time-stamp: <2004/05/19 01:17:29 bcoudoin> + * Time-stamp: <2004/05/20 02:17:31 bcoudoin> * * Copyright (C) 2000,2003 Bruno Coudoin * @@ -26,9 +26,7 @@ #include "gcompris.h" -GcomprisProperties *properties; - -GHashTable* boards_hash = NULL; +static GHashTable* boards_hash = NULL; void read_boards_status(); void write_boards_status(); @@ -43,11 +41,6 @@ void write_boards_status(); # include <windows.h> #endif -GcomprisProperties *gcompris_get_properties () -{ - return (properties); -} - /* * return 1 if parsing OK, 0 otherwise * the return value is returned in retval @@ -97,6 +90,7 @@ GcomprisProperties *gcompris_properties_new () tmp->fullscreen = 1; tmp->timer = 1; tmp->skin = "default"; + tmp->key = "default"; tmp->locale = NULL; home_dir = g_get_home_dir(); @@ -154,6 +148,10 @@ GcomprisProperties *gcompris_properties_new () tmp->locale = scan_get_string(scanner); if(!tmp->locale) g_warning("Config file parsing error on token %s", token); + } else if(!strcmp(value.v_identifier, "key")) { + tmp->key = scan_get_string(scanner); + if(!tmp->key) + g_warning("Config file parsing error on token %s", token); } break; } @@ -248,8 +246,9 @@ void gcompris_properties_save (GcomprisProperties *props) fprintf(filefd, "%s=%d\n", "fullscreen", props->fullscreen); fprintf(filefd, "%s=%d\n", "timer", props->timer); - fprintf(filefd, "%s=\"%s\"\n", "skin", props->skin); - fprintf(filefd, "%s=\"%s\"\n", "locale", props->locale); + fprintf(filefd, "%s=\"%s\"\n", "skin", props->skin); + fprintf(filefd, "%s=\"%s\"\n", "locale", props->locale); + fprintf(filefd, "%s=\"%s\"\n", "key", props->key); fclose(filefd); } @@ -305,6 +304,8 @@ void read_boards_status() GScanner *scanner; int filefd; + home_dir = g_get_home_dir(); + if(home_dir==NULL) { config_file = g_strdup("gcompris_boards.cfg"); } else { diff --git a/src/gcompris/properties.h b/src/gcompris/properties.h index 7a3f320..3fb8930 100644 --- a/src/gcompris/properties.h +++ b/src/gcompris/properties.h @@ -1,6 +1,6 @@ /* gcompris - properties.h * - * Time-stamp: <2004/05/08 01:01:37 bcoudoin> + * Time-stamp: <2004/05/20 01:07:31 bcoudoin> * * Copyright (C) 2000 Bruno Coudoin * @@ -33,6 +33,7 @@ typedef struct { gint difficulty_filter; gchar *locale; gchar *skin; + gchar *key; } GcomprisProperties; GcomprisProperties *gcompris_get_properties (void); |