Commit 2df95616 authored by Yves Combe's avatar Yves Combe
Browse files

try to fix dependances on gtk 2.4 and not 2.6

parent 62dd4bf7
2005-09-18 Yves Combe,,, <yves@ycombe.net>
try to fix dependances on gtk 2.4 and not 2.6
* po/Makefile.in.in:
* src/gcompris/board_config.c: (gcompris_get_active_text),
(gcompris_combo_box_changed), (gcompris_combo_locales_changed):
2005-09-17 Bruno coudoin <bruno.coudoin@free.fr>
Release 7.0.1
......
......@@ -45,6 +45,7 @@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
......@@ -72,6 +73,7 @@ POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
......@@ -92,7 +94,7 @@ CATOBJEXT = @CATOBJEXT@
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
&& rm -f $@ && $(GENCAT) $@ $*.msg
all: all-@USE_NLS@
......@@ -128,22 +130,22 @@ install-data-yes: all
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE).mo"; \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE).mo; \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
......@@ -169,10 +171,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).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; \
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; \
done
if test "$(PACKAGE)" = "glib"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
......
/* gcompris - board_config.c
*
* Time-stamp: <2005/08/29 00:34:21 yves>
* Time-stamp: <2005/09/18 00:01:46 yves>
*
* Copyright (C) 2001 Pascal Georges
*
......@@ -237,12 +237,30 @@ GtkCheckButton *gcompris_boolean_box(const gchar *label, gchar *key, gboolean in
return GTK_CHECK_BUTTON(CheckBox);
}
/* code get from gtk */
/* included here to not depend on gtk 2.6 */
static gchar *
gcompris_get_active_text (GtkComboBox *combo_box)
{
GtkTreeIter iter;
gchar *text = NULL;
g_return_val_if_fail (GTK_IS_LIST_STORE (gtk_combo_box_get_model (combo_box)), NULL);
if (gtk_combo_box_get_active_iter (combo_box, &iter))
gtk_tree_model_get (gtk_combo_box_get_model (combo_box), &iter,
0, &text, -1);
return text;
}
void gcompris_combo_box_changed(GtkComboBox *combobox,
gpointer key)
{
gchar *the_key = g_strdup((gchar *)key);
gchar *value = g_strdup_printf("%s", gtk_combo_box_get_active_text (combobox));
gchar *value = g_strdup_printf("%s", gcompris_get_active_text (combobox));
g_hash_table_replace(hash_conf, (gpointer) the_key, (gpointer) value);
}
......@@ -562,7 +580,7 @@ void gcompris_combo_locales_changed(GtkComboBox *combobox,
/* Default value of gcompris selected */
value = g_strdup ("NULL");
else
value = gtk_combo_box_get_active_text (combobox);
value = gcompris_get_active_text (combobox);
g_hash_table_replace(hash_conf, (gpointer) the_key, (gpointer) value);
}
......
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