Commit 2904455a authored by Bruno Coudoin's avatar Bruno Coudoin

*** RELEASE 8.0BETA6 ***

	- Fixed clickgame and chess on windows (uses the old chess.c code)
	- chess on linux updated to use the new glib API
	- More GC API fix:
	  board_pause now gc_board_pause
	  board_play now gc_board_play
	  board_stop now gc_board_stop
parent 4b953d15
*** RELEASE 8.0BETA6 ***
2006-09-18 Bruno coudoin <bruno.coudoin@free.fr>
- Fixed clickgame and chess on windows (uses the old chess.c code)
- chess on linux updated to use the new glib API
- More GC API fix:
board_pause now gc_board_pause
board_play now gc_board_play
board_stop now gc_board_stop
* Makefile.am:
* Makefile.mingw:
* README.mingw:
* config.h.mingw:
* configure.in:
* gcompris-installer.nsi.in:
* src/boards/chess.c: (gnuchess_died), (start_board), (end_board),
(chess_create_item), (engine_local_destroy), (engine_local_cb),
(engine_local_err_cb), (start_child), (write_child):
* src/boards/click_on_letter.c: (sounds_are_fine):
* src/boards/memory.c: (start_board):
* src/boards/menu2.c: (menu_start), (create_panel),
(display_section), (display_board_icon), (next_spot),
(menu_create_item), (item_event), (set_content), (get_ratio),
(create_top), (display_welcome):
* src/boards/planegame.c: (key_press), (planegame_next_level),
(planegame_cloud_colision), (planegame_move_item),
(planegame_destroy_items), (planegame_destroy_all_items),
(planegame_create_item), (planegame_add_new_item), (item_event):
* src/boards/py-gcompris-board.c: (pyGcomprisBoardType_getattr),
(pyGcomprisBoardType_setattr):
* src/boards/shapegame.c: (item_event):
* src/boards/submarine.c: (quit_after_delay):
* src/gcompris/about.c: (gc_about_start), (gc_about_stop):
* src/gcompris/bar.c: (item_event_bar):
* src/gcompris/board.c: (init_plugins), (gc_board_check_file),
(gc_board_play), (gc_board_pause), (gc_board_stop),
(get_board_playing), (board_run_next_end), (board_run_next):
* src/gcompris/board.h:
* src/gcompris/bonus.c: (gc_bonus_end_display), (gc_bonus_display),
(end_bonus):
* src/gcompris/config.c: (gc_config_start), (gc_config_stop):
* src/gcompris/dialog.c: (gc_dialog), (item_event_ok):
* src/gcompris/file_selector.c: (gc_selector_file_stop),
(display_file_selector):
* src/gcompris/gcompris.c: (board_widget_key_press_callback),
(setup_window), (gc_board_end), (cleanup):
* src/gcompris/gcompris_confirm.c: (gc_confirm_box_stop),
(display_confirm):
* src/gcompris/help.c: (gc_help_start), (gc_help_stop):
* src/gcompris/images_selector.c: (gc_selector_images_start),
(gc_selector_images_stop):
* src/gcompris/menu.c: (_add_xml_to_data), (_read_xml_file),
(gc_menu_section_get), (gc_menu_has_activity), (gc_menu_getlist),
(gc_menu_load_dir), (gc_menu_load):
2006-09-17 Bruno coudoin <bruno.coudoin@free.fr>
- Minor resizing of some icons do make them appear smother
......
......@@ -30,7 +30,7 @@ EXTRA_DIST = \
intltool-update.in \
gnome2-macros \
README.mingw README.translators README.windows \
config.h.mingw.in Makefile.mingw global_win32.mak gcompris.ico gcompris-uninstall.ico \
config.h.mingw Makefile.mingw global_win32.mak gcompris.ico gcompris-uninstal.ico \
gcompris-installer.nsi
......
......@@ -4,7 +4,7 @@
# Description: Top Makefile for win32 (mingw) port of GCompris
#
VERSION = "8.0BETA5"
VERSION = "8.0BETA6"
pkgdatadir = gcompris
......
......@@ -64,6 +64,8 @@ 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
* run: make -f Makefile.mingw install to include the generated code in the installer directory
......
......@@ -2,7 +2,7 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Version number of package */
#define VERSION "8.0BETA5"
#define VERSION "8.0BETA6"
/* Supported languages */
#define ALL_LINGUAS "am ar az bg ca cs da de el en_CA en_GB es et fi fr ga gu he hi hr hu it lt mk ml ms nl nb nn pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv tr wa zh_CN"
......
......@@ -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.0BETA5)
AM_INIT_AUTOMAKE(gcompris, 8.0BETA6)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
......
......@@ -22,6 +22,8 @@ Name $name
OutFile "gcompris-${GCOMPRIS_VERSION}.exe"
UninstallIcon ".\gcompris-uninstal.ico"
SetCompressor lzma
ShowInstDetails show
ShowUninstDetails show
......@@ -49,7 +51,7 @@ SetDateSave on
;Modern UI Configuration
!define MUI_ICON ".\gcompris.ico"
!define MUI_UNICON ".\gcompris-uninstall.ico"
!define MUI_UNICON ".\gcompris-uninstal.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\nsis\gcompris-intro.bmp"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\nsis\gcompris-header.bmp"
......@@ -69,7 +71,7 @@ SetDateSave on
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "./COPYING"
!insertmacro MUI_PAGE_COMPONENTS
......@@ -87,7 +89,7 @@ SetDateSave on
;--------------------------------
;Languages
;; English goes first because its the default. The rest are
;; in alphabetical order (at least the strings actually displayed
;; will be).
......@@ -163,7 +165,7 @@ SetDateSave on
; Only need this if using bzip2 compression
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
!insertmacro MUI_RESERVEFILE_LANGDLL
!insertmacro MUI_RESERVEFILE_LANGDLL
ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
......@@ -208,7 +210,7 @@ Section -SecUninstallOldGcompris
; If previous version exists .. remove
try_uninstall:
StrCmp $R1 "" done
; Version key started with 0.60a3. Prior versions can't be
; Version key started with 0.60a3. Prior versions can't be
; automaticlly uninstalled.
StrCmp $R2 "" uninstall_problem
; Check if we have uninstall string..
......@@ -234,7 +236,7 @@ Section -SecUninstallOldGcompris
uninstall_problem:
; In this case just wipe out previous Gcompris install dir..
; We get here because versions 0.60a1 and 0.60a2 don't have versions set in the registry
; and versions 0.60 and lower did not correctly set the uninstall reg string
; and versions 0.60 and lower did not correctly set the uninstall reg string
; (the string was set in quotes)
IfSilent do_wipeout
MessageBox MB_YESNO $(GCOMPRIS_PROMPT_WIPEOUT) IDYES do_wipeout IDNO cancel_install
......@@ -646,7 +648,7 @@ Function un.onInit
; Get stored language prefrence
ReadRegStr $LANGUAGE HKCU ${GCOMPRIS_REG_KEY} "${GCOMPRIS_REG_LANG}"
FunctionEnd
......@@ -654,42 +656,42 @@ FunctionEnd
; input, none
; output, top of stack (replaces, with e.g. whatever)
; modifies no other variables.
Function GetParameters
Push $R0
Push $R1
Push $R2
Push $R3
StrCpy $R2 1
StrLen $R3 $CMDLINE
;Check for quote or space
StrCpy $R0 $CMDLINE $R2
StrCmp $R0 '"' 0 +3
StrCpy $R1 '"'
Goto loop
StrCpy $R1 " "
loop:
IntOp $R2 $R2 + 1
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 $R1 get
StrCmp $R2 $R3 get
Goto loop
get:
IntOp $R2 $R2 + 1
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 " " get
StrCpy $R0 $CMDLINE "" $R2
Pop $R3
Pop $R2
Pop $R1
Exch $R0
FunctionEnd
; StrStr
......@@ -836,7 +838,7 @@ Function GetWindowsVersion
lbl_error:
Strcpy $R0 ''
lbl_done:
Pop $R1
Exch $R0
FunctionEnd
......
......@@ -179,10 +179,8 @@ static void pause_board (gboolean pause)
void gnuchess_died(int signum)
{
if(signum == SIGTRAP)
{
gc_dialog(_("Error: The external program gnuchess died unexpectingly"), gc_board_end);
}
gnuchess_pid = 0;
gc_dialog(_("Error: The external program gnuchess died unexpectingly"), gc_board_stop);
}
/*
......@@ -190,12 +188,17 @@ void gnuchess_died(int signum)
static void start_board (GcomprisBoard *agcomprisBoard)
{
signal(SIGTRAP, gnuchess_died);
#ifndef WIN32
if (!g_file_test (GNUCHESS, G_FILE_TEST_EXISTS)) {
gc_dialog(_("Error: The external program gnuchess is mandatory\nto play chess in gcompris.\nFind this program on http://www.rpmfind.net or in your\nGNU/Linux distribution\nAnd check it is located here: "GNUCHESS), gc_board_end);
gnuchess_pid = 0;
#ifndef WIN32
signal(SIGTRAP, gnuchess_died);
signal(SIGPIPE, gnuchess_died);
if (!g_file_test (GNUCHESS, G_FILE_TEST_EXISTS))
{
gc_dialog(_("Error: The external program gnuchess is mandatory\nto play chess in gcompris.\n"
"Find this program on http://www.rpmfind.net or in your\nGNU/Linux distribution\n"
"And check it is located here: "GNUCHESS),
gc_board_stop);
return;
}
#endif
......@@ -232,12 +235,15 @@ static void start_board (GcomprisBoard *agcomprisBoard)
}
if(start_child (GNUCHESS, &read_chan,
&write_chan, &gnuchess_pid)==FALSE) {
gc_dialog(_("Error: The external program gnuchess is mandatory\nto play chess in gcompris.\nFind this program on http://www.rpmfind.net or in your\nGNU/Linux distribution\nAnd check it is in "GNUCHESS), gc_board_end);
return;
}
&write_chan, &gnuchess_pid)==FALSE)
{
gc_dialog(_("Error: The external program gnuchess is mandatory\n"
"to play chess in gcompris.\n"
"First install it, and check it is in "GNUCHESS), gc_board_stop);
return;
}
read_cb = g_io_add_watch (read_chan, G_IO_IN,
read_cb = g_io_add_watch (read_chan, G_IO_IN|G_IO_PRI,
engine_local_cb, NULL);
err_cb = g_io_add_watch (read_chan, G_IO_HUP,
engine_local_err_cb, NULL);
......@@ -248,17 +254,23 @@ static void start_board (GcomprisBoard *agcomprisBoard)
write_child (write_chan, "easy\n");
write_child (write_chan, "level 100 1 0\n");
write_child (write_chan, "depth 1\n");
write_child (write_chan, "time 500\n");
chess_next_level();
gamewon = FALSE;
pause_board(FALSE);
}
}
/* ======================================= */
static void end_board ()
{
#ifndef WIN32
signal(SIGTRAP, NULL);
signal(SIGPIPE, NULL);
#endif
if(gcomprisBoard!=NULL)
{
pause_board(TRUE);
......@@ -386,7 +398,8 @@ static void chess_destroy_all_items()
}
/* ==================================== */
static GnomeCanvasItem *chess_create_item(GnomeCanvasGroup *parent)
static GnomeCanvasItem *
chess_create_item(GnomeCanvasGroup *parent)
{
guint color;
GnomeCanvasItem *item = NULL;
......@@ -956,6 +969,9 @@ static void
engine_local_destroy (GPid gnuchess_pid)
{
if(!gnuchess_pid)
return;
g_warning("engine_local_destroy () \n");
write_child (write_chan, "quit\n");
......@@ -972,26 +988,48 @@ engine_local_destroy (GPid gnuchess_pid)
g_spawn_close_pid(gnuchess_pid);
}
/** We got data back from gnuchess, we parse them here
*
*/
static gboolean
engine_local_cb (GIOChannel *source,
GIOCondition condition,
gpointer data)
{
static char buf[1024];
static char *b=buf;
gchar buf[1000];
char *b=buf;
GError *err = NULL;
char *p,*q;
gsize len;
GIOStatus status;
gsize len = 0;
GIOStatus status = G_IO_STATUS_NORMAL;
g_warning("engine_local_cb");
status = g_io_channel_read_chars(source,
buf,
1000,
&len,
&err);
g_warning("g_io_channel_read_line len=%d", len);
if(status == G_IO_STATUS_ERROR)
{
g_warning("g_io_channel_read_chars error=%s",
err->message);
/* FIXME: Not sure what to do */
return FALSE;
}
status = g_io_channel_read_chars (read_chan, b, sizeof (buf) - 1 - (b - buf), &len, NULL);
if(status != G_IO_STATUS_NORMAL)
{
g_warning("g_io_channel_read_chars status=%d\n", status);
g_warning("g_io_channel_read_chars error=%d",
status);
/* FIXME: Not sure what to do */
return FALSE;
}
g_warning("engine_local_cb read=%s\n", buf);
if (len > 0) {
b[len] = 0;
b += len;
......@@ -1038,7 +1076,7 @@ engine_local_cb (GIOChannel *source,
Square from, to;
p = strstr (buf, ":");
printf("computer moves to %s\n", p+1);
g_warning("computer moves to %s\n", p+1);
if (san_to_move (position, p+1, &from, &to))
ascii_to_move (position, p+1, &from, &to);
......@@ -1092,8 +1130,8 @@ engine_local_err_cb (GIOChannel *source,
GIOCondition condition,
gpointer data)
{
g_error ("Local Engine connection died");
gnuchess_pid = 0;
gc_dialog(_("Error: The external program gnuchess died unexpectingly"), gc_board_stop);
return FALSE;
}
......@@ -1111,7 +1149,7 @@ start_child (char *cmd,
gint Child_In, Child_Out, Child_Err;
GError *gerror = NULL;
gchar *Child_Argv[]={ cmd, NULL };
gchar *Child_Argv[]={ cmd, "-e", NULL };
g_warning("Ready to start child");
......@@ -1136,42 +1174,18 @@ start_child (char *cmd,
if(g_io_channel_set_encoding(*write_chan, NULL, NULL) != G_IO_STATUS_NORMAL)
g_warning("Failed to set NULL encoding");
if(g_io_channel_set_flags (*read_chan, G_IO_FLAG_SET_MASK, NULL) != G_IO_STATUS_NORMAL)
if(g_io_channel_set_flags (*read_chan, G_IO_FLAG_NONBLOCK, NULL) != G_IO_STATUS_NORMAL)
g_warning("Failed to set NON BLOCKING IO");
if(g_io_channel_set_flags (*write_chan, G_IO_FLAG_SET_MASK, NULL) != G_IO_STATUS_NORMAL)
if(g_io_channel_set_flags (*write_chan, G_IO_FLAG_NONBLOCK, NULL) != G_IO_STATUS_NORMAL)
g_warning("Failed to set NON BLOCKING IO");
return(TRUE);
}
static void
write_child (GIOChannel *write_chan, char *format, ...)
{
GIOError err;
va_list ap;
char *buf;
gsize len;
va_start (ap, format);
buf = g_strdup_vprintf (format, ap);
err = g_io_channel_write (write_chan, buf, strlen (buf), &len);
if (err != G_IO_ERROR_NONE)
g_warning ("Writing to child process failed");
else
g_warning ("Wrote '%s' to gnuchess", buf);
va_end (ap);
g_free (buf);
}
/* FIXME: The new API bellow should be use but for an unknown reason it doesn't work,
* Not all data are read back using this method
/** Write a command to the gnuchess backend
*
*/
/*
static void
write_child (GIOChannel *write_chan, char *format, ...)
{
......@@ -1179,19 +1193,27 @@ write_child (GIOChannel *write_chan, char *format, ...)
va_list ap;
gchar *buf;
gsize len;
GError *error = NULL;
va_start (ap, format);
buf = g_strdup_vprintf (format, ap);
err = g_io_channel_write_chars (write_chan, buf, strlen (buf), &len, NULL);
err = g_io_channel_write_chars (write_chan, buf, strlen (buf), &len, &error);
if (err == G_IO_STATUS_ERROR)
g_error ("Error writing: %s\n", error->message);
if (err != G_IO_STATUS_NORMAL)
g_warning ("Writing to child process failed");
else
g_warning ("Wrote '%s' to gnuchess", buf);
err = g_io_channel_flush (write_chan, &error);
if (err == G_IO_STATUS_ERROR)
g_error ("Error flushing: %s\n", error->message);
va_end (ap);
g_free (buf);
}
*/
......@@ -259,7 +259,7 @@ static gboolean sounds_are_fine()
if(!properties->fx)
{
gc_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialog to\nenable the sound"), board_stop);
gc_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialog to\nenable the sound"), gc_board_stop);
return(NOT_OK);
}
......@@ -288,7 +288,7 @@ static gboolean sounds_are_fine()
{
gchar *msg = g_strdup_printf( _("Error: this activity requires that you first install\nthe packages with gcompris voices for the locale '%s' or '%s'"),
locale, "en");
gc_dialog(msg, board_stop);
gc_dialog(msg, gc_board_stop);
g_free(msg);
return (NOT_OK);
}
......
......@@ -824,7 +824,7 @@ static void start_board (GcomprisBoard *agcomprisBoard)
base_x1_tux = BASE_SOUND_X1_TUX;
if(!properties->fx) {
gc_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialog to\nenable the sound"), board_stop);
gc_dialog(_("Error: this activity cannot be played with the\nsound effects disabled.\nGo to the configuration dialog to\nenable the sound"), gc_board_stop);
return;
}
......
......@@ -224,7 +224,7 @@ static void menu_start (GcomprisBoard *agcomprisBoard)
menuitems = g_new(MenuItems, 1);
img = gc_skin_image_get("gcompris-menu2bg.png");
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
gc_set_background(gnome_canvas_root(gcomprisBoard->canvas),
img);
g_free(img);
......@@ -307,7 +307,7 @@ static void create_panel(GnomeCanvasGroup *parent)
pixmap = gc_pixmap_load(board->icon_name);
ratio = get_ratio( pixmap, icon_size_panel);
item = gnome_canvas_item_new (parent,
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
......@@ -329,14 +329,14 @@ static void create_panel(GnomeCanvasGroup *parent)
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) item_event,
menuitems);
gtk_signal_connect(GTK_OBJECT(item), "event",
(GtkSignalFunc) gc_item_focus_event,
NULL);
}
}
......@@ -362,7 +362,7 @@ static void display_section (gchar *path)
"x", (double) 0,
"y", (double) 0,
NULL));
create_top (actualSectionItem, path);
......@@ -429,8 +429,8 @@ menu_config ()
static void display_board_icon(GcomprisBoard *board, MenuItems *menuitems)
{
/* FIXME: Check board is available for the current profile */
if (board!=NULL
&& board_check_file(board))
if (board!=NULL
&& gc_board_check_file(board))
{
menu_create_item(actualSectionItem, menuitems, board);
}
......@@ -440,7 +440,7 @@ static void display_board_icon(GcomprisBoard *board, MenuItems *menuitems)
* Calculate the next stop where to place an item
* return false if there is no more space left
*/
static gboolean next_spot()
static gboolean next_spot()
{
if(current_x==0.0)
{
......@@ -457,12 +457,12 @@ static gboolean next_spot()
current_x = display_x + icon_size/2.0;
current_y += icon_size + display_int_y;
}
if ( current_y > display_y + display_h - icon_size/2.0 )
return FALSE;
else
return TRUE;
}
static void menu_create_item(GnomeCanvasGroup *parent, MenuItems *menuitems, GcomprisBoard *board)
......@@ -525,7 +525,7 @@ static void menu_create_item(GnomeCanvasGroup *parent, MenuItems *menuitems, Gco
soundfile = gc_file_find_absolute(board->mandatory_sound_file);
g_warning("Checking mandatory_sound_file %s\n", soundfile);
if (!soundfile || !gc_prop_get()->fx)
if (!soundfile || !gc_prop_get()->fx)
{
pixmap = gc_skin_pixmap_load("voice_bad.png");
}
......@@ -570,7 +570,7 @@ static void menu_create_item(GnomeCanvasGroup *parent, MenuItems *menuitems, Gco
gtk_signal_connect(GTK_OBJECT(menu_button), "event",
(GtkSignalFunc) item_event,
menuitems);
gtk_signal_connect(GTK_OBJECT(menu_button), "event",
(GtkSignalFunc) gc_item_focus_event,
NULL);
......@@ -598,7 +598,7 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, MenuItems *menuitems)
"text", board->title,
NULL);
if(board->description
if(board->description
&& G_IS_OBJECT(menuitems->description_item)
&& G_IS_OBJECT(menuitems->description_item_s))
set_content(menuitems->description_item,
......@@ -650,9 +650,9 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, MenuItems *menuitems)
case GDK_BUTTON_PRESS:
if(!menu_displayed)
return TRUE;
gc_sound_play_ogg ("sounds/gobble.ogg", NULL);
if (strcmp(board->type,"menu")==0){
gchar *path = g_strdup_printf("%s/%s",board->section, board->name);
GcomprisProperties *properties = gc_prop_get();
......@@ -663,30 +663,30 @@ item_event(GnomeCanvasItem *item, GdkEvent *event, MenuItems *menuitems)
g_free(properties->menu_position);
properties->menu_position = path;
}
else
board_run_next (board);
break;
default:
break;
}
return FALSE;
}
/* Apply the style to the given RichText item */
static void
set_content(GnomeCanvasRichText *item_content,
set_content(GnomeCanvasRichText *item_content,
GnomeCanvasRichText *item_content_s,
gchar *text) {
GtkTextIter iter_start, iter_end;
GtkTextBuffer *buffer;
GtkTextTag *txt_tag;
gboolean success;
gboolean success;
gchar *color_string;
GdkColor *color_s = (GdkColor *)malloc(sizeof(GdkColor));
GdkColor *color = (GdkColor *)malloc(sizeof(GdkColor));
......@@ -708,12 +708,12 @@ set_content(GnomeCanvasRichText *item_content,
color_string = g_strdup_printf("#%x", gc_skin_color_shadow >> 8);
gdk_color_parse(color_string, color_s);
success = gdk_colormap_alloc_color(gdk_colormap_get_system(),
success = gdk_colormap_alloc_color(gdk_colormap_get_system(),
color_s,
FALSE, TRUE);
FALSE, TRUE);
buffer = gnome_canvas_rich_text_get_buffer(GNOME_CANVAS_RICH_TEXT(item_content_s));
txt_tag = gtk_text_buffer_create_tag(buffer, NULL,
txt_tag = gtk_text_buffer_create_tag(buffer, NULL,
"foreground-gdk", color_s,
"font", gc_skin_font_board_medium,
NULL);
......@@ -723,17 +723,17 @@ set_content(GnomeCanvasRichText *item_content,
g_free(color_string);
/*
/*
* Set the text
*/
color_string = g_strdup_printf("#%x", gc_skin_get_color("menu/text") >> 8);
gdk_color_parse(color_string, color);
success = gdk_colormap_alloc_color(gdk_colormap_get_system(),
success = gdk_colormap_alloc_color(gdk_colormap_get_system(),
color,
FALSE, TRUE);
FALSE, TRUE);
buffer = gnome_canvas_rich_text_get_buffer(GNOME_CANVAS_RICH_TEXT(item_content));
txt_tag = gtk_text_buffer_create_tag(buffer, NULL,
txt_tag = gtk_text_buffer_create_tag(buffer, NULL,
"foreground-gdk", color,
"font", gc_skin_font_board_medium,
NULL);
......@@ -855,7 +855,7 @@ static gdouble get_ratio(GdkPixbuf *pixmap, gdouble size)
if (pixmap_h > size)
ratio = size / pixmap_h;
}
return ratio;
}
......@@ -877,7 +877,7 @@ static void create_top(GnomeCanvasGroup *parent, gchar *path)
return;
splitted_section = g_strsplit (path, "/", 0);
path1 = g_strdup("");
/* splitted_section[0] is always "" */
......@@ -890,7 +890,7 @@ static void create_top(GnomeCanvasGroup *parent, gchar *path)
g_free(path1);
path1 = path2;
if (strcmp(path1, properties->root_menu)<0){
i++;
continue;
......@@ -902,7 +902,7 @@ static void create_top(GnomeCanvasGroup *parent, gchar *path)
} else {
pixmap = gc_skin_pixmap_load("button_forward.png");
ratio = get_ratio(pixmap, top_arrow_size);
gnome_canvas_item_new (parent,
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
......@@ -918,15 +918,15 @@ static void create_top(GnomeCanvasGroup *parent, gchar *path)
gdk_pixbuf_unref(pixmap);
current_top_x += top_arrow_size + top_int_x;
}
board = gc_menu_section_get(path1);
pixmap = gc_pixmap_load(board->icon_name);
ratio = get_ratio( pixmap, icon_size_top);
item = gnome_canvas_item_new (parent,
gnome_canvas_pixbuf_get_type (),
"pixbuf", pixmap,
......@@ -940,26 +940,26 @@ static void create_top(GnomeCanvasGroup *parent, gchar *path)
NULL);