Commit a7225c31 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks

fixup popt for oaf.

2000-05-01  Michael Meeks  <michael@helixcode.com>

	* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.

2000-05-02  Michael Meeks  <michael@helixcode.com>

	* main.c (layout_factory_init): update for oaf.

	* sample.c (create_test): nicer activation.

2000-05-02  Michael Meeks  <michael@helixcode.com>

	* graphic-context.c (get_graphics_component): update for oaf.
parent b2198f30
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-01 Michael Meeks <michael@helixcode.com>
* src/corba-args.c (gnumeric_arg_parse): fixup popt for oaf.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* src/expr.c (expr_tree_shared) : New function.
......
2000-05-02 Michael Meeks <michael@helixcode.com>
* main.c (layout_factory_init): update for oaf.
* sample.c (create_test): nicer activation.
2000-05-01 Jody Goldberg <jgoldberg@home.com>
* main.c : include popt-gnome.h to define POPT_AUTOHELP so that
......
......@@ -80,9 +80,13 @@ layout_factory (BonoboEmbeddableFactory *this, void *data)
static void
layout_factory_init (void)
{
#if USING_OAF
factory = bonobo_embeddable_factory_new (
"OAFIID:graph-factory:1.0", layout_factory, NULL);
#else
factory = bonobo_embeddable_factory_new (
"GOADID:embeddable-factory:Graph:Layout", layout_factory, NULL);
#endif
if (factory == NULL)
g_error ("It was not possible to register a new layout factory");
......
......@@ -261,11 +261,10 @@ create_test (BonoboUIHandler *uih)
{
CORBA_Object o;
CORBA_exception_init (&ev);
/* FIXME: what a mighty hack */
o = oaf_activate ("description == 'Graph component'",
o = oaf_activate ("repo_ids.has('IDL:GNOME/Graph/Layout:1.0')",
NULL, 0, NULL, &ev);
CORBA_exception_free (&ev);
if (!o)
if (o == CORBA_OBJECT_NIL)
object = NULL;
else
object = bonobo_object_client_from_corba ((Bonobo_Unknown)o);
......
......@@ -30,9 +30,9 @@ gnumeric_arg_parse (int argc, char *argv [])
ctx = NULL;
#if USING_OAF
gnome_init_with_popt_table ("container", VERSION,
argc, argv,
oaf_popt_options, 0, NULL);
gnomelib_register_popt_table (oaf_popt_options, _("Oaf options"));
gnome_init_with_popt_table ("gnumeric", VERSION,
argc, argv, gnumeric_popt_options, 0, &ctx);
orb = oaf_init (argc, argv);
#else
......
2000-05-02 Michael Meeks <michael@helixcode.com>
* graphic-context.c (get_graphics_component): update for oaf.
2000-04-27 Jody Goldberg <jgoldberg@home.com>
* Makefile.am : Install glade files in properly versioned directory.
......
......@@ -14,6 +14,9 @@
#include "gnumeric.h"
#include "workbook.h"
#include <glade/glade.h>
#ifdef USING_OAF
# include <liboaf/liboaf.h>
#endif
#include <bonobo.h>
#include "graphic-context.h"
#include "graphic-type.h"
......@@ -23,13 +26,31 @@
#include "value.h"
#define GRAPH_GOADID "GOADID:embeddable:Graph:Layout"
#define OAF_QUERY "repo_ids.has('IDL:GNOME/Graph/Layout:1.0')"
static BonoboObjectClient *
get_graphics_component (void)
{
BonoboObjectClient *object_server;
#if USING_OAF
{
Bonobo_Unknown o;
CORBA_Environment ev;
CORBA_exception_init (&ev);
o = (Bonobo_Unknown)oaf_activate ("repo_ids.has('IDL:GNOME/Graph/Layout:1.0')",
NULL, 0, NULL, &ev);
CORBA_exception_free (&ev);
if (o == CORBA_OBJECT_NIL)
object_server = NULL;
else
object_server = bonobo_object_client_from_corba (o);
}
#else
object_server = bonobo_object_activate (GRAPH_GOADID, 0);
#endif
return object_server;
}
......
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