[Gnucash-changes] Get GOG/goffice initialized correctly.

Joshua Sled jsled at cvs.gnucash.org
Sat Oct 8 14:15:41 EDT 2005


Log Message:
-----------
Get GOG/goffice initialized correctly.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/gnome-utils:
        gnc-html-graph-gog.c
    gnucash/lib/goffice:
        Makefile.am
        goffice.c
    gnucash/lib/goffice/graph:
        gog-renderer-pixbuf.c
    gnucash/lib/goffice/split:
        gnumeric-gconf-priv.h
        gnumeric-gconf.c
        plugin.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.317
retrieving revision 1.1487.2.318
diff -LChangeLog -LChangeLog -u -r1.1487.2.317 -r1.1487.2.318
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,11 @@
 2005-10-08  Joshua Sled  <jsled at asynchronous.org>
 
+	* goffice.c (libgoffice_init): fully initialize so plugins get
+	loaded at init-time, and thus displayed at run-time. :p
+	Other goffice/html/graphing code cleanups.
+
+2005-10-08  Joshua Sled  <jsled at asynchronous.org>
+
 	* src/report/report-gnome/gnc-plugin-page-report.c
 	(gnc_plugin_page_report_destroy_widget): remove the report when
 	the page is destroyed so the report will be removed, &c. 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/Attic/Makefile.am,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Llib/goffice/Makefile.am -Llib/goffice/Makefile.am -u -r1.1.4.1 -r1.1.4.2
--- lib/goffice/Makefile.am
+++ lib/goffice/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = app graph utils gui-utils drawing pixmaps split cut-n-paste 
 
-AM_CFLAGS = $(GLIB_CFLAGS) $(ART_CFLAGS) $(GNOME_CFLAGS) $(GSF_CFLAGS)
+AM_CFLAGS = $(GLIB_CFLAGS) $(ART_CFLAGS) $(GNOME_CFLAGS) $(GSF_CFLAGS) $(PRINT_CFLAGS)
 
 noinst_LTLIBRARIES = libgoffice.la
 
Index: goffice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/Attic/goffice.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -Llib/goffice/goffice.c -Llib/goffice/goffice.c -u -r1.1.4.2 -r1.1.4.3
--- lib/goffice/goffice.c
+++ lib/goffice/goffice.c
@@ -40,6 +40,9 @@
 #include <goffice/utils/go-font.h>
 #include <goffice/utils/go-math.h>
 #include <gsf/gsf-utils.h>
+#include "gnumeric-gconf.h"
+#include "str.h"
+#include "mstyle.h"
 
 int goffice_graph_debug_level = 1;
 
@@ -73,9 +76,9 @@
 	gog_themes_init	();
 	// -libgoffice_init
 
-	//gnm_string_init();
-	//mstyle_init();
-	//gnm_conf_init( FALSE );
+	gnm_string_init();
+	mstyle_init();
+	gnm_conf_init( FALSE );
 
 	ctx = cmd_context_stderr_new();
 	plugins_init( ctx );
Index: gog-renderer-pixbuf.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/graph/Attic/gog-renderer-pixbuf.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Llib/goffice/graph/gog-renderer-pixbuf.c -Llib/goffice/graph/gog-renderer-pixbuf.c -u -r1.1.4.1 -r1.1.4.2
--- lib/goffice/graph/gog-renderer-pixbuf.c
+++ lib/goffice/graph/gog-renderer-pixbuf.c
@@ -492,12 +492,15 @@
 	PangoAttrList  *attrs = NULL;
 	PangoFontDescription const *fd = prend->base.cur_style->font.font->desc;
 
+	// +jsled: testing font display issues.
+	if (0)
 	{
 		char *pfdStr;
 		pfdStr = pango_font_description_to_string( fd );
 		printf( "pfd=[%s]\n", pfdStr );
 		g_free( pfdStr );
 	}
+	// -jsled
 
 	if (prend->pango_layout != NULL)
 		return prend->pango_layout;
Index: gnc-html-graph-gog.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-html-graph-gog.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -Lsrc/gnome-utils/gnc-html-graph-gog.c -Lsrc/gnome-utils/gnc-html-graph-gog.c -u -r1.1.4.4 -r1.1.4.5
--- src/gnome-utils/gnc-html-graph-gog.c
+++ src/gnome-utils/gnc-html-graph-gog.c
@@ -214,8 +214,7 @@
     printf( "plugin not loaded" );
     return FALSE;
   }
-  g_object_set (G_OBJECT (plot),
-		NULL);
+  g_object_set(G_OBJECT (plot), NULL);
   gog_object_add_by_name( chart, "Plot", GOG_OBJECT(plot) );
   series = gog_plot_new_series( plot );
   labelData = go_data_vector_str_new( (char const * const *)labels, datasize );
Index: gnumeric-gconf-priv.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/split/Attic/gnumeric-gconf-priv.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Llib/goffice/split/gnumeric-gconf-priv.h -Llib/goffice/split/gnumeric-gconf-priv.h -u -r1.1.4.1 -r1.1.4.2
--- lib/goffice/split/gnumeric-gconf-priv.h
+++ lib/goffice/split/gnumeric-gconf-priv.h
@@ -4,35 +4,35 @@
 /*
  *  Note: This file must stay synchronized with the corresponding schema file!
  *
- *        This file should only be included into gnumeric-gconf.c  and
+ *        This file should only be included into gnucash-gconf.c  and
  *        dialogs/dialog-preferences.c
  */
 
 
 /*
- *  schemas/gnumeric-dialogs.schemas
+ *  schemas/gnucash-dialogs.schemas
  */
-#define FUNCTION_SELECT_GCONF_RECENT "/apps/gnumeric/functionselector/recentfunctions"
-#define FUNCTION_SELECT_GCONF_NUM_OF_RECENT "/apps/gnumeric/functionselector/num-of-recent"
+#define FUNCTION_SELECT_GCONF_RECENT "/apps/gnucash/functionselector/recentfunctions"
+#define FUNCTION_SELECT_GCONF_NUM_OF_RECENT "/apps/gnucash/functionselector/num-of-recent"
 
-#define CONF_DEFAULT_FONT_DIR	"/apps/gnumeric/core/defaultfont/"
+#define CONF_DEFAULT_FONT_DIR	"/apps/gnucash/core/defaultfont/"
 #define CONF_DEFAULT_FONT_NAME	  CONF_DEFAULT_FONT_DIR "name"
 #define CONF_DEFAULT_FONT_SIZE	  CONF_DEFAULT_FONT_DIR "size"
 #define CONF_DEFAULT_FONT_BOLD	  CONF_DEFAULT_FONT_DIR "bold"
 #define CONF_DEFAULT_FONT_ITALIC  CONF_DEFAULT_FONT_DIR "italic"
 
-#define PLUGIN_GCONF_DIRECTORY "/apps/gnumeric/plugins"
+#define PLUGIN_GCONF_DIRECTORY "/apps/gnucash/plugins"
 #define PLUGIN_GCONF_ACTIVATE_NEW PLUGIN_GCONF_DIRECTORY "/activate-new"
 #define PLUGIN_GCONF_ACTIVE PLUGIN_GCONF_DIRECTORY "/active"
 #define PLUGIN_GCONF_FILE_STATES PLUGIN_GCONF_DIRECTORY "/file-states"
 #define PLUGIN_GCONF_EXTRA_DIRS PLUGIN_GCONF_DIRECTORY "/extra-dirs"
 
-#define AUTOFORMAT_GCONF_DIRECTORY "/apps/gnumeric/autoformat"
+#define AUTOFORMAT_GCONF_DIRECTORY "/apps/gnucash/autoformat"
 #define AUTOFORMAT_GCONF_EXTRA_DIRS AUTOFORMAT_GCONF_DIRECTORY "/extra-dirs"
 #define AUTOFORMAT_GCONF_SYS_DIR AUTOFORMAT_GCONF_DIRECTORY "/sys-dir"
 #define AUTOFORMAT_GCONF_USR_DIR AUTOFORMAT_GCONF_DIRECTORY "/usr-dir"
 
-#define PRINTSETUP_GCONF_DIRECTORY "/apps/gnumeric/printsetup"
+#define PRINTSETUP_GCONF_DIRECTORY "/apps/gnucash/printsetup"
 #define PRINTSETUP_GCONF_ALL_SHEETS PRINTSETUP_GCONF_DIRECTORY "/all-sheets"
 #define PRINTSETUP_GCONF_PRINTER_CONFIG PRINTSETUP_GCONF_DIRECTORY "/printer-config"
 #define PRINTSETUP_GCONF_HEADER PRINTSETUP_GCONF_DIRECTORY "/header"
@@ -60,34 +60,34 @@
 #define PRINTSETUP_GCONF_HEADER_FORMAT_MIDDLE PRINTSETUP_GCONF_DIRECTORY "/hf-middle"
 #define PRINTSETUP_GCONF_HEADER_FORMAT_RIGHT PRINTSETUP_GCONF_DIRECTORY "/hf-right"
 
-#define DIALOGS_GCONF_DIRECTORY "/apps/gnumeric/dialogs"
+#define DIALOGS_GCONF_DIRECTORY "/apps/gnucash/dialogs"
 #define DIALOGS_GCONF_UNFOCUSED_RS DIALOGS_GCONF_DIRECTORY "/rs/unfocused"
 
 /*
- *  schemas/gnumeric-general.schemas
+ *  schemas/gnucash-general.schemas
  */
 
-#define GNM_CONF_UNDO_DIRECTORY "/apps/gnumeric/undo"
+#define GNM_CONF_UNDO_DIRECTORY "/apps/gnucash/undo"
 #define GNM_CONF_UNDO_SIZE GNM_CONF_UNDO_DIRECTORY "/size"
 #define GNM_CONF_UNDO_MAXNUM GNM_CONF_UNDO_DIRECTORY "/maxnum"
 #define GNM_CONF_UNDO_SHOW_SHEET_NAME GNM_CONF_UNDO_DIRECTORY "/show_sheet_name"
 #define GNM_CONF_UNDO_MAX_DESCRIPTOR_WIDTH GNM_CONF_UNDO_DIRECTORY "/max_descriptor_width"
 
-#define GNM_CONF_FONT_DIRECTORY "/apps/gnumeric/core/defaultfont"
+#define GNM_CONF_FONT_DIRECTORY "/apps/gnucash/core/defaultfont"
 #define GNM_CONF_FONT_NAME GNM_CONF_FONT_DIRECTORY "/name"
 #define GNM_CONF_FONT_SIZE GNM_CONF_FONT_DIRECTORY "/size"
 #define GNM_CONF_FONT_BOLD GNM_CONF_FONT_DIRECTORY "/bold"
 #define GNM_CONF_FONT_ITALIC GNM_CONF_FONT_DIRECTORY "/italic"
 
-#define GNM_CONF_FILE_DIRECTORY "/apps/gnumeric/core/file"
+#define GNM_CONF_FILE_DIRECTORY "/apps/gnucash/core/file"
 #define GNM_CONF_FILE_HISTORY_N GNM_CONF_FILE_DIRECTORY "/history/n"
 #define GNM_CONF_FILE_HISTORY_FILES GNM_CONF_FILE_DIRECTORY "/history/files"
 #define GNM_CONF_FILE_OVERWRITE_DEFAULT GNM_CONF_FILE_DIRECTORY "/save/def-overwrite"
 #define GNM_CONF_FILE_SINGLE_SHEET_SAVE GNM_CONF_FILE_DIRECTORY "/save/single_sheet"
 
-#define GNM_CONF_WORKBOOK_NSHEETS "/apps/gnumeric/core/workbook/n-sheet"
+#define GNM_CONF_WORKBOOK_NSHEETS "/apps/gnucash/core/workbook/n-sheet"
 
-#define GNM_CONF_GUI_DIRECTORY "/apps/gnumeric/core/gui"
+#define GNM_CONF_GUI_DIRECTORY "/apps/gnucash/core/gui"
 #define GNM_CONF_GUI_RES_H GNM_CONF_GUI_DIRECTORY "/screen/horizontaldpi"
 #define GNM_CONF_GUI_RES_V GNM_CONF_GUI_DIRECTORY "/screen/verticaldpi"
 #define GNM_CONF_GUI_ED_AUTOCOMPLETE GNM_CONF_GUI_DIRECTORY "/editing/autocomplete"
@@ -98,22 +98,22 @@
 #define GNM_CONF_GUI_WINDOW_Y GNM_CONF_GUI_DIRECTORY "/window/y"
 #define GNM_CONF_GUI_ZOOM GNM_CONF_GUI_DIRECTORY "/window/zoom"
 
-#define GNM_CONF_XML_COMPRESSION "/apps/gnumeric/core/xml/compression-level"
+#define GNM_CONF_XML_COMPRESSION "/apps/gnucash/core/xml/compression-level"
 
-#define GNM_CONF_SORT_DIRECTORY "/apps/gnumeric/core/sort"
+#define GNM_CONF_SORT_DIRECTORY "/apps/gnucash/core/sort"
 #define GNM_CONF_SORT_DEFAULT_BY_CASE GNM_CONF_SORT_DIRECTORY "/default/by-case"
 #define GNM_CONF_SORT_DEFAULT_RETAIN_FORM GNM_CONF_SORT_DIRECTORY "/default/retain-formats"
 #define GNM_CONF_SORT_DEFAULT_ASCENDING GNM_CONF_SORT_DIRECTORY "/default/ascending"
 #define GNM_CONF_SORT_DIALOG_MAX_INITIAL GNM_CONF_SORT_DIRECTORY "/dialog/max-initial-clauses"
 
-#define GNM_CONF_CUTANDPASTE_DIRECTORY "/apps/gnumeric/cut-and-paste"
+#define GNM_CONF_CUTANDPASTE_DIRECTORY "/apps/gnucash/cut-and-paste"
 #define GNM_CONF_CUTANDPASTE_PREFER_CLIPBOARD GNM_CONF_CUTANDPASTE_DIRECTORY "/prefer-clipboard"
 
 /*
- *  schemas/gnumeric-plugins.schemas
+ *  schemas/gnucash-plugins.schemas
  */
 
-#define PLUGIN_GCONF_LATEX "/apps/gnumeric/plugin/latex"
+#define PLUGIN_GCONF_LATEX "/apps/gnucash/plugin/latex"
 #define PLUGIN_GCONF_LATEX_USE_UTF8 PLUGIN_GCONF_LATEX "/use-utf8"
 
 #endif /* GNM_CONF_PRIV_H */
Index: plugin.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/split/Attic/plugin.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Llib/goffice/split/plugin.c -Llib/goffice/split/plugin.c -u -r1.1.4.1 -r1.1.4.2
--- lib/goffice/split/plugin.c
+++ lib/goffice/split/plugin.c
@@ -1731,10 +1731,12 @@
 
 	/* get descriptors for new plugins */
 	if (gnm_app_prefs->activate_new_plugins)
+	{
 		g_hash_table_foreach (
 			plugin_file_state_dir_hash,
 			(GHFunc) ghf_collect_new_plugins,
 			&plugin_list);
+	}
 
 	plugin_list = g_slist_reverse (plugin_list);
 	plugin_db_activate_plugin_list (plugin_list, &error);
Index: gnumeric-gconf.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/goffice/split/Attic/gnumeric-gconf.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -Llib/goffice/split/gnumeric-gconf.c -Llib/goffice/split/gnumeric-gconf.c -u -r1.1.4.2 -r1.1.4.3
--- lib/goffice/split/gnumeric-gconf.c
+++ lib/goffice/split/gnumeric-gconf.c
@@ -545,7 +545,8 @@
 	prefs.active_plugins = go_conf_load_str_list (PLUGIN_GCONF_ACTIVE);
 	prefs.activate_new_plugins = go_conf_load_bool (
 		PLUGIN_GCONF_ACTIVATE_NEW, TRUE);
-	//printf( "prefs.activate_new_plugins: %d\n", prefs.activate_new_plugins );
+
+	// printf( "prefs.activate_new_plugins: %d\n", prefs.activate_new_plugins );
 
 	prefs.horizontal_dpi = go_conf_load_double (
 		GNM_CONF_GUI_RES_H, 10., 1000., 96.);


More information about the gnucash-changes mailing list