/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * goffice.c : a bogus little init file to pull all the parts together * * Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org) * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * 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 St, Fifth Floor, Boston, MA 02110-1301 * USA */ #include #include #include /* standalone #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include */ #include #include "goffice-paths.h" #include int goffice_graph_debug_level = 0; static char const *libgoffice_data_dir = GOFFICE_DATADIR; static char const *libgoffice_icon_dir = GOFFICE_ICONDIR; static char const *libgoffice_locale_dir = GOFFICE_LOCALEDIR; static char const *libgoffice_lib_dir = GOFFICE_LIBDIR; gchar const * go_sys_data_dir (void) { return libgoffice_data_dir; } gchar const * go_sys_icon_dir (void) { return libgoffice_icon_dir; } gchar const * go_sys_lib_dir (void) { return libgoffice_lib_dir; } void libgoffice_init (void) { static gboolean initialized = FALSE; if (initialized) return; #ifdef G_OS_WIN32 { gchar *dir = g_win32_get_package_installation_directory (NULL, "libgoffice-0-3.dll"); libgoffice_data_dir = g_build_filename (dir, "share", "goffice", GOFFICE_VERSION, NULL); libgoffice_icon_dir = g_build_filename (dir, "share", "pixmaps", "goffice", NULL); libgoffice_locale_dir = g_build_filename (dir, "share", "locale", NULL); libgoffice_lib_dir = g_build_filename (dir, "lib", "goffice", GOFFICE_VERSION, NULL); g_free (dir); } #endif bindtextdomain (GETTEXT_PACKAGE, libgoffice_locale_dir); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); /* standalone go_fonts_init (); go_math_init (); gsf_init (); plugin_services_init (); gog_plugin_services_init (); goc_plugin_services_init (); (void) GOG_GRAPH_TYPE; (void) GOG_CHART_TYPE; (void) GOG_PLOT_TYPE; (void) GOG_SERIES_TYPE; (void) GOG_SERIES_ELEMENT_TYPE; (void) GOG_LEGEND_TYPE; (void) GOG_AXIS_TYPE; (void) GOG_AXIS_LINE_TYPE; (void) GOG_LABEL_TYPE; (void) GOG_GRID_TYPE; (void) GOG_GRID_LINE_TYPE; (void) GOG_ERROR_BAR_TYPE; (void) GOG_REG_EQN_TYPE; (void) GOG_SERIES_LINES_TYPE; (void) GO_DATA_SCALAR_VAL_TYPE; (void) GO_DATA_SCALAR_STR_TYPE; gog_themes_init (); go_number_format_init (); go_currency_date_format_init (); */ initialized = TRUE; } void libgoffice_shutdown (void) { /* standalone gog_themes_shutdown (); go_fonts_shutdown (); goc_plugin_services_shutdown (); gog_plugin_services_shutdown (); go_currency_date_format_shutdown (); go_number_format_shutdown (); */ #ifdef G_OS_WIN32 g_free (libgoffice_data_dir); g_free (libgoffice_icon_dir); g_free (libgoffice_locale_dir); g_free (libgoffice_lib_dir); #endif }