Raise dependencies: GLib 2.6, Pango 1.8, GTK+ 2.6.

Ask for GLib 2.6 and GTK+ 2.6. Let the included GOffice 0.0.4 and LibGSF
1.12.3 use their native base dependencies. Remove all #ifdefs and
compatibility code that were necessary to make GnuCash, GOffice and
LibGSF compile on an older setup (GLib 2.4, Pango 1.6, GTK+ 2.4).


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15400 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2007-01-20 15:21:35 +00:00
parent eb73260220
commit 35f43c0a1a
58 changed files with 15 additions and 5907 deletions

View File

@ -182,8 +182,8 @@ fi
### -------------------------------------------------------------------------- ### --------------------------------------------------------------------------
### Glib checks.. ### Glib checks..
AM_PATH_GLIB_2_0(2.4.0,,AC_MSG_ERROR([ AM_PATH_GLIB_2_0(2.6.0,,AC_MSG_ERROR([
*** GLIB >= 2.4 is required to build Gnucash; please make sure you have the *** GLIB >= 2.6 is required to build Gnucash; please make sure you have the
*** development headers installed. The latest version of GLIB is *** development headers installed. The latest version of GLIB is
*** always available at ftp://ftp.gnome.org/pub/gnome/sources/glib/.]), *** always available at ftp://ftp.gnome.org/pub/gnome/sources/glib/.]),
gthread gobject gmodule) gthread gobject gmodule)
@ -193,21 +193,6 @@ then
AC_MSG_ERROR([Cannot find glib. Check config.log]) AC_MSG_ERROR([Cannot find glib. Check config.log])
fi fi
AC_MSG_CHECKING(for GLIB - version >= 2.6.0)
if $PKG_CONFIG 'glib-2.0 >= 2.6.0'
then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GLIB26,1,[System has glib 2.6.0 or better])
HAVE_GLIB26=yes
else
GLIB24_LIBS="$GLIB_LIBS"
GLIB_LIBS="\${top_builddir}/lib/glib26/libgncglib.la $GLIB_LIBS"
GLIB_CFLAGS="-I\${top_srcdir}/lib/glib26 $GLIB_CFLAGS"
AC_MSG_RESULT(no)
AC_SUBST(GLIB24_LIBS)
fi
AM_CONDITIONAL(HAVE_GLIB26, test "x$HAVE_GLIB26" = "xyes" )
AC_MSG_CHECKING(for GLIB - version >= 2.9.0) AC_MSG_CHECKING(for GLIB - version >= 2.9.0)
if $PKG_CONFIG 'glib-2.0 >= 2.9.0' if $PKG_CONFIG 'glib-2.0 >= 2.9.0'
then then
@ -1014,7 +999,7 @@ then
fi fi
GNOME_COMPILE_WARNINGS GNOME_COMPILE_WARNINGS
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
AS_SCRUB_INCLUDE(GTK_CFLAGS) AS_SCRUB_INCLUDE(GTK_CFLAGS)
AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS) AC_SUBST(GTK_LIBS)
@ -1115,18 +1100,6 @@ fi
### Only test this if we're building the GUI ### Only test this if we're building the GUI
if test x${gnc_build_gui} = xtrue ; if test x${gnc_build_gui} = xtrue ;
then then
AC_MSG_CHECKING(for GTK - version >= 2.6.0)
if $PKG_CONFIG 'gtk+-2.0 >= 2.6.0'
then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GTK26,1,[System has gtk 2.6.0 or better])
HAVE_GTK26=yes
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(HAVE_GTK26, test "x$HAVE_GTK26" = "xyes" )
AC_MSG_CHECKING(for GTK - version >= 2.10.0) AC_MSG_CHECKING(for GTK - version >= 2.10.0)
if $PKG_CONFIG 'gtk+-2.0 >= 2.10.0' if $PKG_CONFIG 'gtk+-2.0 >= 2.10.0'
then then
@ -1139,18 +1112,6 @@ then
AM_CONDITIONAL(HAVE_GTK_2_10, test "x$HAVE_GTK_2_10" = "xyes" ) AM_CONDITIONAL(HAVE_GTK_2_10, test "x$HAVE_GTK_2_10" = "xyes" )
AC_MSG_CHECKING(for pango version >= 1.8.0)
if $PKG_CONFIG 'pango >= 1.8.0'
then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_PANGO18,1,[System has pango 1.8.0 or better])
HAVE_PANGO18=yes
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(HAVE_PANGO18, test "x$HAVE_PANGO18" = "xyes" )
dnl @@fixme dnl @@fixme
dnl use both PKG_CHECK_MODULES and `$PKG_CONFIG`; the first importantly sets dnl use both PKG_CHECK_MODULES and `$PKG_CONFIG`; the first importantly sets
dnl MUMBLE_{LIBS,CFLAGS}... dnl MUMBLE_{LIBS,CFLAGS}...
@ -1245,8 +1206,8 @@ then
]) ])
dnl Modules common to libgsf and libgsf-gnome dnl Modules common to libgsf and libgsf-gnome
libgsf_reqs=" libgsf_reqs="
gobject-2.0 >= 2.4.0 gobject-2.0 >= 2.6.0
glib-2.0 >= 2.4.0 glib-2.0 >= 2.6.0
libxml-2.0 >= 2.4.16 libxml-2.0 >= 2.4.16
" "
dnl Modules required for libgsf-gnome dnl Modules required for libgsf-gnome
@ -1523,15 +1484,15 @@ then
dnl ***************************** dnl *****************************
# libgsf-1 >= 1.12.2 # libgsf-1 >= 1.12.2
goffice_reqs=" goffice_reqs="
glib-2.0 >= 2.4.7 glib-2.0 >= 2.6.4
gobject-2.0 >= 2.4.7 gobject-2.0 >= 2.6.4
gmodule-2.0 >= 2.4.7 gmodule-2.0 >= 2.6.4
libxml-2.0 >= 2.4.12 libxml-2.0 >= 2.4.12
pango >= 1.6.0 pango >= 1.8.1
pangoft2 >= 1.6.0 pangoft2 >= 1.8.1
" "
goffice_gtk_reqs=" goffice_gtk_reqs="
gtk+-2.0 >= 2.4.13 gtk+-2.0 >= 2.6.0
libglade-2.0 >= 2.3.6 libglade-2.0 >= 2.3.6
libgnomeprint-2.2 >= 2.8.0 libgnomeprint-2.2 >= 2.8.0
libart-2.0 >= 2.3.11 libart-2.0 >= 2.3.11
@ -1829,9 +1790,7 @@ then
### ------------------------------------------------------------------------ ### ------------------------------------------------------------------------
else else
### A bunch of am conditionals that need to be set ### A bunch of am conditionals that need to be set
AM_CONDITIONAL(HAVE_GTK26, false )
AM_CONDITIONAL(HAVE_GTK_2_10, false) AM_CONDITIONAL(HAVE_GTK_2_10, false)
AM_CONDITIONAL(HAVE_PANGO18, false )
AM_CONDITIONAL(HAVE_LIBGSF, false) AM_CONDITIONAL(HAVE_LIBGSF, false)
AM_CONDITIONAL(HAVE_GOFFICE, false) AM_CONDITIONAL(HAVE_GOFFICE, false)
AM_CONDITIONAL(WITH_LIBGSF_GNOME, false) AM_CONDITIONAL(WITH_LIBGSF_GNOME, false)
@ -2091,7 +2050,6 @@ AC_CONFIG_FILES(po/Makefile.in
doc/examples/Makefile doc/examples/Makefile
intl-scm/Makefile intl-scm/Makefile
lib/Makefile lib/Makefile
lib/glib26/Makefile
lib/guile-www/Makefile lib/guile-www/Makefile
lib/srfi/Makefile lib/srfi/Makefile
lib/libc/Makefile lib/libc/Makefile

View File

@ -1,12 +1,5 @@
/* goffice/goffice-config.h.in. Generated from configure.in by autoheader. */ /* goffice/goffice-config.h.in. Generated from configure.in by autoheader. */
/* Conditionally include >2.4 pieces we use. */
#undef HAVE_GLIB26
#undef HAVE_GTK26
/* Conditionally work around exposed-in-1.8-functionality. */
#undef HAVE_PANGO18
/* always defined to indicate that i18n is enabled */ /* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS #undef ENABLE_NLS

View File

@ -9,9 +9,6 @@
/* Define to 1 if you have the `bind_textdomain_codeset' function. */ /* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET #undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Conditionally include glib-2.0 > 2.4 functionality. */
#undef HAVE_GLIB26
/* Is bzip2 available and enabled */ /* Is bzip2 available and enabled */
#undef HAVE_BZ2 #undef HAVE_BZ2

View File

@ -1,5 +1,5 @@
SUBDIRS = libc glib26 guile-www srfi SUBDIRS = libc guile-www srfi
DIST_SUBDIRS = libc glib26 guile-www srfi libgsf-1.12.3 goffice-0.0.4 libqof DIST_SUBDIRS = libc guile-www srfi libgsf-1.12.3 goffice-0.0.4 libqof
if !HAVE_GOFFICE if !HAVE_GOFFICE
if !HAVE_LIBGSF if !HAVE_LIBGSF

View File

@ -1,16 +0,0 @@
noinst_LTLIBRARIES = libgncglib.la
DUMMYSRCS=dummy.c
REALSRCS=gkeyfile.c gkeyfile.h gutils26.c gutils26.h
if HAVE_GLIB26
libgncglib_la_SOURCES = $(DUMMYSRCS)
else
libgncglib_la_SOURCES = $(REALSRCS)
endif
libgncglib_la_LIBADD = ${GLIB24_LIBS}
AM_CFLAGS = ${GLIB_CFLAGS}
EXTRA_DIST=$(DUMMYSRCS) $(REALSRCS)

View File

@ -1,6 +0,0 @@
void g_key_file_dumy_function (void);
void
g_key_file_dumy_function (void)
{
}

File diff suppressed because it is too large Load Diff

View File

@ -1,199 +0,0 @@
/* gkeyfile.h - desktop entry file parser
*
* Copyright 2004 Red Hat, Inc.
*
* Ray Strode <halfline@hawaii.rr.com>
*
* GLib is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GLib; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __G_KEY_FILE_H__
#define __G_KEY_FILE_H__
#include <glib/gerror.h>
/* Start hacks to make this file compile with glib 2.4 */
#define G_GNUC_MALLOC
/* End hacks to make this file compile with glib 2.4 */
G_BEGIN_DECLS
typedef enum
{
G_KEY_FILE_ERROR_UNKNOWN_ENCODING,
G_KEY_FILE_ERROR_PARSE,
G_KEY_FILE_ERROR_NOT_FOUND,
G_KEY_FILE_ERROR_KEY_NOT_FOUND,
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
G_KEY_FILE_ERROR_INVALID_VALUE
} GKeyFileError;
#define G_KEY_FILE_ERROR g_key_file_error_quark()
GQuark g_key_file_error_quark (void);
typedef struct _GKeyFile GKeyFile;
typedef enum
{
G_KEY_FILE_NONE = 0,
G_KEY_FILE_KEEP_COMMENTS = 1 << 0,
G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1
} GKeyFileFlags;
GKeyFile *g_key_file_new (void);
void g_key_file_free (GKeyFile *key_file);
void g_key_file_set_list_separator (GKeyFile *key_file,
gchar separator);
gboolean g_key_file_load_from_file (GKeyFile *key_file,
const gchar *file,
GKeyFileFlags flags,
GError **error);
gboolean g_key_file_load_from_data (GKeyFile *key_file,
const gchar *data,
gsize length,
GKeyFileFlags flags,
GError **error);
gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file,
const gchar *file,
gchar **full_path,
GKeyFileFlags flags,
GError **error);
gchar *g_key_file_to_data (GKeyFile *key_file,
gsize *length,
GError **error) G_GNUC_MALLOC;
gchar *g_key_file_get_start_group (GKeyFile *key_file) G_GNUC_MALLOC;
gchar **g_key_file_get_groups (GKeyFile *key_file,
gsize *length) G_GNUC_MALLOC;
gchar **g_key_file_get_keys (GKeyFile *key_file,
const gchar *group_name,
gsize *length,
GError **error) G_GNUC_MALLOC;
gboolean g_key_file_has_group (GKeyFile *key_file,
const gchar *group_name);
gboolean g_key_file_has_key (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error);
gchar *g_key_file_get_value (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_value (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *value);
gchar *g_key_file_get_string (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_string (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *string);
gchar *g_key_file_get_locale_string (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *locale,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_locale_string (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *locale,
const gchar *string);
gboolean g_key_file_get_boolean (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error);
void g_key_file_set_boolean (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gboolean value);
gint g_key_file_get_integer (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error);
void g_key_file_set_integer (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gint value);
gchar **g_key_file_get_string_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gsize *length,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_string_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar * const list[],
gsize length);
gchar **g_key_file_get_locale_string_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *locale,
gsize *length,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_locale_string_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *locale,
const gchar * const list[],
gsize length);
gboolean *g_key_file_get_boolean_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gsize *length,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_boolean_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gboolean list[],
gsize length);
gint *g_key_file_get_integer_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gsize *length,
GError **error) G_GNUC_MALLOC;
void g_key_file_set_integer_list (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
gint list[],
gsize length);
void g_key_file_set_comment (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
const gchar *comment,
GError **error);
gchar *g_key_file_get_comment (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error) G_GNUC_MALLOC;
void g_key_file_remove_comment (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error);
void g_key_file_remove_key (GKeyFile *key_file,
const gchar *group_name,
const gchar *key,
GError **error);
void g_key_file_remove_group (GKeyFile *key_file,
const gchar *group_name,
GError **error);
G_END_DECLS
#endif /* __G_KEY_FILE_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,185 +0,0 @@
/* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GLib Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __G_UTILS_26_H__
#define __G_UTILS_26_H__
#include <glib/gtypes.h>
#include <stdarg.h>
/* Start hacks to make this file compile with glib 2.4 */
#define G_GNUC_MALLOC
/* End hacks to make this file compile with glib 2.4 */
G_BEGIN_DECLS
#ifdef G_OS_WIN32
/* On native Win32, directory separator is the backslash, and search path
* separator is the semicolon.
*/
#define G_DIR_SEPARATOR '\\'
#define G_DIR_SEPARATOR_S "\\"
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/')
#define G_SEARCHPATH_SEPARATOR ';'
#define G_SEARCHPATH_SEPARATOR_S ";"
#else /* !G_OS_WIN32 */
/* Unix */
#define G_DIR_SEPARATOR '/'
#define G_DIR_SEPARATOR_S "/"
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR)
#define G_SEARCHPATH_SEPARATOR ':'
#define G_SEARCHPATH_SEPARATOR_S ":"
#endif /* !G_OS_WIN32 */
/* Retrive static string info
*/
#ifdef G_OS_WIN32
#define g_get_user_name g_get_user_name_utf8
#define g_get_real_name g_get_real_name_utf8
#define g_get_home_dir g_get_home_dir_utf8
#define g_get_tmp_dir g_get_tmp_dir_utf8
#endif
G_CONST_RETURN gchar* g_get_user_name (void);
G_CONST_RETURN gchar* g_get_real_name (void);
G_CONST_RETURN gchar* g_get_home_dir (void);
G_CONST_RETURN gchar* g_get_tmp_dir (void);
gchar* g_get_prgname (void);
void g_set_prgname (const gchar *prgname);
G_CONST_RETURN gchar* g_get_application_name (void);
void g_set_application_name (const gchar *application_name);
G_CONST_RETURN gchar* g_get_user_data_dir (void);
G_CONST_RETURN gchar* g_get_user_config_dir (void);
G_CONST_RETURN gchar* g_get_user_cache_dir (void);
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_system_data_dirs (void);
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_system_config_dirs (void);
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_language_names (void);
/* Miscellaneous utility functions
*/
gint g_snprintf (gchar *string,
gulong n,
gchar const *format,
...) G_GNUC_PRINTF (3, 4);
gint g_vsnprintf (gchar *string,
gulong n,
gchar const *format,
va_list args);
#ifndef G_DISABLE_DEPRECATED
/* These two functions are deprecated and will be removed in the next
* major release of GLib. Use g_path_get_dirname/g_path_get_basename
* instead. Whatch out! The string returned by g_path_get_basename
* must be g_freed, while the string returned by g_basename must not.*/
G_CONST_RETURN gchar* g_basename (const gchar *file_name);
#define g_dirname g_path_get_dirname
#endif /* G_DISABLE_DEPRECATED */
#ifdef G_OS_WIN32
#define g_get_current_dir g_get_current_dir_utf8
#endif
/* The returned strings are newly allocated with g_malloc() */
gchar* g_get_current_dir (void);
gchar* g_path_get_basename (const gchar *file_name) G_GNUC_MALLOC;
gchar* g_path_get_dirname (const gchar *file_name) G_GNUC_MALLOC;
/* Set the pointer at the specified location to NULL */
void g_nullify_pointer (gpointer *nullify_location);
/* Look for an executable in PATH, following execvp() rules */
gchar* g_find_program_in_path (const gchar *program);
/* Glib version.
* we prefix variable declarations so they can
* properly get exported in windows dlls.
*/
GLIB_VAR const guint glib_major_version;
GLIB_VAR const guint glib_minor_version;
GLIB_VAR const guint glib_micro_version;
GLIB_VAR const guint glib_interface_age;
GLIB_VAR const guint glib_binary_age;
const gchar * glib_check_version (guint required_major,
guint required_minor,
guint required_micro);
#define GLIB_CHECK_VERSION(major,minor,micro) \
(GLIB_MAJOR_VERSION > (major) || \
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \
GLIB_MICRO_VERSION >= (micro)))
G_END_DECLS
/*
* On Windows, this macro defines a DllMain function that stores the
* actual DLL name that the code being compiled will be included in.
* STATIC should be empty or 'static'. DLL_NAME is the name of the
* (pointer to the) char array where the DLL name will be stored. If
* this is used, you must also include <windows.h>. If you need a more complex
* DLL entry point function, you cannot use this.
*
* On non-Windows platforms, expands to nothing.
*/
#ifndef G_PLATFORM_WIN32
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
#else
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \
static char *dll_name; \
\
BOOL WINAPI \
DllMain (HINSTANCE hinstDLL, \
DWORD fdwReason, \
LPVOID lpvReserved) \
{ \
char bfr[1000]; \
switch (fdwReason) \
{ \
case DLL_PROCESS_ATTACH: \
GetModuleFileName ((HMODULE) hinstDLL, bfr, sizeof (bfr)); \
dll_name = g_path_get_basename (bfr); \
break; \
} \
\
return TRUE; \
}
#endif /* G_PLATFORM_WIN32 */
guint g_strv_length (gchar **str_array);
#endif /* __G_UTILS_26_H__ */

View File

@ -26,16 +26,10 @@ CLEANFILES = $(BUILT_SOURCES)
libgoffice_1_la_SOURCES = \ libgoffice_1_la_SOURCES = \
goffice.c \ goffice.c \
goffice-priv.h goffice-priv.h
if !HAVE_GLIB26
libgoffice_1_la_SOURCES += glib24_26-compat.c
endif
libgoffice_1_ladir = $(goffice_include_dir) libgoffice_1_ladir = $(goffice_include_dir)
noinst_HEADERS = \ noinst_HEADERS = \
goffice.h goffice.h
if !HAVE_GLIB26
noinst_HEADERS += glib24_26-compat.h
endif
# Depends on this Makefile, because it uses make variables. # Depends on this Makefile, because it uses make variables.
goffice-paths.h: Makefile goffice-paths.h: Makefile

View File

@ -182,19 +182,12 @@ static gboolean
make_absolute (PangoAttribute *attr, gpointer user_data) make_absolute (PangoAttribute *attr, gpointer user_data)
{ {
DrawTextContext *draw_context = user_data; DrawTextContext *draw_context = user_data;
#if HAVE_PANGO18
if (attr->klass->type == PANGO_ATTR_SIZE && if (attr->klass->type == PANGO_ATTR_SIZE &&
! ((PangoAttrSize *) attr)->absolute) { ! ((PangoAttrSize *) attr)->absolute) {
PangoAttrSize *size_attr = (PangoAttrSize *) attr; PangoAttrSize *size_attr = (PangoAttrSize *) attr;
size_attr->size = GO_PT_TO_UN ((long long) size_attr->size) / draw_context->renderer->priv->y_units_per_pixel; size_attr->size = GO_PT_TO_UN ((long long) size_attr->size) / draw_context->renderer->priv->y_units_per_pixel;
size_attr->absolute = TRUE; size_attr->absolute = TRUE;
} }
#else
if (attr->klass->type == PANGO_ATTR_SIZE) {
PangoAttrInt *size_attr = (PangoAttrInt *) attr;
size_attr->value = GO_PT_TO_UN ((long long) size_attr->value) / draw_context->renderer->priv->y_units_per_pixel;
}
#endif // HAVE_PANGO18
return FALSE; return FALSE;
} }

View File

@ -1,359 +0,0 @@
#include <goffice/glib24_26-compat.h>
#include <string.h>
static const guint16 days_in_year[2][14] =
{ /* 0, jan feb mar apr may jun jul aug sep oct nov dec */
{ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
{ 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
};
/* "Julian days" just means an absolute number of days, where Day 1 ==
* Jan 1, Year 1
*/
static void
g_date_update_julian (const GDate *const_d)
{
GDate *d = (GDate *) const_d;
GDateYear year;
gint index;
g_return_if_fail (d != NULL);
g_return_if_fail (d->dmy);
g_return_if_fail (!d->julian);
g_return_if_fail (g_date_valid_dmy (d->day, d->month, d->year));
/* What we actually do is: multiply years * 365 days in the year,
* add the number of years divided by 4, subtract the number of
* years divided by 100 and add the number of years divided by 400,
* which accounts for leap year stuff. Code from Steffen Beyer's
* DateCalc.
*/
year = d->year - 1; /* we know d->year > 0 since it's valid */
d->julian_days = year * 365U;
d->julian_days += (year >>= 2); /* divide by 4 and add */
d->julian_days -= (year /= 25); /* divides original # years by 100 */
d->julian_days += year >> 2; /* divides by 4, which divides original by 400 */
index = g_date_is_leap_year (d->year) ? 1 : 0;
d->julian_days += days_in_year[index][d->month] + d->day;
g_return_if_fail (g_date_valid_julian (d->julian_days));
d->julian = TRUE;
}
/**
* g_date_get_iso8601_week_of_year:
* @date: a valid #GDate
*
* Returns the week of the year, where weeks are interpreted according
* to ISO 8601.
*
* Returns: ISO 8601 week number of the year.
*
* Since: 2.6
**/
guint
g_date_get_iso8601_week_of_year (const GDate *d)
{
guint j, d4, L, d1, w;
g_return_val_if_fail (g_date_valid (d), 0);
if (!d->julian)
g_date_update_julian (d);
g_return_val_if_fail (d->julian, 0);
/* Formula taken from the Calendar FAQ; the formula was for the
* Julian Period which starts on 1 January 4713 BC, so we add
* 1,721,425 to the number of days before doing the formula.
*/
j = d->julian_days + 1721425;
d4 = (j + 31741 - (j % 7)) % 146097 % 36524 % 1461;
L = d4 / 1460;
d1 = ((d4 - L) % 365) + L;
w = d1 / 7 + 1;
return w;
}
/** ------------------------------------------------------------ **/
/* The following is (partly) taken from the gettext package.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. */
static const gchar *
guess_category_value (const gchar *category_name)
{
const gchar *retval;
/* The highest priority value is the `LANGUAGE' environment
variable. This is a GNU extension. */
retval = g_getenv ("LANGUAGE");
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
/* `LANGUAGE' is not set. So we have to proceed with the POSIX
methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
systems this can be done by the `setlocale' function itself. */
/* Setting of LC_ALL overwrites all other. */
retval = g_getenv ("LC_ALL");
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
/* Next comes the name of the desired category. */
retval = g_getenv (category_name);
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
/* Last possibility is the LANG environment variable. */
retval = g_getenv ("LANG");
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
#ifdef G_PLATFORM_WIN32
/* g_win32_getlocale() first checks for LC_ALL, LC_MESSAGES and
* LANG, which we already did above. Oh well. The main point of
* calling g_win32_getlocale() is to get the thread's locale as used
* by Windows and the Microsoft C runtime (in the "English_United
* States" format) translated into the Unixish format.
*/
retval = g_win32_getlocale ();
if ((retval != NULL) && (retval[0] != '\0'))
return retval;
#endif
return NULL;
}
typedef struct _GLanguageNamesCache GLanguageNamesCache;
struct _GLanguageNamesCache {
gchar *languages;
gchar **language_names;
};
static void
language_names_cache_free (gpointer data)
{
GLanguageNamesCache *cache = data;
g_free (cache->languages);
g_strfreev (cache->language_names);
g_free (cache);
}
static char *
unalias_lang (char *lang)
{
return lang;
}
/* Mask for components of locale spec. The ordering here is from
* least significant to most significant
*/
enum
{
COMPONENT_CODESET = 1 << 0,
COMPONENT_TERRITORY = 1 << 1,
COMPONENT_MODIFIER = 1 << 2
};
/* Break an X/Open style locale specification into components
*/
static guint
explode_locale (const gchar *locale,
gchar **language,
gchar **territory,
gchar **codeset,
gchar **modifier)
{
const gchar *uscore_pos;
const gchar *at_pos;
const gchar *dot_pos;
guint mask = 0;
uscore_pos = strchr (locale, '_');
dot_pos = strchr (uscore_pos ? uscore_pos : locale, '.');
at_pos = strchr (dot_pos ? dot_pos : (uscore_pos ? uscore_pos : locale), '@');
if (at_pos)
{
mask |= COMPONENT_MODIFIER;
*modifier = g_strdup (at_pos);
}
else
at_pos = locale + strlen (locale);
if (dot_pos)
{
mask |= COMPONENT_CODESET;
*codeset = g_strndup (dot_pos, at_pos - dot_pos);
}
else
dot_pos = at_pos;
if (uscore_pos)
{
mask |= COMPONENT_TERRITORY;
*territory = g_strndup (uscore_pos, dot_pos - uscore_pos);
}
else
uscore_pos = dot_pos;
*language = g_strndup (locale, uscore_pos - locale);
return mask;
}
/*
* Compute all interesting variants for a given locale name -
* by stripping off different components of the value.
*
* For simplicity, we assume that the locale is in
* X/Open format: language[_territory][.codeset][@modifier]
*
* TODO: Extend this to handle the CEN format (see the GNUlibc docs)
* as well. We could just copy the code from glibc wholesale
* but it is big, ugly, and complicated, so I'm reluctant
* to do so when this should handle 99% of the time...
*/
static GSList *
_g_compute_locale_variants (const gchar *locale)
{
GSList *retval = NULL;
gchar *language;
gchar *territory = NULL;
gchar *codeset = NULL;
gchar *modifier = NULL;
guint mask;
guint i;
g_return_val_if_fail (locale != NULL, NULL);
mask = explode_locale (locale, &language, &territory, &codeset, &modifier);
/* Iterate through all possible combinations, from least attractive
* to most attractive.
*/
for (i = 0; i <= mask; i++)
if ((i & ~mask) == 0)
{
gchar *val = g_strconcat (language,
(i & COMPONENT_TERRITORY) ? territory : "",
(i & COMPONENT_CODESET) ? codeset : "",
(i & COMPONENT_MODIFIER) ? modifier : "",
NULL);
retval = g_slist_prepend (retval, val);
}
g_free (language);
if (mask & COMPONENT_CODESET)
g_free (codeset);
if (mask & COMPONENT_TERRITORY)
g_free (territory);
if (mask & COMPONENT_MODIFIER)
g_free (modifier);
return retval;
}
/**
* g_get_language_names:
*
* Computes a list of applicable locale names, which can be used to
* e.g. construct locale-dependent filenames or search paths. The returned
* list is sorted from most desirable to least desirable and always contains
* the default locale "C".
*
* For example, if LANGUAGE=de:en_US, then the returned list is
* "de", "en_US", "en", "C".
*
* This function consults the environment variables <envar>LANGUAGE</envar>,
* <envar>LC_ALL</envar>, <envar>LC_MESSAGES</envar> and <envar>LANG</envar>
* to find the list of locales specified by the user.
*
* Return value: a %NULL-terminated array of strings owned by GLib
* that must not be modified or freed.
*
* Since: 2.6
**/
G_CONST_RETURN gchar * G_CONST_RETURN *
g_get_language_names (void)
{
static GStaticPrivate cache_private = G_STATIC_PRIVATE_INIT;
GLanguageNamesCache *cache = g_static_private_get (&cache_private);
const gchar *value;
if (!cache)
{
cache = g_new0 (GLanguageNamesCache, 1);
g_static_private_set (&cache_private, cache, language_names_cache_free);
}
value = guess_category_value ("LC_MESSAGES");
if (!value)
value = "C";
if (!(cache->languages && strcmp (cache->languages, value) == 0))
{
gchar **languages;
gchar **alist, **a;
GSList *list, *l;
gint i;
g_free (cache->languages);
g_strfreev (cache->language_names);
cache->languages = g_strdup (value);
alist = g_strsplit (value, ":", 0);
list = NULL;
for (a = alist; *a; a++)
{
gchar *b = unalias_lang (*a);
list = g_slist_concat (list, _g_compute_locale_variants (b));
}
g_strfreev (alist);
list = g_slist_append (list, g_strdup ("C"));
cache->language_names = languages = g_new (gchar *, g_slist_length (list) + 1);
for (l = list, i = 0; l; l = l->next, i++)
languages[i] = l->data;
languages[i] = NULL;
g_slist_free (list);
}
return (G_CONST_RETURN gchar * G_CONST_RETURN *) cache->language_names;
}
/**
* g_strv_length:
* @str_array: a %NULL-terminated array of strings.
*
* Returns the length of the given %NULL-terminated
* string array @str_array.
*
* Return value: length of @str_array.
*
* Since: 2.6
**/
guint
g_strv_length (gchar **str_array)
{
guint i = 0;
g_return_val_if_fail (str_array != NULL, 0);
while (str_array[i])
++i;
return i;
}

View File

@ -1,39 +0,0 @@
#ifndef GLIB24_26_COMPAT_H
#define GLIB24_26_COMPAT_H
#include <glib.h>
/* from glib-2.6[.6] gdate.h */
guint g_date_get_iso8601_week_of_year (const GDate *date);
/* from glib-2.6[.6] gutils.h */
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_language_names (void);
#ifdef G_OS_WIN32
/* On Win32, the canonical directory separator is the backslash, and
* the search path separator is the semicolon. Note that also the
* (forward) slash works as directory separator.
*/
#define G_DIR_SEPARATOR '\\'
#define G_DIR_SEPARATOR_S "\\"
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/')
#define G_SEARCHPATH_SEPARATOR ';'
#define G_SEARCHPATH_SEPARATOR_S ";"
#else /* !G_OS_WIN32 */
/* Unix */
#define G_DIR_SEPARATOR '/'
#define G_DIR_SEPARATOR_S "/"
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR)
#define G_SEARCHPATH_SEPARATOR ':'
#define G_SEARCHPATH_SEPARATOR_S ":"
#endif /* !G_OS_WIN32 */
/* from glib-2.6[.6] gstrfuncs.h */
guint g_strv_length (gchar **str_array);
#endif // GLIB24_26_COMPAT_H

View File

@ -41,10 +41,6 @@
#include <gtk/gtkspinbutton.h> #include <gtk/gtkspinbutton.h>
#include <gtk/gtktogglebutton.h> #include <gtk/gtktogglebutton.h>
#ifndef HAVE_GLIB26
#include "goffice/glib24_26-compat.h"
#endif
const struct { const struct {
char const *name; char const *name;
GogAxisSet const axis_set; GogAxisSet const axis_set;

View File

@ -39,10 +39,6 @@
#include <gtk/gtktogglebutton.h> #include <gtk/gtktogglebutton.h>
#include <gtk/gtkwidget.h> #include <gtk/gtkwidget.h>
#ifndef HAVE_GLIB26
#include "goffice/glib24_26-compat.h"
#endif
GogEditor * GogEditor *
gog_editor_new (void) gog_editor_new (void)
{ {

View File

@ -43,10 +43,6 @@
#include <gsf/gsf-impl-utils.h> #include <gsf/gsf-impl-utils.h>
#include <string.h> #include <string.h>
#ifndef HAVE_GLIB26
#include "goffice/glib24_26-compat.h"
#endif
#define GOG_PLOT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOG_PLOT_TYPE, GogPlotClass)) #define GOG_PLOT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOG_PLOT_TYPE, GogPlotClass))
enum { enum {

View File

@ -48,15 +48,6 @@
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#ifndef HAVE_GTK26
// +jsled: maybe not needed due to cascading imports under gtk+-2.6?
#include <gtk/gtkimage.h>
#endif
#ifndef HAVE_GLIB26
#include "goffice/glib24_26-compat.h"
#endif
#define PREVIEW_HSIZE 150 #define PREVIEW_HSIZE 150
#define PREVIEW_VSIZE 150 #define PREVIEW_VSIZE 150

View File

@ -14,10 +14,6 @@
#include <math.h> #include <math.h>
#ifndef HAVE_GLIB26
#include "goffice/glib24_26-compat.h"
#endif
#define SECS_PER_DAY (24 * 60 * 60) #define SECS_PER_DAY (24 * 60 * 60)
#define HALF_SEC (0.5 / SECS_PER_DAY) #define HALF_SEC (0.5 / SECS_PER_DAY)

View File

@ -17,10 +17,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#ifndef HAVE_GLIB26
#include "goffice/glib24_26-compat.h"
#endif
#define CC2XML(s) ((xmlChar const *)(s)) #define CC2XML(s) ((xmlChar const *)(s))
#define CXML2C(s) ((char const *)(s)) #define CXML2C(s) ((char const *)(s))

View File

@ -70,10 +70,6 @@ libgsf_1_la_SOURCES = \
# gsf-command-context.c \ # gsf-command-context.c \
# gsf-io-context.c # gsf-io-context.c
if !HAVE_GLIB26
libgsf_1_la_SOURCES += glib24_26-compat.c
endif
libgsf_1_includedir = $(includedir)/libgsf-1/gsf libgsf_1_includedir = $(includedir)/libgsf-1/gsf
noinst_HEADERS = \ noinst_HEADERS = \
gsf.h \ gsf.h \
@ -125,10 +121,6 @@ noinst_HEADERS = \
# gsf-command-context.h \ # gsf-command-context.h \
# gsf-io-context.h # gsf-io-context.h
if !HAVE_GLIB26
noinst_HEADERS += glib24_26-compat.h
endif
install-data-local: install-libtool-import-lib install-data-local: install-libtool-import-lib
uninstall-local: uninstall-libtool-import-lib uninstall-local: uninstall-libtool-import-lib

View File

@ -1,204 +0,0 @@
/** jsled, 2005-11-08: copied from glib-2.6.6 to support libgsf compilation
against glib-2.4.14. **/
#include <gsf/glib24_26-compat.h>
/* gstdio.c - wrappers for C library functions
*
* Copyright 2004 Tor Lillqvist
*
* GLib is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GLib; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
//#include <stdio.h>
#include <string.h>
//#include <stdlib.h>
/** ------------------------------------------------------------ **/
/* START gconvert.c */
#include <glib/gunicode.h>
#include <glib/gconvert.h>
#include <glib/gthread.h>
typedef struct _GFilenameCharsetCache GFilenameCharsetCache;
struct _GFilenameCharsetCache {
gboolean is_utf8;
gchar *charset;
gchar **filename_charsets;
};
/**
* g_get_filename_charsets:
* @charsets: return location for the %NULL-terminated list of encoding names
*
* Determines the preferred character sets used for filenames.
* The first character set from the @charsets is the filename encoding, the
* subsequent character sets are used when trying to generate a displayable
* representation of a filename, see g_filename_display_name().
*
* On Unix, the character sets are determined by consulting the
* environment variables <envar>G_FILENAME_ENCODING</envar> and
* <envar>G_BROKEN_FILENAMES</envar>. On Windows, the character set
* used in the GLib API is always UTF-8 and said environment variables
* have no effect.
*
* <envar>G_FILENAME_ENCODING</envar> may be set to a comma-separated list
* of character set names. The special token "@locale" is taken to mean the
* character set for the current locale. If <envar>G_FILENAME_ENCODING</envar>
* is not set, but <envar>G_BROKEN_FILENAMES</envar> is, the character set of
* the current locale is taken as the filename encoding. If neither environment
* variable is set, UTF-8 is taken as the filename encoding, but the character
* set of the current locale is also put in the list of encodings.
*
* The returned @charsets belong to GLib and must not be freed.
*
* Note that on Unix, regardless of the locale character set or
* <envar>G_FILENAME_ENCODING</envar> value, the actual file names present on a
* system might be in any random encoding or just gibberish.
*
* Return value: %TRUE if the filename encoding is UTF-8.
*
* Since: 2.6
*/
static gboolean
g_get_filename_charsets (G_CONST_RETURN gchar ***filename_charsets)
{
static const gchar *charsets[] = {
"UTF-8",
NULL
};
#ifdef G_OS_WIN32
/* On Windows GLib pretends that the filename charset is UTF-8 */
if (filename_charsets)
*filename_charsets = charsets;
return TRUE;
#else
gboolean result;
/* Cygwin works like before */
result = g_get_charset (&(charsets[0]));
if (filename_charsets)
*filename_charsets = charsets;
return result;
#endif
}
static gchar *
make_valid_utf8 (const gchar *name)
{
GString *string;
const gchar *remainder, *invalid;
gint remaining_bytes, valid_bytes;
string = NULL;
remainder = name;
remaining_bytes = strlen (name);
while (remaining_bytes != 0)
{
if (g_utf8_validate (remainder, remaining_bytes, &invalid))
break;
valid_bytes = invalid - remainder;
if (string == NULL)
string = g_string_sized_new (remaining_bytes);
g_string_append_len (string, remainder, valid_bytes);
g_string_append_c (string, '?');
remaining_bytes -= valid_bytes + 1;
remainder = invalid + 1;
}
if (string == NULL)
return g_strdup (name);
g_string_append (string, remainder);
g_string_append (string, " (invalid encoding)");
g_assert (g_utf8_validate (string->str, -1, NULL));
return g_string_free (string, FALSE);
}
/**
* g_filename_display_name:
* @filename: a pathname hopefully in the GLib file name encoding
*
* Converts a filename into a valid UTF-8 string. The
* conversion is not necessarily reversible, so you
* should keep the original around and use the return
* value of this function only for display purposes.
* Unlike g_filename_to_utf8(), the result is guaranteed
* to be non-NULL even if the filename actually isn't in the GLib
* file name encoding.
*
* If you know the whole pathname of the file you should use
* g_filename_display_basename(), since that allows location-based
* translation of filenames.
*
* Return value: a newly allocated string containing
* a rendition of the filename in valid UTF-8
*
* Since: 2.6
**/
gchar *
g_filename_display_name (const gchar *filename)
{
gint i;
const gchar **charsets;
gchar *display_name = NULL;
gboolean is_utf8;
is_utf8 = g_get_filename_charsets (&charsets);
if (is_utf8)
{
if (g_utf8_validate (filename, -1, NULL))
display_name = g_strdup (filename);
}
if (!display_name)
{
/* Try to convert from the filename charsets to UTF-8.
* Skip the first charset if it is UTF-8.
*/
for (i = is_utf8 ? 1 : 0; charsets[i]; i++)
{
display_name = g_convert (filename, -1, "UTF-8", charsets[i],
NULL, NULL, NULL);
if (display_name)
break;
}
}
/* if all conversions failed, we replace invalid UTF-8
* by a question mark
*/
if (!display_name)
display_name = make_valid_utf8 (filename);
return display_name;
}

View File

@ -1,79 +0,0 @@
/* This file has been copied from glib-2.6.6 into libgsf-1.12.3 to support
* compilation against glib-2.4.14. -- jsled, 2005-11-08
*/
#ifndef __GLIB_24_26_COMPAT_H__
#define __GLIB_24_26_COMPAT_H__
#include <glib.h>
// START from gstdio.h
/* gstdio.h - GFilename wrappers for C library functions
*
* Copyright 2004 Tor Lillqvist
*
* GLib is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GLib; see the file COPYING.LIB. If not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <sys/stat.h>
/* Just pass on to the system functions, so there's no potential for data
* format mismatches, especially with large file interfaces.
*/
#define g_open open
#define g_rename rename
#define g_mkdir mkdir
#define g_stat stat
#define g_lstat lstat
#define g_unlink unlink
#define g_remove remove
#define g_rmdir rmdir
#define g_fopen fopen
#define g_freopen freopen
// END from gstdio.h
// START from gconvert.h
gchar *g_filename_display_name (const gchar *filename); // G_GNUC_MALLOC;
// END from gconvert.h
/* from glib-2.6[.6] gutils.h */
#ifdef G_OS_WIN32
/* On Win32, the canonical directory separator is the backslash, and
* the search path separator is the semicolon. Note that also the
* (forward) slash works as directory separator.
*/
#define G_DIR_SEPARATOR '\\'
#define G_DIR_SEPARATOR_S "\\"
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/')
#define G_SEARCHPATH_SEPARATOR ';'
#define G_SEARCHPATH_SEPARATOR_S ";"
#else /* !G_OS_WIN32 */
/* Unix */
#define G_DIR_SEPARATOR '/'
#define G_DIR_SEPARATOR_S "/"
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR)
#define G_SEARCHPATH_SEPARATOR ':'
#define G_SEARCHPATH_SEPARATOR_S ":"
#endif /* !G_OS_WIN32 */
#endif /* __GLIB_24_26_COMPAT_H__ */

View File

@ -26,11 +26,7 @@
#include <gsf/gsf-impl-utils.h> #include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-utils.h> #include <gsf/gsf-utils.h>
#include <gsf/gsf-shared-memory.h> #include <gsf/gsf-shared-memory.h>
#ifdef HAVE_GLIB26
#include <glib/gstdio.h> #include <glib/gstdio.h>
#else
#include "glib24_26-compat.h"
#endif // HAVE_GLIB26
#ifdef HAVE_MMAP #ifdef HAVE_MMAP

View File

@ -24,11 +24,7 @@
#include <gsf/gsf-input-impl.h> #include <gsf/gsf-input-impl.h>
#include <gsf/gsf-impl-utils.h> #include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-utils.h> #include <gsf/gsf-utils.h>
#ifdef HAVE_GLIB26
#include <glib/gstdio.h> #include <glib/gstdio.h>
#else
#include "glib24_26-compat.h"
#endif // HAVE_GLIB26
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>

View File

@ -26,11 +26,7 @@
#include <gsf/gsf-output-stdio.h> #include <gsf/gsf-output-stdio.h>
#include <gsf/gsf-impl-utils.h> #include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-utils.h> #include <gsf/gsf-utils.h>
#ifdef HAVE_GLIB26
#include <glib/gstdio.h> #include <glib/gstdio.h>
#else
#include "glib24_26-compat.h"
#endif // HAVE_GLIB26
#include <errno.h> #include <errno.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H

View File

@ -30,10 +30,6 @@
#include <time.h> #include <time.h>
#include <zlib.h> #include <zlib.h>
#ifndef HAVE_GLIB26
#include <gsf/glib24_26-compat.h>
#endif
#undef G_LOG_DOMAIN #undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "libgsf:zip" #define G_LOG_DOMAIN "libgsf:zip"

View File

@ -24,11 +24,7 @@
#include <gsf/gsf-output-impl.h> #include <gsf/gsf-output-impl.h>
#include <gsf/gsf-impl-utils.h> #include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-utils.h> #include <gsf/gsf-utils.h>
#ifdef HAVE_GLIB26
#include <glib/gstdio.h> #include <glib/gstdio.h>
#else
#include "glib24_26-compat.h"
#endif // HAVE_GLIB26
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View File

@ -29,10 +29,6 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifndef HAVE_GLIB26
#include <gsf/glib24_26-compat.h>
#endif
/* /*
* Glib gets this wrong, really. ARM's floating point format is a weird * Glib gets this wrong, really. ARM's floating point format is a weird
* mixture. * mixture.

View File

@ -1,7 +1,3 @@
#ifndef HAVE_GLIB26
#include <gsf/glib24_26-compat.h>
#endif
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* /*
* test-cp-zip.c: Test gsf-outfile-zip by cloning a file the hard way * test-cp-zip.c: Test gsf-outfile-zip by cloning a file the hard way

View File

@ -52,5 +52,4 @@ EXTRA_DIST = \
gnc-test-env \ gnc-test-env \
valgrind-gnucash.supp \ valgrind-gnucash.supp \
guile-mappings.h \ guile-mappings.h \
glib-compat.h \ glib-compat.h
gtk-compat.h

View File

@ -30,9 +30,6 @@
#define GNC_FILE_UTILS_H #define GNC_FILE_UTILS_H
#include <stdio.h> /* for FILE* */ #include <stdio.h> /* for FILE* */
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
char * gncFindFile (const char * filename); char * gncFindFile (const char * filename);

View File

@ -197,56 +197,6 @@ gnucash_command_line(int *argc, char **argv)
char *p; char *p;
int debugging = 0; int debugging = 0;
char *namespace_regexp = NULL; char *namespace_regexp = NULL;
#ifndef HAVE_GTK26
poptContext pc;
int rc;
struct poptOption options[] = {
POPT_AUTOHELP
{"version", 'v', POPT_ARG_NONE, &gnucash_show_version, 1,
_("Show GnuCash version"), NULL},
{"debug", '\0', POPT_ARG_NONE, &debugging, 0,
_("Enable debugging mode"), NULL},
{"loglevel", '\0', POPT_ARG_INT, &loglevel, 0,
/* Translators: This is the command line option autohelp
text; see popt(3) */
_("Set the logging level from 0 (least) to 6 (most)"),
/* Translators: Argument description for autohelp; see popt(3) */
_("LOGLEVEL")},
{"nofile", '\0', POPT_ARG_NONE, &nofile, 0,
_("Do not load the last file opened"), NULL},
{"config-path", '\0', POPT_ARG_STRING, &config_path, 0,
_("Set configuration path"),
/* Translators: Argument description for autohelp; see popt(3) */
_("CONFIGPATH")},
{"share-path", '\0', POPT_ARG_STRING, &share_path, 0,
_("Set shared data file search path"),
/* Translators: Argument description for autohelp; see popt(3) */
_("SHAREPATH")},
{"doc-path", '\0', POPT_ARG_STRING, &help_path, 0,
_("Set the search path for documentation files"),
/* Translators: Argument description for autohelp; see popt(3) */
_("DOCPATH")},
{"add-price-quotes", '\0', POPT_ARG_STRING, &add_quotes_file, 0,
_("Add price quotes to given GnuCash datafile"),
/* Translators: Argument description for autohelp; see popt(3) */
_("FILE")},
{"namespace", '\0', POPT_ARG_STRING, &namespace_regexp, 0,
_("Regular expression determining which namespace commodities will be retrieved"),
/* Translators: Argument description for autohelp; see popt(3) */
_("REGEXP")},
POPT_TABLEEND
};
/* Pretend that argv[0] is "gnucash" */
if ((p = strstr(argv[0], "-bin"))) *p = '\0';
pc = poptGetContext(NULL, *argc, (const char **)argv, options, 0);
poptSetOtherOptionHelp(pc, "[OPTIONS...] [datafile]");
while ((rc = poptGetNextOpt(pc)) > 0);
file_to_load = poptGetArg(pc);
poptFreeContext(pc);
#else
GError *error = NULL; GError *error = NULL;
GOptionContext *context; GOptionContext *context;
GOptionEntry options[] = { GOptionEntry options[] = {
@ -302,7 +252,6 @@ gnucash_command_line(int *argc, char **argv)
if (*argc > 0) if (*argc > 0)
file_to_load = argv[1]; file_to_load = argv[1];
#endif
if (gnucash_show_version) { if (gnucash_show_version) {
if (is_development_version) if (is_development_version)

View File

@ -53,10 +53,6 @@
#include "gncEntryLedger.h" #include "gncEntryLedger.h"
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "gnc-plugin-page.h" #include "gnc-plugin-page.h"
#include "gnc-general-search.h" #include "gnc-general-search.h"
#include "dialog-date-close.h" #include "dialog-date-close.h"

View File

@ -37,10 +37,6 @@
#ifndef GNC_GKEYFILE_UTILS_H #ifndef GNC_GKEYFILE_UTILS_H
#define GNC_GKEYFILE_UTILS_H #define GNC_GKEYFILE_UTILS_H
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
/** Open and read a key/value file from disk into memory. /** Open and read a key/value file from disk into memory.
* *

View File

@ -29,25 +29,6 @@
#define CHANGED_ID "changed_id" #define CHANGED_ID "changed_id"
#ifndef HAVE_GTK26
/* Backwards compatability support for function introduced in gtk
* 2.6. */
gchar *
gtk_combo_box_get_active_text (GtkComboBox *combo_box)
{
GtkTreeModel *model;
GtkTreeIter iter;
gchar *text;
if (!gtk_combo_box_get_active_iter(combo_box, &iter))
return NULL;
model = gtk_combo_box_get_model(combo_box);
gtk_tree_model_get(model, &iter, 0, &text, -1);
return text;
}
#endif
/** Find an entry in the GtkComboBoxEntry by its text value, and set /** Find an entry in the GtkComboBoxEntry by its text value, and set
* the widget to that value. This function also records the index of * the widget to that value. This function also records the index of
* that text value for use when the user leaves the widget. * that text value for use when the user leaves the widget.
@ -190,9 +171,7 @@ gnc_cbe_add_completion (GtkComboBoxEntry *cbe)
model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbe)); model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbe));
gtk_entry_completion_set_model(completion, model); gtk_entry_completion_set_model(completion, model);
gtk_entry_completion_set_text_column(completion, 0); gtk_entry_completion_set_text_column(completion, 0);
#ifdef HAVE_GTK26
gtk_entry_completion_set_inline_completion(completion, TRUE); gtk_entry_completion_set_inline_completion(completion, TRUE);
#endif
gtk_entry_set_completion(entry, completion); gtk_entry_set_completion(entry, completion);
g_object_unref(completion); g_object_unref(completion);
} }

View File

@ -39,16 +39,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
/** @name gtk Backwards Compatability Functions
@{
*/
#ifndef HAVE_GTK26
gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box);
#endif
/** @} */
/** @name gtk Miscellaneous Functions /** @name gtk Miscellaneous Functions
@{ @{
*/ */

View File

@ -35,11 +35,7 @@
#include <glib.h> #include <glib.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glib/gprintf.h> #include <glib/gprintf.h>
#ifdef HAVE_GLIB26
#include <glib/gstdio.h> #include <glib/gstdio.h>
#else
#define g_mkdir(a,b) mkdir(a,b)
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -25,9 +25,6 @@
#include "config.h" #include "config.h"
#include <gnome.h> #include <gnome.h>
#ifndef HAVE_GLIB26
#include "gutils26.h"
#endif
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>

View File

@ -23,12 +23,7 @@
#include "config.h" #include "config.h"
#ifdef HAVE_GTK26
#include <gtk/gtk.h> #include <gtk/gtk.h>
#else
#undef GNOME_DISABLE_DEPRECATED
#include <gnome.h>
#endif
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include "swig-runtime.h" #include "swig-runtime.h"
@ -221,7 +216,6 @@ gnc_rd_option_rel_set_cb(GtkWidget *widget, gpointer *raw_option)
return; return;
} }
#ifdef HAVE_GTK26
static void static void
gnc_image_option_update_preview_cb (GtkFileChooser *chooser, gnc_image_option_update_preview_cb (GtkFileChooser *chooser,
GNCOption *option) GNCOption *option)
@ -269,14 +263,6 @@ gnc_image_option_selection_changed_cb (GtkFileChooser *chooser,
return; return;
g_object_set_data_full(G_OBJECT(chooser), LAST_SELECTION, filename, g_free); g_object_set_data_full(G_OBJECT(chooser), LAST_SELECTION, filename, g_free);
} }
#else
static void
gnc_image_option_clear_selection_cb (GtkButton *button,
GtkEntry *entry)
{
gtk_entry_set_text(entry, "");
}
#endif
/********************************************************************\ /********************************************************************\
* gnc_option_set_ui_value_internal * * gnc_option_set_ui_value_internal *
@ -1999,9 +1985,6 @@ gnc_option_set_ui_widget_pixmap (GNCOption *option, GtkBox *page_box,
GtkWidget *value; GtkWidget *value;
GtkWidget *label; GtkWidget *label;
GtkWidget *button; GtkWidget *button;
#ifndef HAVE_GTK26
GtkWidget *entry;
#endif
gchar *colon_name; gchar *colon_name;
ENTER("option %p(%s), name %s", option, gnc_option_name(option), name); ENTER("option %p(%s), name %s", option, gnc_option_name(option), name);
@ -2015,7 +1998,6 @@ gnc_option_set_ui_widget_pixmap (GNCOption *option, GtkBox *page_box,
button = gtk_button_new_with_label(_("Clear")); button = gtk_button_new_with_label(_("Clear"));
gtk_tooltips_set_tip(tooltips, button, _("Clear any selected image file."), NULL); gtk_tooltips_set_tip(tooltips, button, _("Clear any selected image file."), NULL);
#ifdef HAVE_GTK26
value = gtk_file_chooser_button_new(_("Select image"), value = gtk_file_chooser_button_new(_("Select image"),
GTK_FILE_CHOOSER_ACTION_OPEN); GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_tooltips_set_tip(tooltips, value, _("Select an image file."), NULL); gtk_tooltips_set_tip(tooltips, value, _("Select an image file."), NULL);
@ -2031,18 +2013,6 @@ gnc_option_set_ui_widget_pixmap (GNCOption *option, GtkBox *page_box,
G_CALLBACK(gnc_image_option_update_preview_cb), option); G_CALLBACK(gnc_image_option_update_preview_cb), option);
g_signal_connect_swapped(G_OBJECT (button), "clicked", g_signal_connect_swapped(G_OBJECT (button), "clicked",
G_CALLBACK(gtk_file_chooser_unselect_all), value); G_CALLBACK(gtk_file_chooser_unselect_all), value);
#else
value = gnome_pixmap_entry_new(NULL, _("Select pixmap"),
FALSE);
gtk_tooltips_set_tip(tooltips, value, _("Select an image file."), NULL);
gnome_pixmap_entry_set_preview(GNOME_PIXMAP_ENTRY(value), FALSE);
entry = gnome_pixmap_entry_gtk_entry (GNOME_PIXMAP_ENTRY(value));
g_signal_connect(G_OBJECT (entry), "changed",
G_CALLBACK(gnc_option_changed_widget_cb), option);
g_signal_connect(G_OBJECT (button), "clicked",
G_CALLBACK(gnc_image_option_clear_selection_cb), entry);
#endif
gnc_option_set_widget (option, value); gnc_option_set_widget (option, value);
gnc_option_set_ui_value(option, FALSE); gnc_option_set_ui_value(option, FALSE);
@ -2490,7 +2460,6 @@ gnc_option_set_ui_value_pixmap (GNCOption *option, gboolean use_default,
if (string && *string) if (string && *string)
{ {
#ifdef HAVE_GTK26
gchar *test; gchar *test;
DEBUG("string = %s", string); DEBUG("string = %s", string);
gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(widget), string); gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(widget), string);
@ -2499,12 +2468,6 @@ gnc_option_set_ui_value_pixmap (GNCOption *option, gboolean use_default,
g_strdup(string), g_free); g_strdup(string), g_free);
DEBUG("Set %s, retrieved %s", string, test); DEBUG("Set %s, retrieved %s", string, test);
gnc_image_option_update_preview_cb(GTK_FILE_CHOOSER(widget), option); gnc_image_option_update_preview_cb(GTK_FILE_CHOOSER(widget), option);
#else
GtkEntry *entry;
DEBUG("string = %s", string);
entry = GTK_ENTRY(gnome_pixmap_entry_gtk_entry(GNOME_PIXMAP_ENTRY(widget)));
gtk_entry_set_text(entry, string);
#endif
} }
LEAVE("FALSE"); LEAVE("FALSE");
return FALSE; return FALSE;
@ -2880,7 +2843,6 @@ gnc_option_get_ui_value_font (GNCOption *option, GtkWidget *widget)
static SCM static SCM
gnc_option_get_ui_value_pixmap (GNCOption *option, GtkWidget *widget) gnc_option_get_ui_value_pixmap (GNCOption *option, GtkWidget *widget)
{ {
#ifdef HAVE_GTK26
gchar *string; gchar *string;
SCM result; SCM result;
@ -2890,12 +2852,6 @@ gnc_option_get_ui_value_pixmap (GNCOption *option, GtkWidget *widget)
if (string) if (string)
g_free(string); g_free(string);
return result; return result;
#else
GnomePixmapEntry * p = GNOME_PIXMAP_ENTRY(widget);
char * string = gnome_pixmap_entry_get_filename(p);
return (scm_makfrom0str(string ? string : ""));
#endif
} }
static SCM static SCM

View File

@ -905,16 +905,12 @@ gnc_gtk_dialog_add_button (GtkWidget *dialog, const gchar *label, const gchar *s
GtkWidget *button; GtkWidget *button;
button = gtk_button_new_with_label(label); button = gtk_button_new_with_label(label);
#ifdef HAVE_GTK26
if (stock_id) { if (stock_id) {
GtkWidget *image; GtkWidget *image;
image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image(GTK_BUTTON(button), image); gtk_button_set_image(GTK_BUTTON(button), image);
} }
#else
gtk_button_set_use_underline(GTK_BUTTON(button), TRUE);
#endif
gtk_widget_show_all(button); gtk_widget_show_all(button);
gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, response); gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, response);
} }
@ -983,61 +979,3 @@ gnc_dialog_run (GtkDialog *dialog, const gchar *gconf_key)
return response; return response;
} }
#ifndef HAVE_GTK26
/** Find the first GtkLabel in a container. When called on a gtk2.4
* message dialog, there is only one label in the dialog so theis
* should return it. */
static void
find_label (GtkWidget *widget, gpointer data)
{
GtkWidget **label = data;
if (*label)
return;
if (GTK_IS_LABEL(widget)) {
*label = widget;
return;
}
if (GTK_IS_CONTAINER(widget)) {
gtk_container_foreach(GTK_CONTAINER(widget), find_label, data);
}
}
/** Mimic the gtk2.6 function to add secondary information to a
* message dialog. */
void
gtk_message_dialog_format_secondary_text(GtkMessageDialog *dialog,
const gchar *format,
...)
{
GtkWidget *label = NULL;
const gchar *current;
gchar *primary, *secondary;
va_list args;
gtk_container_foreach(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),
find_label, &label);
if (!label)
return;
/* Get the current markup. */
current = gtk_label_get_label(GTK_LABEL(label));
/* Format the text to be added. */
va_start(args, format);
secondary = g_strdup_vprintf(format, args);
va_end(args);
/* Append the two strings, making the first one bold. */
primary = g_strdup_printf("<b>%s</b>\n\n%s", current, secondary);
gtk_label_set_markup(GTK_LABEL(label), primary);
g_free(primary);
g_free(secondary);
}
#endif

View File

@ -152,11 +152,4 @@ void gnc_gtk_dialog_add_button (GtkWidget *dialog,
gint gint
gnc_dialog_run(GtkDialog *dialog, const gchar *gconf_key); gnc_dialog_run(GtkDialog *dialog, const gchar *gconf_key);
#ifndef HAVE_GTK26
void
gtk_message_dialog_format_secondary_text(GtkMessageDialog *dialog,
const gchar *message_format,
...) G_GNUC_PRINTF (2, 3);
#endif
#endif #endif

View File

@ -39,10 +39,6 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <libguile.h> #include <libguile.h>
#include "guile-mappings.h" #include "guile-mappings.h"
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "gtk-compat.h"
#include "gnc-plugin.h" #include "gnc-plugin.h"
#include "gnc-plugin-manager.h" #include "gnc-plugin-manager.h"
@ -3278,7 +3274,6 @@ gnc_main_window_cmd_help_contents (GtkAction *action, GncMainWindow *window)
gnc_gnome_help (HF_HELP, NULL); gnc_gnome_help (HF_HELP, NULL);
} }
#ifdef HAVE_GTK26
/** This is a helper function to find a data file and suck it into /** This is a helper function to find a data file and suck it into
* memory. * memory.
* *
@ -3380,47 +3375,6 @@ gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window)
if (authors) g_strfreev(authors); if (authors) g_strfreev(authors);
g_object_unref (logo); g_object_unref (logo);
} }
#else
static void
gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window)
{
GtkWidget *about;
/* Translators: This is the "About" message. */
const gchar *message = _("The GnuCash personal finance manager.\n"
"The GNU way to manage your money!\n"
"http://www.gnucash.org/");
const gchar *copyright = "© 1998-2002 Linas Vepstas";
const gchar *authors[] = {
"Derek Atkins <derek@ihtfp.com>",
"Rob Browning <rlb@cs.utexas.edu>",
"Bill Gribble <grib@billgribble.com>",
"David Hampton <hampton@employees.org>",
"James LewisMoss <dres@debian.org>",
"Robert Graham Merkel <rgmerk@mira.net>",
"Dave Peticolas <dave@krondo.com>",
"Joshua Sled <jsled@asynchronous.org>",
"Christian Stimming <stimming@tuhh.de>",
"Linas Vepstas <linas@linas.org>",
NULL
};
const gchar *documenters[] = {
NULL
};
/* Translators: Insert your translator's credits here so that
they will be shown in the "About" dialog. */
const gchar *translator_credits = _("translator_credits");
GdkPixbuf *logo;
logo = gnc_gnome_get_gdkpixbuf ("appicon.png");
about = gnome_about_new ("GnuCash", VERSION, copyright, message, authors, documenters,
strcmp (translator_credits, "translator_credits") != 0 ? translator_credits : NULL,
logo);
g_object_unref (logo);
gtk_dialog_run (GTK_DIALOG (about));
}
#endif
/************************************************************ /************************************************************

View File

@ -34,7 +34,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glib/gprintf.h> #include <glib/gprintf.h>
#include "gtk-compat.h"
#include <string.h> #include <string.h>
#include "gnc-gkeyfile-utils.h" #include "gnc-gkeyfile-utils.h"

View File

@ -50,10 +50,6 @@ G_BEGIN_DECLS
#define GNC_PLUGIN_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_PLUGIN_PAGE, GncPluginPageClass)) #define GNC_PLUGIN_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_PLUGIN_PAGE, GncPluginPageClass))
/* typedefs & structures */ /* typedefs & structures */
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
/** The instance data structure for a content plugin. */ /** The instance data structure for a content plugin. */
typedef struct GncPluginPage { typedef struct GncPluginPage {

View File

@ -28,10 +28,6 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <string.h> #include <string.h>
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "gnc-tree-view.h" #include "gnc-tree-view.h"
#include "gnc-tree-model-account.h" #include "gnc-tree-model-account.h"
#include "gnc-tree-model-account-types.h" #include "gnc-tree-model-account-types.h"

View File

@ -1918,7 +1918,6 @@ gnc_tree_view_add_text_column (GncTreeView *view,
return column; return column;
} }
#if HAVE_GTK26
GtkTreeViewColumn * GtkTreeViewColumn *
gnc_tree_view_add_combo_column (GncTreeView *view, gnc_tree_view_add_combo_column (GncTreeView *view,
const gchar *column_title, const gchar *column_title,
@ -1976,7 +1975,6 @@ gnc_tree_view_add_combo_column (GncTreeView *view,
gnc_tree_view_append_column (view, column); gnc_tree_view_append_column (view, column);
return column; return column;
} }
#endif
GtkCellRenderer * GtkCellRenderer *
gnc_tree_view_column_get_renderer(GtkTreeViewColumn *column) gnc_tree_view_column_get_renderer(GtkTreeViewColumn *column)

View File

@ -188,7 +188,7 @@ gnc_tree_view_add_text_column (GncTreeView *view,
gint model_data_column, gint model_data_column,
gint model_visibility_column, gint model_visibility_column,
GtkTreeIterCompareFunc column_sort_fn); GtkTreeIterCompareFunc column_sort_fn);
#if HAVE_GTK26
/** This function adds a new combobox column to a GncTreeView base /** This function adds a new combobox column to a GncTreeView base
* view. The parameters it takes in common with * view. The parameters it takes in common with
* gnc_tree_view_add_text_column() behave the same as there. In * gnc_tree_view_add_text_column() behave the same as there. In
@ -206,7 +206,6 @@ gnc_tree_view_add_combo_column (GncTreeView *view,
GtkTreeModel *combo_tree_model, GtkTreeModel *combo_tree_model,
gint combo_model_text_column, gint combo_model_text_column,
GtkTreeIterCompareFunc column_sort_fn); GtkTreeIterCompareFunc column_sort_fn);
#endif
/** This function adds a new numeric column to a GncTreeView base /** This function adds a new numeric column to a GncTreeView base
* view. It takes all the parameters necessary to hook a * view. It takes all the parameters necessary to hook a

View File

@ -58,7 +58,6 @@ Plus some minor changes that have been annotated with 'CAS:'
#include "gtk/gtktreednd.h" //CAS: path changed #include "gtk/gtktreednd.h" //CAS: path changed
//#include "gtk/gtkalias.h" //CAS: header commented //#include "gtk/gtkalias.h" //CAS: header commented
#include <glib/gi18n.h> //CAS: header added #include <glib/gi18n.h> //CAS: header added
#include "gtk-compat.h" //CAS: header added
#define P_(x) _(x) //CAS: macro added #define P_(x) _(x) //CAS: macro added
typedef struct _SortElt SortElt; typedef struct _SortElt SortElt;

View File

@ -36,9 +36,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "gnc-plugin-page-account-tree.h" #include "gnc-plugin-page-account-tree.h"
#include "gnc-plugin-page-register.h" #include "gnc-plugin-page-register.h"

View File

@ -39,10 +39,6 @@
#include <glade/glade.h> #include <glade/glade.h>
#include "gnc-date-edit.h" #include "gnc-date-edit.h"
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "gnc-plugin-page-register.h" #include "gnc-plugin-page-register.h"
#include "gnc-budget.h" #include "gnc-budget.h"

View File

@ -38,9 +38,6 @@
#include "guile-mappings.h" #include "guile-mappings.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "swig-runtime.h" #include "swig-runtime.h"
#include "gnc-plugin-page-register.h" #include "gnc-plugin-page-register.h"
@ -76,8 +73,6 @@
#include "window-reconcile.h" #include "window-reconcile.h"
#include "window-report.h" #include "window-report.h"
#include "gtk-compat.h"
/* This static indicates the debugging module that this .o belongs to. */ /* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI; static QofLogModule log_module = GNC_MOD_GUI;

View File

@ -39,9 +39,6 @@
#include <glib.h> #include <glib.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glade/glade-xml.h> #include <glade/glade-xml.h>
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include "gnc-exp-parser.h" #include "gnc-exp-parser.h"
#include "gnc-engine.h" #include "gnc-engine.h"
#include "Transaction.h" #include "Transaction.h"

View File

@ -31,7 +31,6 @@
#include "config.h" #include "config.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "gtk-compat.h"
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include "Scrub.h" #include "Scrub.h"

View File

@ -1,29 +0,0 @@
/*
* gtk-compat.h - GTK version compatability mappings
* Copyright (C) 2006, David Hampton <hampton@employees.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef HAVE_GTK26
#define gtk_action_set_sensitive(action, xxx) \
g_object_set((action), "sensitive", (xxx), NULL)
#define gtk_action_set_visible(action, xxx) \
g_object_set((action), "visible", (xxx), NULL)
#define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID -2
#endif

View File

@ -43,7 +43,6 @@
#endif #endif
#include <iconv.h> #include <iconv.h>
#include "gtk-compat.h"
#include "dialog-utils.h" #include "dialog-utils.h"
#include "gnc-glib-utils.h" #include "gnc-glib-utils.h"
#include "gnc-ui.h" #include "gnc-ui.h"

View File

@ -35,7 +35,6 @@
#include "gnc-engine.h" #include "gnc-engine.h"
#include "gnucash-item-list.h" #include "gnucash-item-list.h"
#include "gnucash-scrolled-window.h" #include "gnucash-scrolled-window.h"
#include "gtk-compat.h"
/* Item list signals */ /* Item list signals */
enum { enum {

View File

@ -41,10 +41,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include "gtk-compat.h"
#ifndef HAVE_GLIB26
#include "gkeyfile.h"
#endif
#include <libguile.h> #include <libguile.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>