Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Archive
gcompris
Commits
002af3dd
Commit
002af3dd
authored
Sep 18, 2005
by
Bruno Coudoin
Browse files
Fixed gcompris2spip to work with spip 1.8.2
Commit of XRANDR patch from debian Bug report logs - #310058
parent
2df95616
Changes
12
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
002af3dd
2005-09-18 Bruno coudoin <bruno.coudoin@free.fr>
Fixed gcompris2spip to work with spip 1.8.2
Commit of XRANDR patch from debian Bug report logs - #310058
* INSTALL:
* boards/hanoi_real.xml.in:
* docs/screenshots/memory_tux.jpg:
* docs/screenshots/memory_tux_small.jpg:
* docs/screenshots/tuxpaint.jpg:
* docs/screenshots/tuxpaint_small.jpg:
* docs/spip_menuboard.xsl:
* docs/spip_oneboard.xsl:
* po/Makefile.in.in:
* src/gcompris/gcompris.c: (init_background), (gcompris_exit),
(xrandr_init), (xrandr_get_config):
* src/gcompris/properties.c: (gcompris_properties_save):
2005-09-18 Yves Combe,,, <yves@ycombe.net>
try to fix dependances on gtk 2.4 and not 2.6
...
...
INSTALL
View file @
002af3dd
...
...
@@ -35,7 +35,7 @@ libSDL libSDL-mixer
On a Mandriva, you will need to install their -devel counterpart package in
order to be abble to compile it plus intltool, tetex.
In order to compile gcompris on a mandrake 10.
1
you must install :
In order to compile gcompris on a mandrake 10.
2
you must install :
urpmi pkgconfig
urpmi autoconf2.5
urpmi glib-gettext
...
...
boards/hanoi_real.xml.in
View file @
002af3dd
...
...
@@ -5,7 +5,7 @@
type=
"hanoi_real"
section=
"/boards"
icon=
"boardicons/hanoi_real.png"
difficulty=
"
0
"
difficulty=
"
3
"
author=
"Bruno Coudoin (bruno.coudoin@free.fr)"
boarddir=
""
>
<_title>
The Tower of Hanoi
</_title>
...
...
docs/screenshots/memory_tux.jpg
0 → 100644
View file @
002af3dd
33.5 KB
docs/screenshots/memory_tux_small.jpg
0 → 100644
View file @
002af3dd
14.4 KB
docs/screenshots/tuxpaint.jpg
0 → 100644
View file @
002af3dd
39.8 KB
docs/screenshots/tuxpaint_small.jpg
0 → 100644
View file @
002af3dd
16.5 KB
docs/spip_menuboard.xsl
View file @
002af3dd
...
...
@@ -35,9 +35,14 @@
<nom_site>
__REMOVEME__
</nom_site>
<url_site>
__REMOVEME__
</url_site>
<extra>
__REMOVEME__
</extra>
<idx>
oui
</idx>
<idx>
1
</idx>
<id_version>
0
</id_version>
<lien_auteur>
1
</lien_auteur>
<surtitre>
__REMOVEME__
</surtitre>
<soustitre>
__REMOVEME__
</soustitre>
<descriptif>
__REMOVEME__
</descriptif>
<chapo>
__REMOVEME__
</chapo>
<url_propre>
__REMOVEME__
</url_propre>
<ps>
__REMOVEME__
</ps>
<xsl:for-each
select=
"GComprisBoards/GCompris/Board[@name=$name]"
>
...
...
docs/spip_oneboard.xsl
View file @
002af3dd
...
...
@@ -36,7 +36,7 @@
<nom_site>
__REMOVEME__
</nom_site>
<url_site>
__REMOVEME__
</url_site>
<extra>
__REMOVEME__
</extra>
<idx>
oui
</idx>
<idx>
1
</idx>
<id_version>
0
</id_version>
<lien_auteur>
1
</lien_auteur>
<ps>
__REMOVEME__
</ps>
...
...
po/Makefile.in.in
View file @
002af3dd
...
...
@@ -45,7 +45,6 @@ INSTALL = @INSTALL@
INSTALL_DATA
=
@INSTALL_DATA@
CC
=
@CC@
GENCAT
=
@GENCAT@
GMSGFMT
=
@GMSGFMT@
MSGFMT
=
@MSGFMT@
XGETTEXT
=
@XGETTEXT@
...
...
@@ -73,7 +72,6 @@ POTFILES = \
CATALOGS
=
@CATALOGS@
CATOBJEXT
=
@CATOBJEXT@
INSTOBJEXT
=
@INSTOBJEXT@
.SUFFIXES
:
.SUFFIXES
:
.c .o .po .pox .gmo .mo .msg .cat
...
...
@@ -94,7 +92,7 @@ INSTOBJEXT = @INSTOBJEXT@
.po.cat
:
sed
-f
../intl/po2msg.sed <
$<
>
$*
.msg
\
&&
rm
-f
$@
&&
$(GENCAT)
$@
$*
.msg
&&
rm
-f
$@
&&
gencat
$@
$*
.msg
all
:
all-@USE_NLS@
...
...
@@ -130,22 +128,22 @@ install-data-yes: all
$(SHELL)
$(top_srcdir)
/mkinstalldirs
$$
dir
;
\
fi
;
\
if
test
-r
$$
cat
;
then
\
$(INSTALL_DATA)
$$
cat
$$
dir
/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
;
\
echo
"installing
$$
cat as
$$
dir/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
"
;
\
$(INSTALL_DATA)
$$
cat
$$
dir
/
$(GETTEXT_PACKAGE)
.mo
;
\
echo
"installing
$$
cat as
$$
dir/
$(GETTEXT_PACKAGE)
.mo
"
;
\
else
\
$(INSTALL_DATA)
$(srcdir)
/
$$
cat
$$
dir
/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
;
\
$(INSTALL_DATA)
$(srcdir)
/
$$
cat
$$
dir
/
$(GETTEXT_PACKAGE)
.mo
;
\
echo
"installing
$(srcdir)
/
$$
cat as"
\
"
$$
dir/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
"
;
\
"
$$
dir/
$(GETTEXT_PACKAGE)
.mo
"
;
\
fi
;
\
if
test
-r
$$
cat.m
;
then
\
$(INSTALL_DATA)
$$
cat.m
$$
dir
/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
.m
;
\
echo
"installing
$$
cat.m as
$$
dir/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
.m"
;
\
$(INSTALL_DATA)
$$
cat.m
$$
dir
/
$(GETTEXT_PACKAGE)
.mo
.m
;
\
echo
"installing
$$
cat.m as
$$
dir/
$(GETTEXT_PACKAGE)
.mo
.m"
;
\
else
\
if
test
-r
$(srcdir)
/
$$
cat.m
;
then
\
$(INSTALL_DATA)
$(srcdir)
/
$$
cat.m
\
$$
dir
/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
.m
;
\
$$
dir
/
$(GETTEXT_PACKAGE)
.mo
.m
;
\
echo
"installing
$(srcdir)
/
$$
cat as"
\
"
$$
dir/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
.m"
;
\
"
$$
dir/
$(GETTEXT_PACKAGE)
.mo
.m"
;
\
else
\
true
;
\
fi
;
\
...
...
@@ -171,10 +169,10 @@ uninstall:
for
cat
in
$$
catalogs
;
do
\
cat
=
`
basename
$$
cat
`
;
\
lang
=
`
echo
$$
cat
|
sed
's/\$(CATOBJEXT)$$//'
`
;
\
rm
-f
$(DESTDIR)$(localedir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
;
\
rm
-f
$(DESTDIR)$(localedir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
.m
;
\
rm
-f
$(DESTDIR)$(gnulocaledir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
;
\
rm
-f
$(DESTDIR)$(gnulocaledir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
$(INSTOBJEXT)
.m
;
\
rm
-f
$(DESTDIR)$(localedir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
.mo
;
\
rm
-f
$(DESTDIR)$(localedir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
.mo
.m
;
\
rm
-f
$(DESTDIR)$(gnulocaledir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
.mo
;
\
rm
-f
$(DESTDIR)$(gnulocaledir)
/
$$
lang/LC_MESSAGES/
$(GETTEXT_PACKAGE)
.mo
.m
;
\
done
if
test
"
$(PACKAGE)
"
=
"glib"
;
then
\
rm
-f
$(DESTDIR)$(gettextsrcdir)
/Makefile.in.in
;
\
...
...
src/gcompris/gcompris.c
View file @
002af3dd
...
...
@@ -173,6 +173,7 @@ static gboolean changed_xrandr = FALSE;
static
SizeID
xr_previous_size
=
-
1
;
static
XRANDRData
*
xrandr
;
static
void
xrandr_init
(
XRANDRData
*
data
);
static
void
xrandr_get_config
(
XRANDRData
*
data
);
gboolean
xrandr_set_config
(
XRANDRData
*
grandr
);
#endif
...
...
@@ -322,36 +323,37 @@ static void init_background()
GtkWidget
*
vbox
;
int
i
;
screen_height
=
gdk_screen_height
();
screen_width
=
gdk_screen_width
();
#ifdef XRANDR
/* Search the 800x600 Resolution */
if
(
properties
->
fullscreen
&&
!
properties
->
noxrandr
)
{
g_warning
(
"XRANDR Is compiled in. Searching a good resolution"
);
xrandr
=
g_new0
(
XRANDRData
,
1
);
xrandr_get_config
(
xrandr
);
xr_previous_size
=
(
SizeID
)
xrandr
->
xr_current_size
;
for
(
i
=
0
;
i
<
xrandr
->
xr_nsize
;
i
++
)
{
if
(
xrandr
->
xr_sizes
[
i
].
width
==
BOARDWIDTH
,
xrandr
->
xr_sizes
[
i
].
height
==
BOARDHEIGHT
+
BARHEIGHT
)
{
xrandr
->
xr_current_size
=
(
SizeID
)
i
;
xrandr_set_config
(
xrandr
);
changed_xrandr
=
TRUE
;
break
;
xrandr_init
(
xrandr
);
/* Check if XRANDR is available */
if
(
!
properties
->
noxrandr
)
{
xrandr_get_config
(
xrandr
);
xr_previous_size
=
(
SizeID
)
xrandr
->
xr_current_size
;
for
(
i
=
0
;
i
<
xrandr
->
xr_nsize
;
i
++
)
{
if
(
xrandr
->
xr_sizes
[
i
].
width
==
BOARDWIDTH
,
xrandr
->
xr_sizes
[
i
].
height
==
BOARDHEIGHT
+
BARHEIGHT
)
{
xrandr
->
xr_current_size
=
(
SizeID
)
i
;
xrandr_set_config
(
xrandr
);
break
;
}
}
screen_height
=
xrandr
->
xr_sizes
[
xrandr
->
xr_current_size
].
height
;
screen_width
=
xrandr
->
xr_sizes
[
xrandr
->
xr_current_size
].
width
;
}
screen_height
=
xrandr
->
xr_sizes
[
xrandr
->
xr_current_size
].
height
;
screen_width
=
xrandr
->
xr_sizes
[
xrandr
->
xr_current_size
].
width
;
}
else
{
screen_height
=
gdk_screen_height
();
screen_width
=
gdk_screen_width
();
}
#else
screen_height
=
gdk_screen_height
();
screen_width
=
gdk_screen_width
();
#endif
yratio
=
screen_height
/
(
float
)(
BOARDHEIGHT
+
BARHEIGHT
);
xratio
=
screen_width
/
(
float
)
BOARDWIDTH
;
yratio
=
screen_height
/
(
float
)(
BOARDHEIGHT
+
BARHEIGHT
);
xratio
=
screen_width
/
(
float
)
BOARDWIDTH
;
g_message
(
"The screen_width=%f screen_height=%f
\n
"
,
(
double
)
screen_width
,
(
double
)
screen_height
);
g_message
(
"The xratio=%f yratio=%f
\n
"
,
xratio
,
yratio
);
...
...
@@ -717,7 +719,7 @@ void gcompris_exit()
#ifdef XRANDR
/* Set back the original screen size */
if
(
(
properties
->
fullscreen
||
changed_xrandr
)
&&
properties
->
noxrandr
==
0
)
if
(
properties
->
fullscreen
&&
!
properties
->
noxrandr
)
{
/* Need to refresh our config or xrandr api will reject us */
xrandr_get_config
(
xrandr
);
...
...
@@ -871,10 +873,24 @@ void gcompris_log_handler (const gchar *log_domain,
* ------------
*/
static
void
xrandr_
get_config
(
XRANDRData
*
data
)
xrandr_
init
(
XRANDRData
*
data
)
{
data
->
xr_screen_conf
=
XRRGetScreenInfo
(
GDK_DISPLAY
(),
GDK_ROOT_WINDOW
());
if
(
data
->
xr_screen_conf
==
NULL
)
{
g_warning
(
"XRANDR not available"
);
properties
->
noxrandr
=
TRUE
;
}
else
g_warning
(
"XRANDR support enabled"
);
}
static
void
xrandr_get_config
(
XRANDRData
*
data
)
{
xrandr_init
(
data
);
data
->
xr_current_size
=
XRRConfigCurrentConfiguration
(
data
->
xr_screen_conf
,
&
data
->
xr_current_rotation
);
...
...
src/gcompris/properties.c
View file @
002af3dd
/* gcompris - properties.c
*
* Time-stamp: <2005/0
8/25 22:58:04 yves
>
* Time-stamp: <2005/0
9/18 18:00:12 bruno
>
*
* Copyright (C) 2000,2003 Bruno Coudoin
*
...
...
@@ -332,7 +332,9 @@ void gcompris_properties_save (GcomprisProperties *props)
fprintf
(
filefd
,
"%s=%d
\n
"
,
"fx"
,
props
->
fx
);
fprintf
(
filefd
,
"%s=%d
\n
"
,
"screensize"
,
props
->
screensize
);
fprintf
(
filefd
,
"%s=%d
\n
"
,
"fullscreen"
,
props
->
fullscreen
);
fprintf
(
filefd
,
"%s=%d
\n
"
,
"noxrandr"
,
props
->
noxrandr
);
/* FIXME: No more persist the noxrandr option until we provide a way to set it back
*
fprintf(filefd, "%s=%d\n", "noxrandr", props->noxrandr); */
fprintf
(
filefd
,
"%s=%d
\n
"
,
"timer"
,
props
->
timer
);
fprintf
(
filefd
,
"%s=%d
\n
"
,
"difficulty_filter"
,
props
->
difficulty_filter
);
fprintf
(
filefd
,
"%s=%d
\n
"
,
"filter_style"
,
props
->
filter_style
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment