Commit 76534be5 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

introduce ENABLE_BONOBO variable and bonobo_suffix.

2002-04-12  Jon K Hellan  <hellan@acm.org>

	* configure.in (bonobo_msg): (re)introduce ENABLE_BONOBO variable
	and bonobo_suffix.

	* src/Makefile.am (uidir): Update to gnome-2 conventions.

	* idl/GNOME_Gnumeric.idl
	(GNOME::Gnumeric::Application.new_workbook): Fix syntax error.

	* src/bonobo-io.c: #ifdef out the lot for now.

	* src/gnumeric-graph.c: ditto.

	* src/sheet-object-bonobo.c: ditto.

	* src/sheet-object-container.c: ditto.

	* src/sheet-object-item.c: ditto.

	* src/main.c (main): #ifdef out gnumeric_bonobo_io_init for now.
	(main): #ifdef out EmbeddableGridFactory_init.

	* src/print.c: Remove bonobo-print-client.h include.

	* src/sheet-object.c (sheet_object_register): #ifdef out bonobo
	object registration.

	* src/workbook.c (workbook_is_pristine, workbook_init,
	workbook_new): #ifdef bonobo case to be the same as non bonobo for
	now.
	(workbook_persist_file_load, workbook_persist_file_save,
	workbook_bonobo_setup): #ifdef out for now.

	* src/workbook-control-gui.c (cb_launch_graph_guru,
	insert_bonobo_object, cb_insert_component,
	cb_insert_shaped_component): #ifdef out for now.
	(verbs): #ifdef out GraphGuru, InsertComponent and
	InsertShapedComponent for now.

	* src/workbook-private.[ch]: #ifdef bonobo case to be the same as non
	bonobo for now.

2002-04-12  Jon K Hellan  <hellan@acm.org>

	* dialog-graph-guru.c: #ifdef out the lot for now.
parent e7d82772
2002-04-12 Jon K Hellan <hellan@acm.org>
* configure.in (bonobo_msg): (re)introduce ENABLE_BONOBO variable
and bonobo_suffix.
* src/Makefile.am (uidir): Update to gnome-2 conventions.
* idl/GNOME_Gnumeric.idl
(GNOME::Gnumeric::Application.new_workbook): Fix syntax error.
* src/bonobo-io.c: #ifdef out the lot for now.
* src/gnumeric-graph.c: ditto.
* src/sheet-object-bonobo.c: ditto.
* src/sheet-object-container.c: ditto.
* src/sheet-object-item.c: ditto.
* src/main.c (main): #ifdef out gnumeric_bonobo_io_init for now.
(main): #ifdef out EmbeddableGridFactory_init.
* src/print.c: Remove bonobo-print-client.h include.
* src/sheet-object.c (sheet_object_register): #ifdef out bonobo
object registration.
* src/workbook.c (workbook_is_pristine, workbook_init,
workbook_new): #ifdef bonobo case to be the same as non bonobo for
now.
(workbook_persist_file_load, workbook_persist_file_save,
workbook_bonobo_setup): #ifdef out for now.
* src/workbook-control-gui.c (cb_launch_graph_guru,
insert_bonobo_object, cb_insert_component,
cb_insert_shaped_component): #ifdef out for now.
(verbs): #ifdef out GraphGuru, InsertComponent and
InsertShapedComponent for now.
* src/workbook-private.[ch]: #ifdef bonobo case to be the same as non
bonobo for now.
2002-04-11 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/dependent.c (dependent_set_expr) : fix leak
......
2002-04-12 Jon K Hellan <hellan@acm.org>
* configure.in (bonobo_msg): (re)introduce ENABLE_BONOBO variable
and bonobo_suffix.
* src/Makefile.am (uidir): Update to gnome-2 conventions.
* idl/GNOME_Gnumeric.idl
(GNOME::Gnumeric::Application.new_workbook): Fix syntax error.
* src/bonobo-io.c: #ifdef out the lot for now.
* src/gnumeric-graph.c: ditto.
* src/sheet-object-bonobo.c: ditto.
* src/sheet-object-container.c: ditto.
* src/sheet-object-item.c: ditto.
* src/main.c (main): #ifdef out gnumeric_bonobo_io_init for now.
(main): #ifdef out EmbeddableGridFactory_init.
* src/print.c: Remove bonobo-print-client.h include.
* src/sheet-object.c (sheet_object_register): #ifdef out bonobo
object registration.
* src/workbook.c (workbook_is_pristine, workbook_init,
workbook_new): #ifdef bonobo case to be the same as non bonobo for
now.
(workbook_persist_file_load, workbook_persist_file_save,
workbook_bonobo_setup): #ifdef out for now.
* src/workbook-control-gui.c (cb_launch_graph_guru,
insert_bonobo_object, cb_insert_component,
cb_insert_shaped_component): #ifdef out for now.
(verbs): #ifdef out GraphGuru, InsertComponent and
InsertShapedComponent for now.
* src/workbook-private.[ch]: #ifdef bonobo case to be the same as non
bonobo for now.
2002-04-11 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/dependent.c (dependent_set_expr) : fix leak
......
2002-04-12 Jon K Hellan <hellan@acm.org>
* configure.in (bonobo_msg): (re)introduce ENABLE_BONOBO variable
and bonobo_suffix.
* src/Makefile.am (uidir): Update to gnome-2 conventions.
* idl/GNOME_Gnumeric.idl
(GNOME::Gnumeric::Application.new_workbook): Fix syntax error.
* src/bonobo-io.c: #ifdef out the lot for now.
* src/gnumeric-graph.c: ditto.
* src/sheet-object-bonobo.c: ditto.
* src/sheet-object-container.c: ditto.
* src/sheet-object-item.c: ditto.
* src/main.c (main): #ifdef out gnumeric_bonobo_io_init for now.
(main): #ifdef out EmbeddableGridFactory_init.
* src/print.c: Remove bonobo-print-client.h include.
* src/sheet-object.c (sheet_object_register): #ifdef out bonobo
object registration.
* src/workbook.c (workbook_is_pristine, workbook_init,
workbook_new): #ifdef bonobo case to be the same as non bonobo for
now.
(workbook_persist_file_load, workbook_persist_file_save,
workbook_bonobo_setup): #ifdef out for now.
* src/workbook-control-gui.c (cb_launch_graph_guru,
insert_bonobo_object, cb_insert_component,
cb_insert_shaped_component): #ifdef out for now.
(verbs): #ifdef out GraphGuru, InsertComponent and
InsertShapedComponent for now.
* src/workbook-private.[ch]: #ifdef bonobo case to be the same as non
bonobo for now.
2002-04-11 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/dependent.c (dependent_set_expr) : fix leak
......
......@@ -501,6 +501,8 @@ AC_ARG_WITH(bonobo,
if test "x$withval" = xyes; then
enable_bonobo=true
bonobo_msg=yes
bonobo_suffix=-bonobo
AC_DEFINE(ENABLE_BONOBO)
fi
)
dnl gnumeric_bonobo_enabled=$enable_bonobo
......
......@@ -17,7 +17,7 @@ module GNOME {
attribute string name;
};
interface Application {
Workbook new_workbook (void);
Workbook new_workbook ();
Workbook open_workbook (in string file);
};
};
......
......@@ -323,7 +323,7 @@ EXTRA_DIST = GNOME_Gnumeric.xml gnm-marshalers.list \
# $(INTLLIBS)
# Bonobo requires things to be in a subdir of this form
uidir=$(gnumeric_datadir)/gnome/ui
uidir=$(gnumeric_datadir)/gnome-2.0/ui
ui_DATA = GNOME_Gnumeric.xml
CLEANFILES = $(GNUMERIC_GENERATED)
......
......@@ -31,6 +31,7 @@
#include <libxml/xmlmemory.h>
#include <libxml/xmlIO.h>
#ifdef GNOME2_CONVERSION_COMPLETE
static GnumFileOpener *gnumeric_bonobo_opener;
static GnumFileSaver *gnumeric_bonobo_saver;
......@@ -540,3 +541,4 @@ gnumeric_bonobo_io_init (void)
register_file_opener (gnumeric_bonobo_opener, 100);
register_file_saver (gnumeric_bonobo_saver);
}
#endif
2002-04-12 Jon K Hellan <hellan@acm.org>
* dialog-graph-guru.c: #ifdef out the lot for now.
2002-04-11 Andreas J. Guelzow <aguelzow@taliesin.ca>
* dialog-define-name.c (name_guru_add) : fix leak
......
......@@ -108,6 +108,7 @@ struct _GraphGuruState
static void graph_guru_select_plot (GraphGuruState *s, xmlNode *plot, int seriesID);
#ifdef GNOME2_CONVERSION_COMPLETE
static void
graph_guru_clear_xml (GraphGuruState *state)
{
......@@ -1131,3 +1132,4 @@ dialog_graph_guru (WorkbookControlGUI *wbcg, GnmGraph *graph, int page)
}
graph_guru_set_page (state, page);
}
#endif
......@@ -112,6 +112,7 @@ typedef struct {
#define SERVANT_TO_GRAPH_VECTOR(ptr) \
(GnmGraphVector *)(((char *)ptr) - GTK_STRUCT_OFFSET(GnmGraphVector, servant))
#ifdef GNOME2_CONVERSION_COMPLETE
char const *const gnm_graph_vector_type_name [] =
{
"Unknown", "scalars", "dates (unimplemented)", "strings",
......@@ -1227,3 +1228,4 @@ gnm_graph_exception (CORBA_Environment *ev)
} else
return CORBA_exception_id (ev);
}
#endif
......@@ -226,7 +226,9 @@ main (int argc, char *argv [])
xml_init ();
stf_init ();
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
gnumeric_bonobo_io_init ();
#endif
#endif
global_gnome_font_init ();
......@@ -266,10 +268,10 @@ main (int argc, char *argv [])
/* Activate object factories and init connections to POA */
if (!WorkbookFactory_init ())
g_warning (_("Could not initialize Workbook factory"));
#endif
if (!EmbeddableGridFactory_init ())
g_warning (_("Could not initialize EmbeddableGrid factory"));
#endif
#endif
/* Load selected files */
......
......@@ -226,7 +226,9 @@ main (int argc, char *argv [])
xml_init ();
stf_init ();
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
gnumeric_bonobo_io_init ();
#endif
#endif
global_gnome_font_init ();
......@@ -266,10 +268,10 @@ main (int argc, char *argv [])
/* Activate object factories and init connections to POA */
if (!WorkbookFactory_init ())
g_warning (_("Could not initialize Workbook factory"));
#endif
if (!EmbeddableGridFactory_init ())
g_warning (_("Could not initialize EmbeddableGrid factory"));
#endif
#endif
/* Load selected files */
......
......@@ -34,10 +34,6 @@
#include <libgnomeprintui/gnome-print-dialog.h>
#include <libgnomeprintui/gnome-printer-dialog.h>
#ifdef ENABLE_BONOBO
# include <bonobo/bonobo-print-client.h>
#endif
extern int print_debugging;
/*
......
......@@ -33,6 +33,7 @@
#include <gal/util/e-util.h>
#ifdef GNOME2_CONVERSION_COMPLETE
static SheetObjectClass *sheet_object_bonobo_parent_class;
#define SOB_CLASS(o) SHEET_OBJECT_CLASS (G_OBJECT_GET_CLASS (o))
......@@ -408,3 +409,4 @@ sheet_object_bonobo_set_server (SheetObjectBonobo *sob,
return TRUE;
}
#endif
......@@ -26,6 +26,7 @@
#include <bonobo/bonobo-item-container.h>
#include <bonobo/bonobo-exception.h>
#ifdef GNOME2_CONVERSION_COMPLETE
static void
cb_user_activation_request (BonoboViewFrame *view_frame, GtkObject *so_view)
{
......@@ -199,3 +200,4 @@ sheet_object_container_new_file (Workbook *wb, char const *fname)
E_MAKE_TYPE (sheet_object_container, "SheetObjectContainer", SheetObjectContainer,
sheet_object_container_class_init, NULL, SHEET_OBJECT_BONOBO_TYPE);
#endif
......@@ -18,6 +18,7 @@
#include <bonobo/bonobo-ui-component.h>
#include <gal/util/e-util.h>
#ifdef GNOME2_CONVERSION_COMPLETE
static SheetObject *sheet_object_item_parent_class;
static GtkObject *
......@@ -63,3 +64,4 @@ sheet_object_item_class_init (GtkObjectClass *object_class)
E_MAKE_TYPE (sheet_object_item, "SheetObjectItem", SheetObjectItem,
sheet_object_item_class_init, NULL,
SHEET_OBJECT_BONOBO_TYPE);
#endif
......@@ -821,8 +821,10 @@ sheet_object_register (void)
SHEET_OBJECT_FILLED_TYPE;
CELL_COMMENT_TYPE;
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
sheet_object_bonobo_get_type ();
gnm_graph_get_type ();
#endif
#endif
sheet_object_widget_register ();
}
......
......@@ -2617,6 +2617,7 @@ cb_sort_descending (GtkWidget *widget, WorkbookControlGUI *wbcg)
}
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
static void
cb_launch_graph_guru (GtkWidget *widget, WorkbookControlGUI *wbcg)
{
......@@ -2668,6 +2669,7 @@ cb_insert_shaped_component (GtkWidget *widget, WorkbookControlGUI *wbcg)
insert_bonobo_object (wbcg, required_interfaces);
}
#endif
#endif
#ifndef ENABLE_BONOBO
/*
......@@ -3460,9 +3462,11 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_UNSAFE_VERB ("FunctionGuru", cb_formula_guru),
BONOBO_UI_UNSAFE_VERB ("SortAscending", cb_sort_ascending),
BONOBO_UI_UNSAFE_VERB ("SortDescending", cb_sort_descending),
#ifdef GNOME2_CONVERSION_COMPLETE
BONOBO_UI_UNSAFE_VERB ("GraphGuru", cb_launch_graph_guru),
BONOBO_UI_UNSAFE_VERB ("InsertComponent", cb_insert_component),
BONOBO_UI_UNSAFE_VERB ("InsertShapedComponent", cb_insert_shaped_component),
#endif
BONOBO_UI_UNSAFE_VERB ("HelpAbout", cb_help_about),
......
......@@ -27,6 +27,7 @@
#include "workbook-private.h"
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
#define WORKBOOK_PRIVATE_TYPE (workbook_private_get_type ())
#define WORKBOOK_PRIVATE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), WORKBOOK_PRIVATE_TYPE, WorkbookPrivate))
#define WORKBOOK_PRIVATE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), WORKBOOK_PRIVATE_TYPE, WorkbookPrivateClass))
......@@ -74,11 +75,12 @@ workbook_private_get_type (void)
return type;
}
#endif
#endif
WorkbookPrivate *
workbook_private_new (void)
{
#ifdef ENABLE_BONOBO
#if defined(GNOME2_CONVERSION_COMPLETE) && defined(ENABLE_BONOBO)
WorkbookPrivate *wbp = g_object_new (workbook_private_get_type (), NULL);
#else
WorkbookPrivate *wbp = g_new0 (WorkbookPrivate, 1);
......@@ -90,7 +92,7 @@ workbook_private_new (void)
void
workbook_private_delete (WorkbookPrivate *wbp)
{
#ifdef ENABLE_BONOBO
#if defined(GNOME2_CONVERSION_COMPLETE) && defined(ENABLE_BONOBO)
bonobo_object_unref (BONOBO_OBJECT (wbp));
#else
g_free (wbp);
......
......@@ -21,7 +21,7 @@
# include <bonobo.h>
#endif
struct _WorkbookPrivate {
#ifdef ENABLE_BONOBO
#if defined(GNOME2_CONVERSION_COMPLETE) && defined(ENABLE_BONOBO)
/* The base object for the Workbook */
BonoboObject bonobo_object;
......
......@@ -312,7 +312,9 @@ workbook_is_pristine (Workbook const *wb)
if (wb->names ||
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
wb->priv->workbook_views ||
#endif
#endif
(wb->file_format_level > FILE_FL_NEW))
return FALSE;
......@@ -325,6 +327,7 @@ workbook_is_pristine (Workbook const *wb)
}
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
static int
workbook_persist_file_load (BonoboPersistFile *ps, const CORBA_char *filename,
......@@ -375,6 +378,7 @@ workbook_bonobo_setup (Workbook *wb)
G_CALLBACK (workbook_container_get_object), wb);
}
#endif
#endif
static void
workbook_init (GObject *object)
......@@ -406,8 +410,10 @@ workbook_init (GObject *object)
workbook_corba_setup (wb);
#endif
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
workbook_bonobo_setup (wb);
#endif
#endif
}
static void
......@@ -470,8 +476,10 @@ workbook_new (void)
wb->priv->during_destruction = FALSE;
#ifdef ENABLE_BONOBO
#ifdef GNOME2_CONVERSION_COMPLETE
wb->priv->workbook_views = NULL;
wb->priv->persist_file = NULL;
#endif
#endif
return wb;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment