Commit 0ae43a14 authored by Bruno Coudoin's avatar Bruno Coudoin

- Major cleanup in goocanvas to keep only the minimal we need.

	- Integrated pygoocanvas. No more needed to install it separatly.
	- fixed the file selector background and its highlight button


svn path=/branches/gcomprixogoo/; revision=3314
parent c4b0f22f
2008-03-16 Bruno Coudoin,,, <set EMAIL_ADDRESS environment variable>
- Major cleanup in goocanvas to keep only the minimal we need.
- Integrated pygoocanvas. No more needed to install it separatly.
- fixed the file selector background and its highlight button
* configure.in:
* src/anim-activity/anim.py:
* src/boards/Makefile.am:
* src/boards/py-mod-gcompris.c: (python_gcompris_module_init):
* src/boards/python.c: (pythonboard_init):
* src/connect4-2players-activity/init_path.sh:
* src/draw-activity/init_path.sh:
* src/gcompris/bar.c: (on_leave_notify), (item_event_bar):
* src/gcompris/file_selector.c: (display_file_selector),
(display_files):
* src/gcompris/gameutil.c: (gc_item_focus_init):
* src/gcompris/gcompris.c: (setup_window):
* src/gcompris/gcompris_db.c: (gc_db_remove_board):
* src/goocanvas/INSTALL:
* src/goocanvas/Makefile.am:
* src/goocanvas/aclocal.m4:
* src/goocanvas/autogen.sh:
* src/goocanvas/autom4te.cache/output.0:
* src/goocanvas/autom4te.cache/output.1:
* src/goocanvas/autom4te.cache/requests:
* src/goocanvas/autom4te.cache/traces.0:
* src/goocanvas/autom4te.cache/traces.1:
* src/goocanvas/config.h.in:
* src/goocanvas/configure:
* src/goocanvas/configure.in.REF:
* src/goocanvas/demo/.cvsignore:
* src/goocanvas/demo/CVS/Entries:
* src/goocanvas/demo/CVS/Repository:
* src/goocanvas/demo/CVS/Root:
* src/goocanvas/demo/Makefile.am:
* src/goocanvas/demo/demo-animation.c:
* src/goocanvas/demo/demo-arrowhead.c:
* src/goocanvas/demo/demo-clipping.c:
* src/goocanvas/demo/demo-events.c:
* src/goocanvas/demo/demo-features.c:
* src/goocanvas/demo/demo-fifteen.c:
* src/goocanvas/demo/demo-focus.c:
* src/goocanvas/demo/demo-grabs.c:
* src/goocanvas/demo/demo-item.c:
* src/goocanvas/demo/demo-item.h:
* src/goocanvas/demo/demo-large-items.c:
* src/goocanvas/demo/demo-large-line.c:
* src/goocanvas/demo/demo-large-line.h:
* src/goocanvas/demo/demo-large-rect.c:
* src/goocanvas/demo/demo-large-rect.h:
* src/goocanvas/demo/demo-paths.c:
* src/goocanvas/demo/demo-scalability.c:
* src/goocanvas/demo/demo-table.c:
* src/goocanvas/demo/demo.c:
* src/goocanvas/demo/mv-demo-animation.c:
* src/goocanvas/demo/mv-demo-arrowhead.c:
* src/goocanvas/demo/mv-demo-clipping.c:
* src/goocanvas/demo/mv-demo-events.c:
* src/goocanvas/demo/mv-demo-features.c:
* src/goocanvas/demo/mv-demo-fifteen.c:
* src/goocanvas/demo/mv-demo-focus.c:
* src/goocanvas/demo/mv-demo-grabs.c:
* src/goocanvas/demo/mv-demo-paths.c:
* src/goocanvas/demo/mv-demo-scalability.c:
* src/goocanvas/demo/mv-demo-table.c:
* src/goocanvas/demo/mv-demo.c:
* src/goocanvas/demo/mv-scalability-demo.c:
* src/goocanvas/demo/mv-simple-demo.c:
* src/goocanvas/demo/mv-table-demo.c:
* src/goocanvas/demo/scalability-demo.c:
* src/goocanvas/demo/simple-demo.c:
* src/goocanvas/demo/table-demo.c:
* src/goocanvas/demo/units-demo.c:
* src/goocanvas/demo/widgets-demo.c:
* src/goocanvas/docs/.cvsignore:
* src/goocanvas/docs/CVS/Entries:
* src/goocanvas/docs/CVS/Entries.Log:
* src/goocanvas/docs/CVS/Repository:
* src/goocanvas/docs/CVS/Root:
* src/goocanvas/docs/Makefile.am:
* src/goocanvas/docs/creating-items.xml:
* src/goocanvas/docs/goocanvas-docs.sgml:
* src/goocanvas/docs/goocanvas-sections.txt:
* src/goocanvas/docs/goocanvas.types:
* src/goocanvas/docs/model-view-canvas.xml:
* src/goocanvas/docs/overview.xml:
* src/goocanvas/docs/simple-canvas.xml:
* src/goocanvas/docs/tmpl/.cvsignore:
* src/goocanvas/docs/tmpl/CVS/Entries:
* src/goocanvas/docs/tmpl/CVS/Repository:
* src/goocanvas/docs/tmpl/CVS/Root:
* src/goocanvas/goocanvas.pc.in:
* src/goocanvas/gtk-doc.make:
* src/goocanvas/mkinstalldirs:
* src/goocanvas/po/.cvsignore:
* src/goocanvas/po/CVS/Entries:
* src/goocanvas/po/CVS/Repository:
* src/goocanvas/po/CVS/Root:
* src/goocanvas/po/ChangeLog:
* src/goocanvas/po/Makefile.in.in:
* src/goocanvas/po/POTFILES.in:
* src/goocanvas/po/en_GB.po:
* src/goocanvas/po/es.po:
* src/goocanvas/po/goocanvas.pot:
* src/goocanvas/po/ja.po:
* src/goocanvas/src/goocanvasitemsimple.c:
(goo_canvas_item_simple_install_common_properties):
2008-03-15 Bruno coudoin <bruno.coudoin@free.fr> 2008-03-15 Bruno coudoin <bruno.coudoin@free.fr>
merge from trunk r3309 merge from trunk r3309
......
...@@ -450,7 +450,7 @@ if test x$build_python_plugin = xno; then ...@@ -450,7 +450,7 @@ if test x$build_python_plugin = xno; then
AC_MSG_NOTICE([Python plugin is disabled.]) AC_MSG_NOTICE([Python plugin is disabled.])
else else
dnl Python interpreter is available so check for pygtk dnl Python interpreter is available so check for pygtk
PKG_CHECK_MODULES(PYGTK, pygtk-2.0) PKG_CHECK_MODULES(PYGTK, pygtk-2.0 pycairo)
AC_MSG_CHECKING([for pygtk defs]) AC_MSG_CHECKING([for pygtk defs])
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
...@@ -827,10 +827,6 @@ src/mosaic-activity/resources/Makefile ...@@ -827,10 +827,6 @@ src/mosaic-activity/resources/Makefile
src/mosaic-activity/resources/mosaic/Makefile src/mosaic-activity/resources/mosaic/Makefile
src/goocanvas/Makefile src/goocanvas/Makefile
src/goocanvas/src/Makefile src/goocanvas/src/Makefile
src/goocanvas/demo/Makefile
src/goocanvas/docs/Makefile
src/goocanvas/po/Makefile.in
src/goocanvas/goocanvas.pc
]) ])
echo "" echo ""
......
...@@ -173,25 +173,25 @@ class Gcompris_anim: ...@@ -173,25 +173,25 @@ class Gcompris_anim:
"y", "y",
"width", "width",
"height", "height",
#"stroke_color_rgba", "stroke_color_rgba",
], ],
'FILL_RECT' : [ "x", 'FILL_RECT' : [ "x",
"y", "y",
"width", "width",
"height", "height",
#"fill_color_rgba", "fill_color_rgba",
], ],
'CIRCLE' : [ "center_x", 'CIRCLE' : [ "center_x",
"center_y", "center_y",
"radius_x", "radius_x",
"radius_y", "radius_y",
#"stroke_color_rgba", "stroke_color_rgba",
], ],
'FILL_CIRCLE' : [ "center_x", 'FILL_CIRCLE' : [ "center_x",
"center_y", "center_y",
"radius_x", "radius_x",
"radius_y", "radius_y",
#"fill_color_rgba", "fill_color_rgba",
], ],
'TEXT' : [ "x", 'TEXT' : [ "x",
"y", "y",
...@@ -536,6 +536,7 @@ class Gcompris_anim: ...@@ -536,6 +536,7 @@ class Gcompris_anim:
x=theX, x=theX,
y=y y=y
) )
gcompris.utils.item_focus_init(item, None)
item.connect("button_press_event", self.tool_item_event, i) item.connect("button_press_event", self.tool_item_event, i)
if i%2: if i%2:
y += stepy y += stepy
...@@ -626,7 +627,7 @@ class Gcompris_anim: ...@@ -626,7 +627,7 @@ class Gcompris_anim:
color_pixmap_height = pixmap.get_height() color_pixmap_height = pixmap.get_height()
y = gcompris.BOARD_HEIGHT - color_pixmap_height - 8 y = gcompris.BOARD_HEIGHT - color_pixmap_height - 30
c = 0 c = 0
......
...@@ -53,8 +53,13 @@ libmenu_la_SOURCES = menu2.c ...@@ -53,8 +53,13 @@ libmenu_la_SOURCES = menu2.c
libpython_la_LDFLAGS = -export-dynamic $(shared) $(no_undefined) -module -avoid-version $(gc_libs) $(PYTHON_LIBS) libpython_la_LDFLAGS = -export-dynamic $(shared) $(no_undefined) -module -avoid-version $(gc_libs) $(PYTHON_LIBS)
libpython_la_LIBADD = libpython_la_LIBADD =
libpython_la_CFLAGS = -fno-strict-aliasing $(PYGTK_CFLAGS) libpython_la_CFLAGS = -fno-strict-aliasing $(PYGTK_CFLAGS) \
-DPYGOOCANVAS_MAJOR_VERSION=0 \
-DPYGOOCANVAS_MINOR_VERSION=0 \
-DPYGOOCANVAS_MICRO_VERSION=0
libpython_la_SOURCES = python.c \ libpython_la_SOURCES = python.c \
goocanvas.c goocanvasmodule.c \
py-gcompris-board.c py-gcompris-board.h \ py-gcompris-board.c py-gcompris-board.h \
py-gcompris-properties.c py-gcompris-properties.h \ py-gcompris-properties.c py-gcompris-properties.h \
py-gcompris-profile.c py-gcompris-profile.h \ py-gcompris-profile.c py-gcompris-profile.h \
......
...@@ -41,7 +41,7 @@ typedef int Py_ssize_t; ...@@ -41,7 +41,7 @@ typedef int Py_ssize_t;
#include "py-mod-anim.h" #include "py-mod-anim.h"
#include "py-mod-admin.h" #include "py-mod-admin.h"
//void initgnomecanvas (void); void initgoocanvas (void);
void pair_in_dict(gpointer key, void pair_in_dict(gpointer key,
gpointer value, gpointer value,
...@@ -1611,7 +1611,7 @@ void python_gcompris_module_init(void) ...@@ -1611,7 +1611,7 @@ void python_gcompris_module_init(void)
/* Initialize the sub modules */ /* Initialize the sub modules */
//initgnomecanvas(); initgoocanvas();
python_gcompris_bonus_module_init(); python_gcompris_bonus_module_init();
python_gc_score_module_init(); python_gc_score_module_init();
python_gc_skin_module_init(); python_gc_skin_module_init();
......
...@@ -144,7 +144,6 @@ pythonboard_init (GcomprisBoard *agcomprisBoard){ ...@@ -144,7 +144,6 @@ pythonboard_init (GcomprisBoard *agcomprisBoard){
char* board_file_name; char* board_file_name;
char* boardclass; char* boardclass;
gchar *boarddir;
PyObject* module_dict; PyObject* module_dict;
PyObject* py_boardclass; PyObject* py_boardclass;
...@@ -220,20 +219,13 @@ pythonboard_init (GcomprisBoard *agcomprisBoard){ ...@@ -220,20 +219,13 @@ pythonboard_init (GcomprisBoard *agcomprisBoard){
board_file_name = strchr(board->type, ':')+1; board_file_name = strchr(board->type, ':')+1;
boardclass = g_strdup_printf("Gcompris_%s", board_file_name); boardclass = g_strdup_printf("Gcompris_%s", board_file_name);
/* Test if board come with -L option */ /* Test if board come with --python_plugin_dir option */
g_warning("board_dir: '%s' package_data_dir '%s' file_name '%s'", g_warning("board_dir: '%s' python_plugin_dir '%s' file_name '%s'",
board->board_dir, board->board_dir,
properties->package_python_plugin_dir, properties->package_python_plugin_dir,
board_file_name); board_file_name);
if (strcmp(board->board_dir, properties->package_python_plugin_dir)!=0){
boarddir = g_strdup_printf("sys.path.append('%s/')", board->board_dir);
PyRun_SimpleString(boarddir);
g_free(boarddir);
}
/* Insert the board module into the python's interpreter */ /* Insert the board module into the python's interpreter */
python_board_module = PyImport_ImportModuleEx(board_file_name, python_board_module = PyImport_ImportModuleEx(board_file_name,
globals, globals,
...@@ -537,7 +529,8 @@ static void pythonboard_repeat (void){ ...@@ -537,7 +529,8 @@ static void pythonboard_repeat (void){
*/ */
/* /*
* Normally python in already runningwhen config_start is called. If not config_stop has to stop it. * Normally python in already running when config_start is called.
* If not config_stop has to stop it.
*/ */
static gboolean python_run_by_config = FALSE; static gboolean python_run_by_config = FALSE;
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
# This is sourced by runit.sh # This is sourced by runit.sh
path=$1 path=$1
activity=connect4-2players activity=connect4-2players
pythonplugindir=$path plugindir=$path/../boards/.libs
resourcedir=$path/$resources pythonplugindir=$path/../connect4-activity
resources resourcedir=$path/../connect4-activity/resources
../connect4-activity/resources
section="/strategy" section="/strategy"
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
path=$1 path=$1
activity=draw activity=draw
plugindir=$path/../boards/.libs plugindir=$path/../boards/.libs
pythonplugindir=$path pythonplugindir=$path/../anim-activity
resourcedir=$path/resources resourcedir=$path/../anim-activity/resources
section="/math/geometry" section="/math/geometry"
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#define BAR_GAP 15 /* Value used to fill space above and under icons in the bar */ #define BAR_GAP 15 /* Value used to fill space above and under icons in the bar */
#define NUMBER_OF_ITEMS 10 /* Number of buttons in the bar */ #define NUMBER_OF_ITEMS 10 /* Number of buttons in the bar */
#define HIDE_BAR_TIMOUT 3000 /* The time before we hide the bar in ms */
static void update_exit_button(); static void update_exit_button();
static gboolean on_enter_notify (GooCanvasItem *item, static gboolean on_enter_notify (GooCanvasItem *item,
...@@ -580,7 +581,7 @@ on_leave_notify (GooCanvasItem *item, ...@@ -580,7 +581,7 @@ on_leave_notify (GooCanvasItem *item,
bar_reset_sound_id(); bar_reset_sound_id();
if(!bar_down_id) if(!bar_down_id)
bar_down_id = g_timeout_add (3500, (GtkFunction) _bar_down, NULL); bar_down_id = g_timeout_add (HIDE_BAR_TIMOUT, (GtkFunction) _bar_down, NULL);
return FALSE; return FALSE;
} }
...@@ -685,6 +686,10 @@ item_event_bar (GooCanvasItem *item, ...@@ -685,6 +686,10 @@ item_event_bar (GooCanvasItem *item,
else else
confirm_quit(TRUE); confirm_quit(TRUE);
} }
else if(!strcmp((char *)data, "bar"))
{
_force_bar_down();
}
return TRUE; return TRUE;
} }
......
...@@ -152,6 +152,7 @@ display_file_selector(int the_mode, ...@@ -152,6 +152,7 @@ display_file_selector(int the_mode,
FileSelectorCallBack iscb) FileSelectorCallBack iscb)
{ {
GooCanvasItem *item; GooCanvasItem *item;
GooCanvasItem *item2;
GdkPixbuf *pixmap = NULL; GdkPixbuf *pixmap = NULL;
gint y = 0; gint y = 0;
gint y_start = 0; gint y_start = 0;
...@@ -263,7 +264,7 @@ display_file_selector(int the_mode, ...@@ -263,7 +264,7 @@ display_file_selector(int the_mode,
"/cancel/"); "/cancel/");
gc_item_focus_init(item, NULL); gc_item_focus_init(item, NULL);
item = goo_canvas_text_new (rootitem, item2 = goo_canvas_text_new (rootitem,
_("CANCEL"), _("CANCEL"),
(gdouble) BOARDWIDTH*0.33, (gdouble) BOARDWIDTH*0.33,
(gdouble) y - gdk_pixbuf_get_height(pixmap), (gdouble) y - gdk_pixbuf_get_height(pixmap),
...@@ -272,10 +273,10 @@ display_file_selector(int the_mode, ...@@ -272,10 +273,10 @@ display_file_selector(int the_mode,
"font", gc_skin_font_title, "font", gc_skin_font_title,
"fill-color-rgba", gc_skin_color_text_button, "fill-color-rgba", gc_skin_color_text_button,
NULL); NULL);
g_signal_connect(item, "button_press_event", g_signal_connect(item2, "button_press_event",
(GtkSignalFunc) item_event_file_selector, (GtkSignalFunc) item_event_file_selector,
"/cancel/"); "/cancel/");
gc_item_focus_init(item, NULL); gc_item_focus_init(item2, item);
// OK // OK
item = goo_canvas_image_new (rootitem, item = goo_canvas_image_new (rootitem,
...@@ -289,7 +290,7 @@ display_file_selector(int the_mode, ...@@ -289,7 +290,7 @@ display_file_selector(int the_mode,
"/ok/"); "/ok/");
gc_item_focus_init(item, NULL); gc_item_focus_init(item, NULL);
item = goo_canvas_text_new (rootitem, item2 = goo_canvas_text_new (rootitem,
(mode==MODE_LOAD ? _("LOAD") : _("SAVE")), (mode==MODE_LOAD ? _("LOAD") : _("SAVE")),
(gdouble) BOARDWIDTH*0.66, (gdouble) BOARDWIDTH*0.66,
(gdouble) y - gdk_pixbuf_get_height(pixmap), (gdouble) y - gdk_pixbuf_get_height(pixmap),
...@@ -298,10 +299,10 @@ display_file_selector(int the_mode, ...@@ -298,10 +299,10 @@ display_file_selector(int the_mode,
"font", gc_skin_font_title, "font", gc_skin_font_title,
"fill-color-rgba", gc_skin_color_text_button, "fill-color-rgba", gc_skin_color_text_button,
NULL); NULL);
g_signal_connect(item, "button_press_event", g_signal_connect(item2, "button_press_event",
(GtkSignalFunc) item_event_file_selector, (GtkSignalFunc) item_event_file_selector,
"/ok/"); "/ok/");
gc_item_focus_init(item, NULL); gc_item_focus_init(item2, item);
gdk_pixbuf_unref(pixmap); gdk_pixbuf_unref(pixmap);
...@@ -339,7 +340,6 @@ display_files(GooCanvasItem *root_item, gchar *rootdir) ...@@ -339,7 +340,6 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
GList *file_list = NULL; GList *file_list = NULL;
GList *listrunner; GList *listrunner;
GtkAdjustment *adj; GtkAdjustment *adj;
if(!rootitem) if(!rootitem)
...@@ -381,7 +381,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir) ...@@ -381,7 +381,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
bg_item = goo_canvas_rect_new (goo_canvas_get_root_item(GOO_CANVAS(canvas)), bg_item = goo_canvas_rect_new (goo_canvas_get_root_item(GOO_CANVAS(canvas)),
0, 0,
0, 0,
DRAWING_AREA_X2 - DRAWING_AREA_X1, DRAWING_AREA_X2 - DRAWING_AREA_X1 + 200,
DRAWING_AREA_Y2 - DRAWING_AREA_Y1, DRAWING_AREA_Y2 - DRAWING_AREA_Y1,
"fill-color-rgba", gc_skin_get_color("gcompris/fileselectbg"), "fill-color-rgba", gc_skin_get_color("gcompris/fileselectbg"),
"line-width", 0.0, "line-width", 0.0,
...@@ -390,7 +390,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir) ...@@ -390,7 +390,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
adj = \ adj = \
GTK_ADJUSTMENT (gtk_adjustment_new (0.00, 0.00, GTK_ADJUSTMENT (gtk_adjustment_new (0.00, 0.00,
DRAWING_AREA_Y2 - DRAWING_AREA_Y1 + 30, IMAGE_HEIGHT,
10, IMAGE_HEIGHT, 10, IMAGE_HEIGHT,
(DRAWING_AREA_Y2 - DRAWING_AREA_Y1)/3) (DRAWING_AREA_Y2 - DRAWING_AREA_Y1)/3)
); );
...@@ -561,7 +561,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir) ...@@ -561,7 +561,7 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
"height", (double)iy + IMAGE_HEIGHT + IMAGE_GAP, "height", (double)iy + IMAGE_HEIGHT + IMAGE_GAP,
NULL); NULL);
g_object_set(adj, g_object_set(adj,
"upper", iy + IMAGE_HEIGHT + IMAGE_GAP, "upper", (double)iy - IMAGE_HEIGHT + IMAGE_GAP - 1,
NULL); NULL);
} }
} }
...@@ -571,6 +571,8 @@ display_files(GooCanvasItem *root_item, gchar *rootdir) ...@@ -571,6 +571,8 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
g_dir_close(dir); g_dir_close(dir);
g_list_free(file_list); g_list_free(file_list);
/* Warning: we don't scale the internal canvas dynamicaly */
goo_canvas_set_scale (GOO_CANVAS(canvas), gc_zoom_factor_get());
} }
/* Callback when a directory is selected */ /* Callback when a directory is selected */
......
...@@ -175,7 +175,7 @@ RsvgHandle *gc_rsvg_load(const gchar *format, ...) ...@@ -175,7 +175,7 @@ RsvgHandle *gc_rsvg_load(const gchar *format, ...)
} }
/** /**
* Set the focus of the given image (highlight or not) * Set the focus of the given item (highlight or not)
* *
*/ */
static void static void
...@@ -290,15 +290,18 @@ void gc_item_focus_init(GooCanvasItem *source_item, ...@@ -290,15 +290,18 @@ void gc_item_focus_init(GooCanvasItem *source_item,
"visibility", GOO_CANVAS_ITEM_INVISIBLE, "visibility", GOO_CANVAS_ITEM_INVISIBLE,
NULL); NULL);
if(!already_created) /* Avoid double connection */
{ g_signal_handlers_disconnect_by_func(source_item,
(GtkSignalFunc) gc_item_focus_event,
target_item);
/* connect source to target */
g_signal_connect(source_item, "enter_notify_event", g_signal_connect(source_item, "enter_notify_event",
(GtkSignalFunc) gc_item_focus_event, (GtkSignalFunc) gc_item_focus_event,
target_item); target_item);
g_signal_connect(source_item, "leave_notify_event", g_signal_connect(source_item, "leave_notify_event",
(GtkSignalFunc) gc_item_focus_event, (GtkSignalFunc) gc_item_focus_event,
target_item); target_item);
}
} }
/* /*
......
...@@ -625,8 +625,6 @@ init_background() ...@@ -625,8 +625,6 @@ init_background()
static void setup_window () static void setup_window ()
{ {
GcomprisBoard *board_to_start; GcomprisBoard *board_to_start;
GdkPixbuf *icon_pixbuf;
gchar *icon_file;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
...@@ -634,24 +632,15 @@ static void setup_window () ...@@ -634,24 +632,15 @@ static void setup_window ()
* Set an icon for gcompris * Set an icon for gcompris
* ------------------------ * ------------------------
*/ */
icon_file = g_strconcat(properties->system_icon_dir, "/gcompris.png", NULL);
if (!g_file_test (icon_file, G_FILE_TEST_EXISTS)) {
/* Now check if this file is on the net */
icon_file = gc_net_get_url_from_file("gcompris.png", NULL);
}
if(!icon_file)
g_message ("Couldn't find file %s !", icon_file);
else
{ {
icon_pixbuf = gc_net_load_pixmap(icon_file); GdkPixbuf *icon_pixbuf = NULL;
gchar *iconfile = gc_file_find_absolute("%s/%s",
if (!icon_pixbuf) properties->system_icon_dir, "gcompris.png",
NULL);
if(iconfile)
{ {
g_message ("Failed to load pixbuf file: %s\n", icon_pixbuf = gc_pixmap_load(iconfile);
icon_file); g_free(iconfile);
}
g_free(icon_file);
if (icon_pixbuf) if (icon_pixbuf)
{ {
...@@ -659,6 +648,10 @@ static void setup_window () ...@@ -659,6 +648,10 @@ static void setup_window ()
gdk_pixbuf_unref (icon_pixbuf); gdk_pixbuf_unref (icon_pixbuf);
} }
} }
else
g_message ("Failed to find icon file: 'gcompris.png'");
}
gtk_window_set_title(GTK_WINDOW (window), "GCompris"); gtk_window_set_title(GTK_WINDOW (window), "GCompris");
......
...@@ -774,8 +774,6 @@ GList *gc_db_get_board_id(GList *list) ...@@ -774,8 +774,6 @@ GList *gc_db_get_board_id(GList *list)
void gc_db_remove_board(int board_id) void gc_db_remove_board(int board_id)
{ {
#ifdef USE_SQLITE #ifdef USE_SQLITE
g_warning("Supress board %d from db.", board_id);
char *zErrMsg; char *zErrMsg;
char **result; char **result;
int rc; int rc;
......
/usr/share/automake-1.9/INSTALL
\ No newline at end of file
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
SUBDIRS = src demo docs SUBDIRS = src
# require automake 1.7 # require automake 1.7
AUTOMAKE_OPTIONS = 1.7 AUTOMAKE_OPTIONS = 1.7
#pkgconfigdir = $(libdir)/pkgconfig EXTRA_DIST = autogen.sh
#pkgconfig_DATA = goocanvas.pc
EXTRA_DIST = goocanvas.pc.in autogen.sh
This diff is collapsed.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
DIE=0
if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"