[gcompris] fixed bug #593656, removed the server feature.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] fixed bug #593656, removed the server feature.
- Date: Thu, 2 Aug 2012 20:48:33 +0000 (UTC)
commit 21ef5ecca3165e6069bc329b7741b6358c1f44fb
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Thu Aug 2 22:47:19 2012 +0200
fixed bug #593656, removed the server feature.
We no more depend on the libgnet.
configure.ac | 15 --
src/gcompris/Makefile.am | 2 -
src/gcompris/Makefile.mingw | 1 -
src/gcompris/board_config_wordlist.c | 1 -
src/gcompris/gameutil.c | 4 -
src/gcompris/gc_net.c | 388 ----------------------------------
src/gcompris/gc_net.h | 46 ----
src/gcompris/gcompris.c | 47 +----
src/gcompris/gcompris.h | 1 -
src/gcompris/gcompris_db.c | 1 +
src/gcompris/images_selector.c | 2 +-
src/gcompris/log.c | 1 +
src/gcompris/properties.c | 5 +-
src/gcompris/properties.h | 2 -
14 files changed, 5 insertions(+), 511 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a5b6a62..43adf03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -401,20 +401,6 @@ fi
AC_SUBST(AUDIO_CFLAGS)
AC_SUBST(AUDIO_LIBS)
-dnl GNET support
-AC_MSG_CHECKING([wether we build with GNET (if not, networking will be disabled)])
-AC_ARG_ENABLE(gnet,
- AC_HELP_STRING(
- [--disable-gnet],
- [Turn off gnet (will not let GCompris fetch content from a web server)]),
- with_gnet="$enableval", with_gnet="yes")
-AC_MSG_RESULT($with_gnet)
-
-if test x$with_gnet = xyes; then
- PKG_CHECK_MODULES(GNET, gnet-2.0,, AC_MSG_ERROR([*** GNET not found!]))
- AC_DEFINE([USE_GNET], 1,[Networking is enabled])
-fi
-
dnl SQLITE support
AC_MSG_CHECKING([wether we build with SQLITE (if not profile will be disabled)])
AC_ARG_ENABLE(sqlite,
@@ -893,7 +879,6 @@ echo "Python plugin = $build_python_plugin"
echo "SQLITE database (--enable-sqlite) = $with_sqlite (profiles depend on this)"
echo "Sugar DE Support = $with_sugar"
-echo "GNET Networking (--enable-gnet) = $with_gnet (networking depends on this)"
echo "BINRELOC (--enable-binreloc) = $br_cv_binreloc"
echo "NSBundle (--enable-nsbundle) = $nsbundle"
echo "SDL Mixer (--enable-sdlmixer) = $with_sdlmixer (default is gstreamer)"
diff --git a/src/gcompris/Makefile.am b/src/gcompris/Makefile.am
index d9fe1d9..089cf16 100644
--- a/src/gcompris/Makefile.am
+++ b/src/gcompris/Makefile.am
@@ -69,8 +69,6 @@ gcompris_SOURCES = \
gameutil.c \
gameutil.h \
gc_core.h \
- gc_net.c \
- gc_net.h \
gcompris-board.h \
gcompris.c \
gcompris.h \
diff --git a/src/gcompris/Makefile.mingw b/src/gcompris/Makefile.mingw
index ad41f20..68a9a72 100644
--- a/src/gcompris/Makefile.mingw
+++ b/src/gcompris/Makefile.mingw
@@ -100,7 +100,6 @@ EXE_C_SRC = \
gcompris_confirm.c \
gcompris_db.c \
gcompris_im.c \
- gc_net.c \
help.c \
images_selector.c \
log.c \
diff --git a/src/gcompris/board_config_wordlist.c b/src/gcompris/board_config_wordlist.c
index 39351f2..1b8255c 100644
--- a/src/gcompris/board_config_wordlist.c
+++ b/src/gcompris/board_config_wordlist.c
@@ -142,7 +142,6 @@ static void _return_clicked(GtkWidget *w, gpointer data)
gchar *filename;
filename = gc_file_find_absolute_writeable(u->wordlist->filename);
- gc_cache_remove(filename);
g_free(filename);
level = gtk_combo_box_get_active(u->combo_level)+1;
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index 23e09cb..4ba6f61 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -578,8 +578,6 @@ gc_file_find_absolute(const gchar *format, ...)
* Search it on the file system
*/
- if(properties->server)
- dir_to_search[i++] = "";
dir_to_search[i++] = properties->user_dir;
dir_to_search[i++] = properties->package_data_dir;
dir_to_search[i++] = properties->package_skin_dir;
@@ -683,8 +681,6 @@ gc_file_find_absolute_writeable(const gchar *format, ...)
}
}
g_free(dirname);
- if(absolute_filename)
- gc_cache_add(absolute_filename);
return absolute_filename;
}
diff --git a/src/gcompris/gcompris.c b/src/gcompris/gcompris.c
index c7780ea..ae3b48e 100644
--- a/src/gcompris/gcompris.c
+++ b/src/gcompris/gcompris.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <time.h>
#include <string.h>
+#include <stdlib.h>
#ifdef WIN32
// WIN32
@@ -142,9 +143,6 @@ static gint popt_no_quit = FALSE;
static gint popt_no_config = FALSE;
static gint popt_no_level = FALSE;
static gint popt_no_database = FALSE;
-static gchar *popt_server = NULL;
-static gint *popt_web_only = NULL;
-static gchar *popt_cache_dir = NULL;
static gchar *popt_drag_mode = NULL;
static gint popt_no_zoom = FALSE;
static gint popt_test = FALSE;
@@ -241,16 +239,6 @@ static GOptionEntry options[] = {
{"disable-database",'\0', 0, G_OPTION_ARG_NONE, &popt_no_database,
N_("Disable the database (slower start and no user log)"), NULL},
- {"server", '\0', 0, G_OPTION_ARG_STRING, &popt_server,
- N_("GCompris will get images, sounds and activity data from this server if not found locally."), NULL},
-
- {"web-only", '\0', 0, G_OPTION_ARG_NONE, &popt_web_only,
- N_("Only when --server is provided, disable check for local resource first."
- " Data are always taken from the web server."), NULL},
-
- {"cache-dir", '\0', 0, G_OPTION_ARG_STRING, &popt_cache_dir,
- N_("In server mode, specify the cache directory used to avoid useless downloads."), NULL},
-
{"drag-mode", 'g', 0, G_OPTION_ARG_STRING, &popt_drag_mode,
N_("Global drag and drop mode: normal, 2clicks, both. Default mode is normal."), NULL},
@@ -1201,8 +1189,6 @@ static void cleanup()
sugar_cleanup();
gc_fullscreen_set(FALSE);
gc_menu_destroy();
- gc_net_destroy();
- gc_cache_destroy();
gc_prop_destroy(gc_prop_get());
}
@@ -1953,33 +1939,6 @@ main (int argc, char *argv[])
properties->reread_menu = TRUE;
}
- if (popt_server){
-#ifdef USE_GNET
- properties->server = g_strdup(popt_server);
- printf(" Server '%s'\n", properties->server);
-#else
- printf(_("The --server option cannot be used because"
- " GCompris has been compiled without network support!"));
- exit(1);
-#endif
- }
-
- if(popt_web_only) {
- g_free(properties->package_data_dir);
- properties->package_data_dir = g_strdup("");
-
- g_free(properties->system_icon_dir);
- properties->system_icon_dir = g_strdup("");
- }
-
- if (popt_server){
- if(popt_cache_dir)
- properties->cache_dir = g_strdup(popt_cache_dir);
- else
- properties->cache_dir = g_build_filename(g_get_user_cache_dir(), "gcompris", NULL);
- printf(" Cache dir '%s'\n",properties->cache_dir);
- }
-
if (popt_drag_mode){
if (strcmp(popt_drag_mode, "default") == 0)
properties->drag_mode = GC_DRAG_MODE_GRAB;
@@ -2051,10 +2010,6 @@ main (int argc, char *argv[])
single_instance_check();
- /* networking init */
- gc_net_init();
- gc_cache_init();
-
gc_sound_build_music_list();
if(properties->music || properties->fx)
diff --git a/src/gcompris/gcompris.h b/src/gcompris/gcompris.h
index 2c0f30e..a8d96c3 100644
--- a/src/gcompris/gcompris.h
+++ b/src/gcompris/gcompris.h
@@ -39,7 +39,6 @@
#include "board_config.h"
#include "properties.h"
#include "gameutil.h"
-#include "gc_net.h"
#include "bonus.h"
#include "timer.h"
#include "score.h"
diff --git a/src/gcompris/gcompris_db.c b/src/gcompris/gcompris_db.c
index 1347640..2788a3d 100644
--- a/src/gcompris/gcompris_db.c
+++ b/src/gcompris/gcompris_db.c
@@ -17,6 +17,7 @@
*/
#include <string.h>
+#include <stdlib.h>
#include "gcompris.h"
#include "status.h"
diff --git a/src/gcompris/images_selector.c b/src/gcompris/images_selector.c
index 600d969..ad18d65 100644
--- a/src/gcompris/images_selector.c
+++ b/src/gcompris/images_selector.c
@@ -286,7 +286,7 @@ gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset,
g_free(dataseturl);
dataseturl = g_strconcat("boards/", dataset, NULL);
/* TODO */
- filelist = NULL; //gc_net_dir_read_name(dataseturl, ".xml");
+ filelist = NULL;
for (i = filelist; i != NULL; i = g_slist_next (i))
{
diff --git a/src/gcompris/log.c b/src/gcompris/log.c
index 5994246..517a980 100644
--- a/src/gcompris/log.c
+++ b/src/gcompris/log.c
@@ -29,6 +29,7 @@
*/
#include <time.h>
+#include <stdlib.h>
#include <gcompris.h>
#include "gcompris_db.h"
diff --git a/src/gcompris/properties.c b/src/gcompris/properties.c
index c846b18..3f553a3 100644
--- a/src/gcompris/properties.c
+++ b/src/gcompris/properties.c
@@ -20,6 +20,7 @@
#include <glib/gstdio.h>
#include <fcntl.h>
#include <string.h>
+#include <stdlib.h>
#include "gcompris.h"
@@ -176,8 +177,6 @@ gc_prop_new ()
tmp->package_python_plugin_dir = NULL;
tmp->menu_dir = NULL;
tmp->system_icon_dir = NULL;
- tmp->cache_dir = NULL;
- tmp->server = NULL;
tmp->drag_mode = GC_DRAG_MODE_GRAB;
tmp->zoom = 1;
@@ -531,7 +530,6 @@ gc_prop_destroy (GcomprisProperties *props)
g_free(props->package_python_plugin_dir);
g_free(props->menu_dir);
g_free(props->system_icon_dir);
- g_free(props->cache_dir);
g_free(props->locale);
g_free(props->skin);
g_free(props->key);
@@ -540,7 +538,6 @@ gc_prop_destroy (GcomprisProperties *props)
g_free(props->database);
g_free(props->config_dir);
g_free(props->user_dir);
- g_free(props->server);
g_free(props->root_menu);
g_free(props);
}
diff --git a/src/gcompris/properties.h b/src/gcompris/properties.h
index 5770c95..b1e152f 100644
--- a/src/gcompris/properties.h
+++ b/src/gcompris/properties.h
@@ -49,7 +49,6 @@ typedef struct {
gchar *package_python_plugin_dir;
gchar *menu_dir;
gchar *system_icon_dir;
- gchar *cache_dir;
gchar *locale;
gchar *skin;
gchar *key;
@@ -65,7 +64,6 @@ typedef struct {
GtkIMContext *context;
gchar *default_context;
gint experimental;
- gchar *server;
gint drag_mode;
gint zoom;
gboolean bar_hidden; /* Is the bar hiden */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]