diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rwxr-xr-x | docs/gcompris2spip.pl | 6 | ||||
-rw-r--r-- | gcompris-edit.png | bin | 4862 -> 4168 bytes | |||
-rw-r--r-- | gcompris.gif | bin | 1240 -> 1239 bytes | |||
-rw-r--r-- | gcompris.ico | bin | 3774 -> 9662 bytes | |||
-rw-r--r-- | gcompris.png | bin | 3111 -> 2415 bytes | |||
-rw-r--r-- | src/boards/py-mod-gcompris.c | 4 | ||||
-rw-r--r-- | src/gcompris/gcompris.c | 64 | ||||
-rw-r--r-- | src/gcompris/properties.c | 3 | ||||
-rw-r--r-- | src/gcompris/properties.h | 3 |
10 files changed, 78 insertions, 21 deletions
@@ -1,6 +1,25 @@ +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: diff --git a/docs/gcompris2spip.pl b/docs/gcompris2spip.pl index f669799..f158b85 100755 --- a/docs/gcompris2spip.pl +++ b/docs/gcompris2spip.pl @@ -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, diff --git a/gcompris-edit.png b/gcompris-edit.png Binary files differindex ab7149c..6207839 100644 --- a/gcompris-edit.png +++ b/gcompris-edit.png diff --git a/gcompris.gif b/gcompris.gif Binary files differindex a58a1e6..086c1a3 100644 --- a/gcompris.gif +++ b/gcompris.gif diff --git a/gcompris.ico b/gcompris.ico Binary files differindex 4d0bb39..7dfdbf6 100644 --- a/gcompris.ico +++ b/gcompris.ico diff --git a/gcompris.png b/gcompris.png Binary files differindex 7773796..c7dce92 100644 --- a/gcompris.png +++ b/gcompris.png diff --git a/src/boards/py-mod-gcompris.c b/src/boards/py-mod-gcompris.c index 1f00df4..d9820eb 100644 --- a/src/boards/py-mod-gcompris.c +++ b/src/boards/py-mod-gcompris.c @@ -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; diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c index 31cbfd3..26cbe5a 100644 --- a/src/gcompris/gcompris.c +++ b/src/gcompris/gcompris.c @@ -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 /***************************************** diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c index b85e8ef..3b0787f 100644 --- a/src/gcompris/properties.c +++ b/src/gcompris/properties.c @@ -1,6 +1,6 @@ /* 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; diff --git a/src/gcompris/properties.h b/src/gcompris/properties.h index c864b64..4549633 100644 --- a/src/gcompris/properties.h +++ b/src/gcompris/properties.h @@ -1,6 +1,6 @@ /* 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; |