Commit a20aa93c authored by Bruno Coudoin's avatar Bruno Coudoin

added wordprocessor fixed to search board icons in the skin directory.

	* src/boards/Makefile.mingw: added wordprocessor
	* src/boards/python/admin/board_list.py: fixed to search board icons in the skin directory.
	* src/boards/python/anim.py: fixed missing self.timeout initialization. It was crashing when quitting
	  this activity while no photos had been taken.
	* src/gcompris/properties.c: (gc_prop_activate): fixed an english string.

svn path=/trunk/; revision=2591
parent 20a22296
2007-04-13 Bruno coudoin <bruno.coudoin@free.fr>
* src/boards/Makefile.mingw: added wordprocessor
* src/boards/python/admin/board_list.py: fixed to search board icons in the skin directory.
* src/boards/python/anim.py: fixed missing self.timeout initialization. It was crashing when quitting
this activity while no photos had been taken.
* src/gcompris/properties.c: (gc_prop_activate): fixed an english string.
2007-04-10 Bruno coudoin <bruno.coudoin@free.fr>
Fixed bad ending tag that brokes gettext.
......
......@@ -478,8 +478,8 @@ attribute is readeable and/or writable.</para>
<entry>return a string</entry>
</row>
<row>
<entry>gcompris.utils.load_skin_pixmap(pixmapfile)</entry>
<entry>GdkPixbuf *gcompris_skin_pixmap_load(char *pixmapfile)</entry>
<entry>gcompris.skin.load_pixmap(pixmapfile)</entry>
<entry>GdkPixbuf *gc_skin_pixmap_load(char *pixmapfile)</entry>
<entry>return a gtk.gdk.Pixbuf</entry>
</row>
<row>
......
......@@ -180,6 +180,7 @@ BOARDS_C_SRC = \
target.c \
traffic.c \
wordsgame.c \
wordprocessor.c \
$(PYTHON_C_SRC)
......
......@@ -239,17 +239,27 @@ class Board_list:
else:
row_dict['%s/%s' % (board_cell[1].section,board_cell[1].name)] = \
model.append(row_dict[board_cell[1].section],
[self.pixbuf_at_height(board_cell[1].icon_name, height),
[self.pixbuf_skin_at_height(board_cell[1].icon_name, height),
_(board_cell[1].title) + '\n' + '%s/%s' % (board_cell[1].section,board_cell[1].name),
not board_cell[1].board_id in self.out_dict[self.active_profile.profile_id],
'%s/%s' % (board_cell[1].section,board_cell[1].name), self.pixbuf_configurable(board_cell[1])])
def pixbuf_at_height(self,file, height):
def pixbuf_skin_at_height(self, file, height):
pixbuf = gcompris.skin.load_pixmap(file)
width = pixbuf.get_width()* height / pixbuf.get_height()
del pixbuf
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(gcompris.DATA_DIR + '/' +
gcompris.skin.image_to_skin(file),
width, height)
return pixbuf
def pixbuf_at_height(self, file, height):
pixbuf = gcompris.utils.load_pixmap(file)
width = pixbuf.get_width()* height / pixbuf.get_height()
del pixbuf
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(gcompris.DATA_DIR + '/' + file, width, height)
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(gcompris.DATA_DIR + '/' + file,
width, height)
return pixbuf
def __create_model(self):
......
......@@ -72,6 +72,7 @@ class Gcompris_anim:
def __init__(self, gcomprisBoard):
self.gcomprisBoard = gcomprisBoard
self.timeout = 0
# There is two board in the same code
# here the diff in parameters
......
......@@ -89,7 +89,7 @@ gc_prop_default_config_directory_get ()
if(xdg_config_home)
return g_strconcat(xdg_config_home, "/.gcompris", NULL);
gchar *xdg_config= g_strconcat(home_dir, "/.config", NULL);
gc_util_create_rootdir(xdg_config);
g_free(xdg_config);
......@@ -493,9 +493,9 @@ void gc_prop_activate(GcomprisProperties *props)
tmp = g_strconcat(props->user_dir, "/Images/", _("readme"), ".txt", NULL);
g_file_set_contents(tmp,
_("Put any numer of images in this directory.\n"
_("Put any number of images in this directory.\n"
"You can include these images in your drawings and animations.\n"
"The image format supported are jpeg, png and svg.\n"),
"The image formats supported are jpeg, png and svg.\n"),
-1,
NULL);
g_free(tmp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment