Commit 7ec96c29 authored by Bruno Coudoin's avatar Bruno Coudoin

added pt_BR section redone based on Franck GCompris logo plane redone

	* docs/gcompris2spip.pl: added pt_BR section
	* gcompris-edit.png: redone based on Franck GCompris logo plane
	* gcompris.gif: redone based on Franck GCompris logo plane
	* gcompris.ico: redone based on Franck GCompris logo plane
	* gcompris.png: redone based on Franck GCompris logo plane
	* src/boards/py-mod-gcompris.c: (py_gcompris_get_board_conf),
	(pyGcomprisConfCallback), (py_gcompris_combo_box),
	(pyGcomprisTextCallback): removed compilation warnings
	* src/gcompris/gcompris.c: (setup_window),
	(gcompris_canvas_item_grab), (gcompris_canvas_item_ungrab),
	(xf86_vidmode_set_fullscreen), (xf86_window_configured),
	(xf86_focus_changed): fixed fullscreen issues by Hans de Goede.
	* src/gcompris/properties.c: (gcompris_properties_new): added display_resource option (unused yet)
	* src/gcompris/properties.h: added display_resource option
parent 54a25eca
2006-07-08 Bruno coudoin <bruno.coudoin@free.fr>
* docs/gcompris2spip.pl: added pt_BR section
* gcompris-edit.png: redone based on Franck GCompris logo plane
* gcompris.gif: redone based on Franck GCompris logo plane
* gcompris.ico: redone based on Franck GCompris logo plane
* gcompris.png: redone based on Franck GCompris logo plane
* src/boards/py-mod-gcompris.c: (py_gcompris_get_board_conf),
(pyGcomprisConfCallback), (py_gcompris_combo_box),
(pyGcomprisTextCallback): removed compilation warnings
* src/gcompris/gcompris.c: (setup_window),
(gcompris_canvas_item_grab), (gcompris_canvas_item_ungrab),
(xf86_vidmode_set_fullscreen), (xf86_window_configured),
(xf86_focus_changed): fixed fullscreen issues by Hans de Goede.
* src/gcompris/properties.c: (gcompris_properties_new): added display_resource option (unused yet)
* src/gcompris/properties.h: added display_resource option
2006-06-29 Bruno coudoin <bruno.coudoin@free.fr>
Rafal Konkolewski created the map of poland internals.
Source picture was http://pl.wikipedia.org/wiki/Grafika:Wojewodztwa.png
* boards/geography.xml.in:
* boards/geography/Makefile.am:
......
......@@ -75,7 +75,7 @@ my %sections = (
"pa", 0,
"pl", 125,
"pt", 28,
"pt_BR", 0,
"pt_BR", 141,
"ro", 0,
"ru", 0,
"rw", 0,
......@@ -130,7 +130,7 @@ my %rubriques = (
"pa", 0,
"pl", 134,
"pt", 56,
"pt_BR", 0,
"pt_BR", 142,
"ro", 0,
"ru", 0,
"rw", 0,
......@@ -186,7 +186,7 @@ my %rubriques_all = (
"pa", 0,
"pl", 140,
"pt", 72,
"pt_BR", 0,
"pt_BR", 143,
"ro", 0,
"ru", 0,
"rw", 0,
......
gcompris-edit.png

4.75 KB | W: | H:

gcompris-edit.png

4.07 KB | W: | H:

gcompris-edit.png
gcompris-edit.png
gcompris-edit.png
gcompris-edit.png
  • 2-up
  • Swipe
  • Onion skin
gcompris.gif

1.21 KB | W: | H:

gcompris.gif

1.21 KB | W: | H:

gcompris.gif
gcompris.gif
gcompris.gif
gcompris.gif
  • 2-up
  • Swipe
  • Onion skin
gcompris.ico

3.69 KB | W: | H:

gcompris.ico

9.44 KB | W: | H:

gcompris.ico
gcompris.ico
gcompris.ico
gcompris.ico
  • 2-up
  • Swipe
  • Onion skin
gcompris.png

3.04 KB | W: | H:

gcompris.png

2.36 KB | W: | H:

gcompris.png
gcompris.png
gcompris.png
gcompris.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -934,7 +934,6 @@ static PyObject*
py_gcompris_get_board_conf(PyObject* self, PyObject* args)
{
PyObject *pydict;
PyObject *value;
GHashTable *table;
/* Parse arguments */
......@@ -1057,7 +1056,6 @@ py_gcompris_set_board_conf (PyObject* self, PyObject* args)
static PyObject* pyGcomprisConfCallbackFunc = NULL;
static GcomprisConfCallback pyGcomprisConfCallback(GHashTable* table){
PyObject* args;
PyObject* result;
PyGILState_STATE gil;
......@@ -1146,7 +1144,6 @@ py_gcompris_combo_box(PyObject* self, PyObject* args)
PyObject *py_list;
gchar *label;
gchar *key;
gchar *item;
gchar *init;
GList *list = NULL;
......@@ -1440,7 +1437,6 @@ py_gcompris_reset_locale(PyObject* self, PyObject* args)
static GHashTable *text_callbacks = NULL;
static gboolean pyGcomprisTextCallback(gchar *key, gchar *text, GtkLabel *label){
PyObject* args;
PyObject* result;
gboolean validate;
......
......@@ -191,12 +191,17 @@ static struct
XF86VidModeModeInfo orig_mode;
int orig_viewport_x;
int orig_viewport_y;
} XF86VidModeData = { { 0 }, { 0 }, 0, 0 };
int window_x;
int window_y;
gboolean fullscreen_active;
} XF86VidModeData = { { 0 }, { 0 }, 0, 0, 0, 0, FALSE };
static void xf86_vidmode_init( void );
static void xf86_vidmode_set_fullscreen( int state );
static gint xf86_window_configured(GtkWindow *window,
GdkEventConfigure *event, gpointer param);
static gint xf86_focus_changed(GtkWindow *window,
GdkEventFocus *event, gpointer param);
#endif
/****************************************************************************/
......@@ -658,10 +663,16 @@ static void setup_window ()
#ifdef XF86_VIDMODE
/* The Xf86VidMode code needs to accuratly now the window position,
this is the only way to get it. */
gtk_widget_add_events(GTK_WIDGET(window), GDK_STRUCTURE_MASK);
this is the only way to get it, and it needs to track the focus to
enable/disable fullscreen on alt-tab */
gtk_widget_add_events(GTK_WIDGET(window),
GDK_STRUCTURE_MASK|GDK_FOCUS_CHANGE_MASK);
gtk_signal_connect (GTK_OBJECT (window), "configure_event",
GTK_SIGNAL_FUNC (xf86_window_configured), 0);
gtk_signal_connect (GTK_OBJECT (window), "focus_in_event",
GTK_SIGNAL_FUNC (xf86_focus_changed), 0);
gtk_signal_connect (GTK_OBJECT (window), "focus_out_event",
GTK_SIGNAL_FUNC (xf86_focus_changed), 0);
#endif
/* For non anti alias canvas */
......@@ -850,7 +861,7 @@ int gcompris_canvas_item_grab (GnomeCanvasItem *item, unsigned int event_mask,
#ifdef XF86_VIDMODE
/* When fullscreen override mouse grab with our own which
confines the cursor to our fullscreen window */
if (properties->fullscreen && !properties->noxf86vm)
if (XF86VidModeData.fullscreen_active)
if (gdk_pointer_grab(item->canvas->layout.bin_window, FALSE, event_mask,
window->window, cursor, etime+1) != GDK_GRAB_SUCCESS)
g_warning("Pointer grab failed");
......@@ -865,7 +876,7 @@ void gcompris_canvas_item_ungrab (GnomeCanvasItem *item, guint32 etime)
#ifdef XF86_VIDMODE
/* When fullscreen restore the normal mouse grab which avoids
scrolling the virtual desktop */
if (properties->fullscreen && !properties->noxf86vm)
if (XF86VidModeData.fullscreen_active)
if (gdk_pointer_grab(window->window, TRUE, 0, window->window, NULL,
etime+1) != GDK_GRAB_SUCCESS)
g_warning("Pointer grab failed");
......@@ -1095,32 +1106,45 @@ xf86_vidmode_init ( void )
static void
xf86_vidmode_set_fullscreen ( int state )
{
if (properties->noxf86vm)
if (properties->noxf86vm || XF86VidModeData.fullscreen_active == state)
return;
printf("setfullscreen %d\n", state);
if (state)
{
if (!XF86VidModeSwitchToMode(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
gdk_screen_get_default()), &XF86VidModeData.fs_mode))
g_warning("XF86VidMode couldnot switch resolution");
g_warning("XF86VidMode could not switch resolution");
/* Notice the pointer must be grabbed before setting the viewport
otherwise setviewport may get "canceled" by the pointer being outside
the current viewport. */
if (gdk_pointer_grab(window->window, TRUE, 0, window->window, NULL,
GDK_CURRENT_TIME) != GDK_GRAB_SUCCESS)
g_warning("Pointer grab failed");
if (!XF86VidModeSetViewPort(GDK_DISPLAY(),
GDK_SCREEN_XNUMBER(gdk_screen_get_default()),
XF86VidModeData.window_x, XF86VidModeData.window_y))
g_warning("XF86VidMode could not change viewport");
}
else
{
if (!XF86VidModeSwitchToMode(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
gdk_screen_get_default()), &XF86VidModeData.orig_mode))
g_warning("XF86VidMode couldnot restore original resolution");
g_warning("XF86VidMode could not restore original resolution");
gdk_pointer_ungrab(GDK_CURRENT_TIME);
if (XF86VidModeData.orig_viewport_x || XF86VidModeData.orig_viewport_y)
if (!XF86VidModeSetViewPort(GDK_DISPLAY(), GDK_SCREEN_XNUMBER(
gdk_screen_get_default()), XF86VidModeData.orig_viewport_x,
XF86VidModeData.orig_viewport_y))
g_warning("XF86VidMode couldnot restore original viewport");
g_warning("XF86VidMode could not restore original viewport");
}
XF86VidModeData.fullscreen_active = state;
}
/* We need to accuratly now the window position, this is the only way to get
it. We also use this as _the_ place to grab the pointer, because gtk seems
it. We also grab the pointer to be sure it is really grabbed. Gtk seems
to be playing tricks with the window (destroying and recreating?) when
switching fullscreen <-> window which sometimes (race condition) causes
the pointer to not be properly grabbed.
......@@ -1131,18 +1155,34 @@ xf86_vidmode_set_fullscreen ( int state )
static gint xf86_window_configured(GtkWindow *window,
GdkEventConfigure *event, gpointer param)
{
if(properties->fullscreen && !properties->noxf86vm) {
XF86VidModeData.window_x = event->x;
XF86VidModeData.window_y = event->y;
printf("configure: %dx%d, fullscreen_active: %d\n", event->x, event->y,
(int)XF86VidModeData.fullscreen_active);
if(XF86VidModeData.fullscreen_active) {
if (gdk_pointer_grab(event->window, TRUE, 0, event->window, NULL,
GDK_CURRENT_TIME) != GDK_GRAB_SUCCESS)
g_warning("Pointer grab failed");
if (!XF86VidModeSetViewPort(GDK_DISPLAY(),
GDK_SCREEN_XNUMBER(gdk_screen_get_default()), event->x, event->y))
g_warning("XF86VidMode couldnot change viewport");
g_warning("XF86VidMode could not change viewport");
}
/* Act as if we aren't there / aren't hooked up */
return FALSE;
}
static gint xf86_focus_changed(GtkWindow *window,
GdkEventFocus *event, gpointer param)
{
printf("focus change %d\n", (int)event->in);
if (properties->fullscreen)
xf86_vidmode_set_fullscreen(event->in);
/* Act as if we aren't there / aren't hooked up */
return FALSE;
}
#endif
/*****************************************
......
/* gcompris - properties.c
*
* Time-stamp: <2006/04/28 00:52:51 bruno>
* Time-stamp: <2006/06/26 22:25:53 bruno>
*
* Copyright (C) 2000,2003 Bruno Coudoin
*
......@@ -170,6 +170,7 @@ GcomprisProperties *gcompris_properties_new ()
tmp->difficulty_filter = 1; /* No difficulty filter by default */
tmp->disable_quit = 0; /* Used to remove the quit button from the bar. Use it for kiosk mode */
tmp->disable_config = 0; /* Used to remove the config button from the bar. Use it for kiosk mode */
tmp->display_resource = 0;
tmp->root_menu = "/";
tmp->local_directory = NULL;
tmp->package_data_dir = PACKAGE_DATA_DIR;
......
/* gcompris - properties.h
*
* Time-stamp: <2006/04/28 00:52:34 bruno>
* Time-stamp: <2006/06/26 22:25:02 bruno>
*
* Copyright (C) 2000 Bruno Coudoin
*
......@@ -37,6 +37,7 @@ typedef struct {
gint difficulty_max;
gint disable_quit;
gint disable_config;
gint display_resource;
gchar *root_menu;
gchar *local_directory;
gchar *user_data_dir;
......
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