gnumeric r16560 - in trunk: . src



Author: jbrefort
Date: Mon May 12 12:25:26 2008
New Revision: 16560
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16560&view=rev

Log:
2008-05-12  Jean Brefort  <jean brefort normalesup org>

	* configure.in: request libgoffice-0.8 >= 0.7.0.
	* src/Makefile.am: removed obsolete (moved to goffice) files.
	* src/gnm-conf-gconf.c: ditto.
	* src/gnm-conf-keyfile.c: ditto.
	* src/gnm-conf-win32.c: ditto.
	* src/gnumeric-gconf.c: ditto.
	* src/gnumeric-gconf.h: ditto.



Removed:
   trunk/src/gnm-conf-gconf.c
   trunk/src/gnm-conf-keyfile.c
   trunk/src/gnm-conf-win32.c
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/Makefile.am
   trunk/src/gnumeric-gconf.c
   trunk/src/gnumeric-gconf.h

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon May 12 12:25:26 2008
@@ -148,31 +148,9 @@
 dnl execution.  Thus we need an explicit call:
 PKG_PROG_PKG_CONFIG(0.18)
 
-libgoffice=
-goffice_ver=
-dnl Only 0.6.x, or really late 0.5.x will work
-for ver in 0.6 0.5 ; do
-  if test "x$libgoffice" = x; then
-    AC_MSG_CHECKING([libgoffice-$ver])
-    if pkg-config --exists libgoffice-$ver; then
-      libgoffice=libgoffice-$ver
-      goffice_ver=`pkg-config --modversion libgoffice-$ver`
-      AC_MSG_RESULT([found])
-    else
-      AC_MSG_RESULT([not found])
-    fi
-  fi
-done
-if test "x$libgoffice" = x; then
-  # Not important.  Things will fail below.
-  libgoffice=libgoffice-0.4
-fi
-AC_SUBST(LIBGOFFICE,$libgoffice)
-AC_SUBST(GOFFICE_VERSION,$goffice_ver)
-
 dnl *****************************
 libspreadsheet_reqs="
-	$libgoffice		>= 0.6.3
+	libgoffice-0.8	>= 0.7.0
 	libgsf-1		>= 1.14.6
 	libxml-2.0		>= 2.4.12
 "

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Mon May 12 12:25:26 2008
@@ -422,9 +422,6 @@
 EXTRA_DIST = \
 	gnm-marshalers.list			\
 	main-component.c			\
-	gnm-conf-gconf.c			\
-	gnm-conf-keyfile.c			\
-	gnm-conf-win32.c			\
 	README.gnm_float			\
 	gnumeric.rc gnm-i18n.h			\
 	GNOME_Gnumeric-gtk.xml.in		\

Modified: trunk/src/gnumeric-gconf.c
==============================================================================
--- trunk/src/gnumeric-gconf.c	(original)
+++ trunk/src/gnumeric-gconf.c	Mon May 12 12:25:26 2008
@@ -49,14 +49,6 @@
 #define d(code)
 #endif
 
-#ifdef GNM_WITH_GNOME
-#include "gnm-conf-gconf.c"
-#elif defined G_OS_WIN32
-#include "gnm-conf-win32.c"
-#else
-#include "gnm-conf-keyfile.c"
-#endif
-
 static void
 gnm_conf_init_page_setup (GOConfNode *node)
 {
@@ -370,7 +362,6 @@
 void
 gnm_conf_init (gboolean fast)
 {
-	go_conf_init ();
 	root = go_conf_get_node (NULL, GNM_CONF_DIR);
 	gnm_conf_init_essential ();
 	if (fast)
@@ -404,7 +395,6 @@
 
 
 	go_conf_free_node (root);
-	go_conf_shutdown ();
 }
 
 GOConfNode *
@@ -1042,52 +1032,3 @@
 	go_conf_set_bool (
 		root, GNM_CONF_CUTANDPASTE_DIR "/" GNM_CONF_CUTANDPASTE_PREFER_CLIPBOARD, val != FALSE);
 }
-
-/***************************************************************************/
-
-gchar *
-go_conf_get_enum_as_str (GOConfNode *node, gchar const *key)
-{
-	return go_conf_get_string (node, key);
-}
-int
-go_conf_load_enum (GOConfNode *node, gchar const *key, GType t, int default_val)
-{
-	int	 res;
-	gchar   *val_str = go_conf_load_string (node, key);
-	gboolean use_default = TRUE;
-
-	if (NULL != val_str) {
-		GEnumClass *enum_class = G_ENUM_CLASS (g_type_class_ref (t));
-		GEnumValue *enum_value = g_enum_get_value_by_nick (enum_class, val_str);
-		if (NULL == enum_value)
-			enum_value = g_enum_get_value_by_name (enum_class, val_str);
-
-		if (NULL != enum_value) {
-			use_default = FALSE;
-			res = enum_value->value;
-		} else {
-			g_warning ("Unknown value '%s' for %s", val_str, key);
-		}
-
-		g_type_class_unref (enum_class);
-		g_free (val_str);
-
-	}
-
-	if (use_default) {
-		d (g_warning ("Using default value '%d'", default_val));
-		return default_val;
-	}
-	return res;
-}
-
-void
-go_conf_set_enum (GOConfNode *node, gchar const *key, GType t, gint val)
-{
-	GEnumClass *enum_class = G_ENUM_CLASS (g_type_class_ref (t));
-	GEnumValue *enum_value = g_enum_get_value (enum_class, val);
-	go_conf_set_string (node, key, enum_value->value_nick);
-	g_type_class_unref (enum_class);
-}
-

Modified: trunk/src/gnumeric-gconf.h
==============================================================================
--- trunk/src/gnumeric-gconf.h	(original)
+++ trunk/src/gnumeric-gconf.h	Mon May 12 12:25:26 2008
@@ -7,6 +7,7 @@
 #include <glib-object.h>
 #include <print-info.h>
 #include <libgnumeric.h>
+#include <goffice/app/go-conf.h>
 #include <goffice/utils/go-geometry.h>
 #include <gtk/gtkprintsettings.h>
 
@@ -99,8 +100,6 @@
 } GnmAppPrefs;
 GNM_VAR_DECL GnmAppPrefs const *gnm_app_prefs;
 
-typedef struct _GOConfNode GOConfNode;
-
 void     gnm_conf_init (gboolean fast);
 void     gnm_conf_shutdown (void);
 GOConfNode *gnm_conf_get_root (void);
@@ -200,45 +199,6 @@
 /* application interface */
 void     gnm_gconf_set_prefer_clipboard  (gboolean value);
 
-/**************************************************************/
-
-GOConfNode * go_conf_get_node       (GOConfNode *parent, gchar const *key);
-void	 go_conf_free_node	    (GOConfNode *node);
-
-gchar	*go_conf_get_short_desc     (GOConfNode *node, gchar const *key);
-gchar	*go_conf_get_long_desc      (GOConfNode *node, gchar const *key);
-GType	 go_conf_get_type	    (GOConfNode *node, gchar const *key);
-gchar	*go_conf_get_value_as_str   (GOConfNode *node, gchar const *key);
-gboolean go_conf_set_value_from_str (GOConfNode *node, gchar const *key, gchar const *val_str);
-
-gboolean go_conf_get_bool	(GOConfNode *node, gchar const *key);
-gint	 go_conf_get_int	(GOConfNode *node, gchar const *key);
-gdouble	 go_conf_get_double	(GOConfNode *node, gchar const *key);
-gchar	*go_conf_get_string	(GOConfNode *node, gchar const *key);
-GSList	*go_conf_get_str_list	(GOConfNode *node, gchar const *key);
-gchar	*go_conf_get_enum_as_str(GOConfNode *node, gchar const *key);
-
-gboolean go_conf_load_bool	(GOConfNode *node, gchar const *key, gboolean default_val);
-gint	 go_conf_load_int	(GOConfNode *node, gchar const *key, gint minima, gint maxima, gint default_val);
-gdouble	 go_conf_load_double	(GOConfNode *node, gchar const *key, gdouble minima, gdouble maxima, gdouble default_val);
-gchar	*go_conf_load_string	(GOConfNode *node, gchar const *key);
-GSList	*go_conf_load_str_list	(GOConfNode *node, gchar const *key);
-int	 go_conf_load_enum	(GOConfNode *node, gchar const *key, GType t, int default_val);
-
-void	 go_conf_set_bool	(GOConfNode *node, gchar const *key, gboolean val);
-void	 go_conf_set_int	(GOConfNode *node, gchar const *key, gint val);
-void	 go_conf_set_double	(GOConfNode *node, gchar const *key, gnm_float val);
-void	 go_conf_set_string	(GOConfNode *node, gchar const *key, gchar const *str);
-void	 go_conf_set_str_list	(GOConfNode *node, gchar const *key, GSList *list);
-void	 go_conf_set_enum	(GOConfNode *node, gchar const *key, GType t, gint val);
-
-void	 go_conf_sync		(GOConfNode *node);
-
-typedef void (*GOConfMonitorFunc) (GOConfNode *node, gchar const *key, gpointer data);
-void	 go_conf_remove_monitor	(guint monitor_id);
-guint	 go_conf_add_monitor	(GOConfNode *node, gchar const *key,
-				 GOConfMonitorFunc monitor, gpointer data);
-
 G_END_DECLS
 
 #endif /* _GNM_GCONF_H_ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]