Commit 7d8300da authored by Jon Kåre Hellan's avatar Jon Kåre Hellan

Re-enable

* src/bonobo-io.c (hack_xmlSAXParseFile): Re-enable

* src/main-component.c: No longer a dummy. Remove DUMMY compile
flag.
(load_workbook_from_stream): Remove.
(dummy_add_interfaces): Rename to add_interfaces. Pass control to
bonobo_persist_stream_new.
(gnumeric_component_factory): Make a real gnumeric component.

* src/sheet-control-gui.c (scg_take_focus): Test if wbcg_toplevel
!= NULL.

* src/workbook-control-priv.h: Virtualize menu_state.sheet_count.

* src/workbook-control-component.c (wbcc_get_password,
wbcc_progress_set, wbcc_progress_message_set, wbcc_init_state,
wbcc_title_set, wbcc_format_feedback, wbcc_zoom_feedback,
wbcc_edit_line_set, wbcc_edit_selection_descr_set,
wbcc_auto_expr_value, wbcc_undo_redo_clear,
wbcc_undo_redo_truncate, wbcc_undo_redo_pop, wbcc_undo_redo_push,
wbcc_undo_redo_labels, wbcc_menu_state_update,
wbcc_menu_state_sheet_prefs, wbcc_menu_state_sheet_count,
wbcc_menu_state_sensitivity, wbcc_validation_msg): New no-op
methods.
(wbcc_error_system, wbcc_error_plugin, wbcc_error_read,
wbcc_error_save, wbcc_error_invalid, wbcc_error_error_info,
wbcc_control_new, wbcc_sheet_focus, wbcc_claim_selection): New
methods.
(workbook_control_component_init): New function.
(workbook_control_component_ctor_class): Flesh out.
(workbook_control_component_new): New function.

* src/workbook-control-gui.c (wbcg_cur_scg, wbcg_sheet_remove,
wbcg_sheet_rename, wbcg_sheet_focus, wbcg_sheet_move, cb_edit_cut,
cb_sheet_remove): Use new name of from sheet_to_page_index and
make public.
(wbcg_sheet_add): Use virtualized menu_sheet_count.
(workbook_control_gui_ctor_class): Virtualize menu_sheet_count.
parent eb483ea9
2002-04-19 Jon K Hellan <hellan@acm.org>
* src/bonobo-io.[ch] (gnumeric_bonobo_read_from_stream): New
function. Reads a workbook from a Bonobo PersistStream.
* src/bonobo-io.c (hack_xmlSAXParseFile): Re-enable
* src/main-component.c: No longer a dummy. Remove DUMMY compile
flag.
(load_workbook_from_stream): Remove.
(dummy_add_interfaces): Rename to add_interfaces. Pass control to
bonobo_persist_stream_new.
(gnumeric_component_factory): Make a real gnumeric component.
* src/sheet-control-gui.c (scg_take_focus): Test if wbcg_toplevel
!= NULL.
* src/workbook-control.[ch] (wb_control_menu_state_sheet_count):
New virtual.
* src/workbook-control-priv.h: Virtualize menu_state.sheet_count.
* src/workbook-control-component.c (wbcc_get_password,
wbcc_progress_set, wbcc_progress_message_set, wbcc_init_state,
wbcc_title_set, wbcc_format_feedback, wbcc_zoom_feedback,
wbcc_edit_line_set, wbcc_edit_selection_descr_set,
wbcc_auto_expr_value, wbcc_undo_redo_clear,
wbcc_undo_redo_truncate, wbcc_undo_redo_pop, wbcc_undo_redo_push,
wbcc_undo_redo_labels, wbcc_menu_state_update,
wbcc_menu_state_sheet_prefs, wbcc_menu_state_sheet_count,
wbcc_menu_state_sensitivity, wbcc_validation_msg): New no-op
methods.
(wbcc_error_system, wbcc_error_plugin, wbcc_error_read,
wbcc_error_save, wbcc_error_invalid, wbcc_error_error_info,
wbcc_control_new, wbcc_sheet_focus, wbcc_claim_selection): New
methods.
(workbook_control_component_init): New function.
(workbook_control_component_ctor_class): Flesh out.
(workbook_control_component_new): New function.
* src/workbook-control-gui.[ch] (wbcg_sheet_to_page_index): Rename
from sheet_to_page_index and make public.
* src/workbook-control-gui.c (wbcg_cur_scg, wbcg_sheet_remove,
wbcg_sheet_rename, wbcg_sheet_focus, wbcg_sheet_move, cb_edit_cut,
cb_sheet_remove): Use new name of from sheet_to_page_index and
make public.
(wbcg_sheet_add): Use virtualized menu_sheet_count.
(workbook_control_gui_ctor_class): Virtualize menu_sheet_count.
2002-04-18 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_add): Plug leaks.
......
2002-04-19 Jon K Hellan <hellan@acm.org>
* src/bonobo-io.[ch] (gnumeric_bonobo_read_from_stream): New
function. Reads a workbook from a Bonobo PersistStream.
* src/bonobo-io.c (hack_xmlSAXParseFile): Re-enable
* src/main-component.c: No longer a dummy. Remove DUMMY compile
flag.
(load_workbook_from_stream): Remove.
(dummy_add_interfaces): Rename to add_interfaces. Pass control to
bonobo_persist_stream_new.
(gnumeric_component_factory): Make a real gnumeric component.
* src/sheet-control-gui.c (scg_take_focus): Test if wbcg_toplevel
!= NULL.
* src/workbook-control.[ch] (wb_control_menu_state_sheet_count):
New virtual.
* src/workbook-control-priv.h: Virtualize menu_state.sheet_count.
* src/workbook-control-component.c (wbcc_get_password,
wbcc_progress_set, wbcc_progress_message_set, wbcc_init_state,
wbcc_title_set, wbcc_format_feedback, wbcc_zoom_feedback,
wbcc_edit_line_set, wbcc_edit_selection_descr_set,
wbcc_auto_expr_value, wbcc_undo_redo_clear,
wbcc_undo_redo_truncate, wbcc_undo_redo_pop, wbcc_undo_redo_push,
wbcc_undo_redo_labels, wbcc_menu_state_update,
wbcc_menu_state_sheet_prefs, wbcc_menu_state_sheet_count,
wbcc_menu_state_sensitivity, wbcc_validation_msg): New no-op
methods.
(wbcc_error_system, wbcc_error_plugin, wbcc_error_read,
wbcc_error_save, wbcc_error_invalid, wbcc_error_error_info,
wbcc_control_new, wbcc_sheet_focus, wbcc_claim_selection): New
methods.
(workbook_control_component_init): New function.
(workbook_control_component_ctor_class): Flesh out.
(workbook_control_component_new): New function.
* src/workbook-control-gui.[ch] (wbcg_sheet_to_page_index): Rename
from sheet_to_page_index and make public.
* src/workbook-control-gui.c (wbcg_cur_scg, wbcg_sheet_remove,
wbcg_sheet_rename, wbcg_sheet_focus, wbcg_sheet_move, cb_edit_cut,
cb_sheet_remove): Use new name of from sheet_to_page_index and
make public.
(wbcg_sheet_add): Use virtualized menu_sheet_count.
(workbook_control_gui_ctor_class): Virtualize menu_sheet_count.
2002-04-18 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_add): Plug leaks.
......
2002-04-19 Jon K Hellan <hellan@acm.org>
* src/bonobo-io.[ch] (gnumeric_bonobo_read_from_stream): New
function. Reads a workbook from a Bonobo PersistStream.
* src/bonobo-io.c (hack_xmlSAXParseFile): Re-enable
* src/main-component.c: No longer a dummy. Remove DUMMY compile
flag.
(load_workbook_from_stream): Remove.
(dummy_add_interfaces): Rename to add_interfaces. Pass control to
bonobo_persist_stream_new.
(gnumeric_component_factory): Make a real gnumeric component.
* src/sheet-control-gui.c (scg_take_focus): Test if wbcg_toplevel
!= NULL.
* src/workbook-control.[ch] (wb_control_menu_state_sheet_count):
New virtual.
* src/workbook-control-priv.h: Virtualize menu_state.sheet_count.
* src/workbook-control-component.c (wbcc_get_password,
wbcc_progress_set, wbcc_progress_message_set, wbcc_init_state,
wbcc_title_set, wbcc_format_feedback, wbcc_zoom_feedback,
wbcc_edit_line_set, wbcc_edit_selection_descr_set,
wbcc_auto_expr_value, wbcc_undo_redo_clear,
wbcc_undo_redo_truncate, wbcc_undo_redo_pop, wbcc_undo_redo_push,
wbcc_undo_redo_labels, wbcc_menu_state_update,
wbcc_menu_state_sheet_prefs, wbcc_menu_state_sheet_count,
wbcc_menu_state_sensitivity, wbcc_validation_msg): New no-op
methods.
(wbcc_error_system, wbcc_error_plugin, wbcc_error_read,
wbcc_error_save, wbcc_error_invalid, wbcc_error_error_info,
wbcc_control_new, wbcc_sheet_focus, wbcc_claim_selection): New
methods.
(workbook_control_component_init): New function.
(workbook_control_component_ctor_class): Flesh out.
(workbook_control_component_new): New function.
* src/workbook-control-gui.[ch] (wbcg_sheet_to_page_index): Rename
from sheet_to_page_index and make public.
* src/workbook-control-gui.c (wbcg_cur_scg, wbcg_sheet_remove,
wbcg_sheet_rename, wbcg_sheet_focus, wbcg_sheet_move, cb_edit_cut,
cb_sheet_remove): Use new name of from sheet_to_page_index and
make public.
(wbcg_sheet_add): Use virtualized menu_sheet_count.
(workbook_control_gui_ctor_class): Virtualize menu_sheet_count.
2002-04-18 Morten Welinder <terra@diku.dk>
* src/expr-name.c (expr_name_add): Plug leaks.
......
......@@ -13,7 +13,9 @@
#include "sheet-object-bonobo.h"
#include "sheet-object-container.h"
#include "command-context.h"
#include "io-context.h"
#include "workbook-control-component.h"
#include "workbook-view.h"
#include "workbook.h"
#include "sheet.h"
......@@ -21,6 +23,7 @@
#include <libgnome/gnome-i18n.h>
#include <stdio.h>
#include <string.h>
#include <locale.h>
#include <math.h>
#include <limits.h>
......@@ -314,6 +317,7 @@ gnumeric_bonobo_write_workbook (GnumFileSaver const *fs,
xmlFreeDoc (xml);
bonobo_object_unref (BONOBO_OBJECT (storage));
}
#endif
#ifdef HAVE_LIBXML_2
static int
......@@ -417,6 +421,82 @@ hack_xmlSAXParseFile (Bonobo_Stream stream)
#endif /* HAVE_LIBXML_2*/
}
void
gnumeric_bonobo_read_from_stream (BonoboPersistStream *ps,
Bonobo_Stream stream,
Bonobo_Persist_ContentType type,
void *data,
CORBA_Environment *ev)
{
WorkbookControl *wbc;
WorkbookView *wb_view;
Workbook *wb;
Workbook *old_wb;
xmlDoc *doc;
xmlNs *gmr;
GnumericXMLVersion version;
XmlParseContext *ctxt;
CommandContext *cc;
IOContext *ioc;
g_return_if_fail (data != NULL);
g_return_if_fail (IS_WORKBOOK_CONTROL_COMPONENT (data));
wbc = WORKBOOK_CONTROL (data);
/* FIXME: Probe for file type */
old_wb = wb_control_workbook (wbc);
if (!workbook_is_pristine (old_wb)) {
/* No way to interact properly with user */
g_warning ("Old workbook has unsaved changes.");
goto exit_wrong_type;
}
wb_view = wb_control_view (wbc);
/*
* Load the file into an XML tree.
*/
/* FIXME: exceptions inside the hack will be lost. */
doc = hack_xmlSAXParseFile (stream);
if (!doc) {
g_warning ("Failed to parse file");
goto exit_wrong_type;
}
if (!doc->xmlRootNode) {
xmlFreeDoc (doc);
g_warning ("Invalid xml file. Tree is empty ?");
goto exit_wrong_type;
}
/*
* Do a bit of checking, get the namespaces, and check the top elem.
*/
gmr = xml_check_version (doc, &version);
if (!gmr) {
xmlFreeDoc (doc);
goto exit_wrong_type;
}
ctxt = xml_parse_ctx_new_full (doc, gmr, version, NULL, NULL, NULL);
ioc = gnumeric_io_context_new (COMMAND_CONTEXT (wbc));
xml_workbook_read (ioc, wb_view, ctxt, doc->xmlRootNode);
xml_parse_ctx_destroy (ctxt);
xmlFreeDoc (doc);
if (gnumeric_io_error_occurred (ioc)) {
g_object_unref (G_OBJECT (ioc));
goto exit_wrong_type;
}
g_object_unref (G_OBJECT (ioc));
return;
exit_wrong_type:
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_Bonobo_Persist_WrongDataType, NULL);
}
#ifdef GNOME2_CONVERSION_COMPLETE
static void
gnumeric_bonobo_read_workbook (GnumFileOpener const *fo,
IOContext *context,
......
#ifndef _BONOBO_IO_H
#define _BONOBO_IO_H
void gnumeric_bonobo_io_init (void);
#include <bonobo/bonobo-persist-stream.h>
void gnumeric_bonobo_read_from_stream (BonoboPersistStream *ps,
Bonobo_Stream stream,
Bonobo_Persist_ContentType type,
void *data,
CORBA_Environment *ev);
#ifdef GNOME2_CONVERSION_COMPLETE
void gnumeric_bonobo_io_init (void);
#endif
#endif /* _BONOBO_IO_H */
......@@ -10,36 +10,22 @@
#include <gnumeric-config.h>
#include <glib.h>
#include <libgnumeric.h>
#include "bonobo-io.h"
#include <bonobo/bonobo-ui-main.h>
#include <bonobo/bonobo-generic-factory.h>
#define DUMMY
#ifdef DUMMY
#include <stdio.h>
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-persist-file.h>
#include <bonobo/bonobo-persist-stream.h>
#include <gtk/gtklabel.h>
#endif
#include "gui-gnumeric.h"
#include "workbook-view.h"
#include "workbook-control-component-priv.h"
char const *gnumeric_lib_dir = GNUMERIC_LIBDIR;
char const *gnumeric_data_dir = GNUMERIC_DATADIR;
#ifdef DUMMY
/*
* Loads an Workbook from a Bonobo_Stream
*/
static void
load_workbook_from_stream (BonoboPersistStream *ps,
Bonobo_Stream stream,
Bonobo_Persist_ContentType type,
void *data,
CORBA_Environment *ev)
{
g_message (__PRETTY_FUNCTION__);
}
/*
* Loads an Workbook from a Bonobo_File
*/
......@@ -51,8 +37,8 @@ load_workbook_from_file (BonoboPersistFile *pf, const CORBA_char *text_uri,
return 0;
}
BonoboObject *
dummy_add_interfaces (BonoboObject *control)
static BonoboObject *
add_interfaces (BonoboObject *control, WorkbookControl *wbc)
{
BonoboPersistFile *file;
BonoboPersistStream *stream;
......@@ -61,8 +47,8 @@ dummy_add_interfaces (BonoboObject *control)
/* Interface Bonobo::PersistStream */
stream = bonobo_persist_stream_new
(load_workbook_from_stream, NULL,
NULL, "OAFIID:GNOME_Gnumeric_Control", NULL);
(gnumeric_bonobo_read_from_stream, NULL,
NULL, "OAFIID:GNOME_Gnumeric_Control", wbc);
if (!stream) {
bonobo_object_unref (BONOBO_OBJECT (control));
return NULL;
......@@ -84,7 +70,6 @@ dummy_add_interfaces (BonoboObject *control)
return control;
}
#endif
static BonoboObject *
gnumeric_component_factory (BonoboGenericFactory *this,
......@@ -92,24 +77,19 @@ gnumeric_component_factory (BonoboGenericFactory *this,
void *data)
{
BonoboControl *control;
BonoboObject *retval;
#ifdef DUMMY
GtkWidget *w;
WorkbookControl *wbc;
g_message ("Trying to produce a '%s'", oaf_iid);
w = gtk_label_new ("gnumeric-component "
"doesn't do anything useful yet");
wbc = workbook_control_component_new (NULL, NULL);
w = WORKBOOK_CONTROL_GUI (wbc)->table;
gtk_widget_show(w);
control = bonobo_control_new (w);
printf ("control=0x%p\n", control);
if (!dummy_add_interfaces (BONOBO_OBJECT (control)))
g_message ("control=0x%p\n", control);
if (!add_interfaces (BONOBO_OBJECT (control), wbc))
return NULL;
retval = BONOBO_OBJECT (control);
printf ("gnumeric-component doesn't do anything useful yet\n");
return retval;
#endif
return BONOBO_OBJECT (control);
}
int
......
......@@ -2836,8 +2836,10 @@ scg_take_focus (SheetControlGUI *scg)
{
g_return_if_fail (IS_SHEET_CONTROL_GUI (scg));
gtk_window_set_focus (wbcg_toplevel (scg->wbcg),
GTK_WIDGET (scg_pane (scg, 0)));
/* FIXME: Slightly hackish. */
if (wbcg_toplevel (scg->wbcg))
gtk_window_set_focus (wbcg_toplevel (scg->wbcg),
GTK_WIDGET (scg_pane (scg, 0)));
}
void
......
#include <gnumeric-config.h>
#include "gnumeric.h"
#include "gutils.h"
#include "workbook-control-component-priv.h"
#include <gal/util/e-util.h>
static char *
wbcc_get_password (CommandContext *cc, char const* msg) {}
static void
wbcc_progress_set (CommandContext *cc, gfloat val) {}
static void
wbcc_progress_message_set (CommandContext *cc, gchar const *msg) {}
static void
wbcc_error_system (CommandContext *cc, char const *msg)
{
/* FIXME: Set exception */
g_warning (msg);
}
static void
wbcc_error_plugin (CommandContext *cc, char const *msg)
{
/* FIXME: Set exception */
g_warning (msg);
}
static void
wbcc_error_read (CommandContext *cc, char const *msg)
{
/* FIXME: Set exception */
g_warning (msg);
}
static void
wbcc_error_save (CommandContext *cc, char const *msg)
{
/* FIXME: Set exception */
g_warning (msg);
}
static void
wbcc_error_invalid (CommandContext *cc, char const *msg, char const * value)
{
/* FIXME: Set exception */
char *buf = g_strconcat (msg, " : ", value, NULL);
g_warning (buf);
g_free (buf);
}
/* We inherit the implementation of error.splits_array
* from WorkbookControlGUI */
static void
wbcc_error_error_info (CommandContext *context,
ErrorInfo *error)
{
/* FIXME: Set exception */
error_info_print (error);
}
static WorkbookControl *
wbcc_control_new (WorkbookControl *wbc, WorkbookView *wbv, Workbook *wb)
{
return workbook_control_component_new (wbv, wb);
}
static void
wbcc_init_state (WorkbookControl *wbc) {}
static void
wbcc_title_set (WorkbookControl *wbc, char const *title) {}
static void
wbcc_format_feedback (WorkbookControl *wbc) {}
static void
wbcc_zoom_feedback (WorkbookControl *wbc) {}
static void
wbcc_edit_line_set (WorkbookControl *wbc, char const *text) {}
static void
wbcc_edit_selection_descr_set (WorkbookControl *wbc, char const *text) {}
static void
wbcc_auto_expr_value (WorkbookControl *wbc) {}
static void
wbcc_sheet_focus (WorkbookControl *wbc, Sheet *sheet)
{
WorkbookControlGUI *wbcg = (WorkbookControlGUI *)wbc;
SheetControlGUI *scg;
int i = wbcg_sheet_to_page_index (wbcg, sheet, &scg);
/* A sheet added in another view may not yet have a view */
if (i >= 0) {
gtk_notebook_set_page (wbcg->notebook, i);
}
}
static void
wbcc_undo_redo_clear (WorkbookControl *wbc, gboolean is_undo) {}
static void
wbcc_undo_redo_truncate (WorkbookControl *wbc, int n, gboolean is_undo) {}
static void
wbcc_undo_redo_pop (WorkbookControl *wbc, gboolean is_undo) {}
static void
wbcc_undo_redo_push (WorkbookControl *wbc,
char const *text, gboolean is_undo) {}
static void
wbcc_undo_redo_labels (WorkbookControl *wbc,
char const *undo, char const *redo) {}
static void
wbcc_menu_state_update (WorkbookControl *wbc, Sheet const *sheet, int flags) {}
static void
wbcc_menu_state_sheet_prefs (WorkbookControl *wbc, Sheet const *sheet) {}
static void
wbcc_menu_state_sheet_count (WorkbookControl *wbc) {}
static void
wbcc_menu_state_sensitivity (WorkbookControl *wbc, gboolean sensitive) {}
/* FIXME: Can this be made to work? */
static gboolean
wbcc_claim_selection (WorkbookControl *wbc)
{
WorkbookControlGUI *wbcg = (WorkbookControlGUI *)wbc;
return gtk_selection_owner_set (GTK_WIDGET (wbcg->table),
GDK_SELECTION_PRIMARY,
GDK_CURRENT_TIME);
}
static int
wbcc_validation_msg (WorkbookControl *wbc, ValidationStyle v,
char const *title, char const *msg)
{}
static void
workbook_control_component_init (WorkbookControlComponent *wbcc,
WorkbookView *optional_view,
Workbook *optional_wb)
{
static GtkTargetEntry const drag_types[] = {
{ (char *)"text/uri-list", 0, 0 }
};
WorkbookControlGUI *wbcg = WORKBOOK_CONTROL_GUI (wbcc);
wbcg->table = gtk_table_new (0, 0, 0);
wbcg->notebook = NULL;
wbcg->updating_ui = FALSE;
workbook_control_set_view (&wbcg->wb_control, optional_view, optional_wb);
/* We are not in edit mode */
wbcg->editing = FALSE;
wbcg->editing_sheet = NULL;
wbcg->editing_cell = NULL;
wbcg->rangesel = NULL;
/* FIXME: Insert appropriate lifecycle here, and signal handlers
* like for wbcg. */
}
static void
workbook_control_component_ctor_class (GObjectClass *object_class)
{
WorkbookControlGUIClass *wbcg_class
= WORKBOOK_CONTROL_GUI_CLASS (object_class);
WorkbookControlClass *wbc_class
= WORKBOOK_CONTROL_CLASS (object_class);
g_return_if_fail (wbc_class != NULL);
wbc_class->context_class.get_password = wbcc_get_password;
wbc_class->context_class.progress_set = wbcc_progress_set;
wbc_class->context_class.progress_message_set
= wbcc_progress_message_set;
wbc_class->context_class.error.system = wbcc_error_system;
wbc_class->context_class.error.plugin = wbcc_error_plugin;
wbc_class->context_class.error.read = wbcc_error_read;
wbc_class->context_class.error.save = wbcc_error_save;
wbc_class->context_class.error.invalid = wbcc_error_invalid;
/* wbc_class->context_class.error.splits_array inherited from wbcg */
wbc_class->context_class.error.error_info = wbcc_error_error_info;
wbc_class->control_new = wbcc_control_new;
wbc_class->init_state = wbcc_init_state;
wbc_class->title_set = wbcc_title_set;
/* wbc_class->prefs_update inherited from wbcg */
wbc_class->format_feedback = wbcc_format_feedback;
wbc_class->zoom_feedback = wbcc_zoom_feedback;
wbc_class->edit_line_set = wbcc_edit_line_set;
wbc_class->selection_descr_set = wbcc_edit_selection_descr_set;
wbc_class->auto_expr_value = wbcc_auto_expr_value;
/* wbc_class->sheet.add inherited from wbcg */
/* wbc_class->sheet.remove inherited from wbcg */
/* wbc_class->sheet.rename inherited from wbcg */
wbc_class->sheet.focus = wbcc_sheet_focus;
/* wbc_class->sheet.move inherited from wbcg */
/* wbc_class->sheet.remove_all inherited from wbcg */
wbc_class->undo_redo.clear = wbcc_undo_redo_clear;
wbc_class->undo_redo.truncate = wbcc_undo_redo_truncate;
wbc_class->undo_redo.pop = wbcc_undo_redo_pop;
wbc_class->undo_redo.push = wbcc_undo_redo_push;
wbc_class->undo_redo.labels = wbcc_undo_redo_labels;
wbc_class->menu_state.update = wbcc_menu_state_update;
wbc_class->menu_state.sheet_prefs = wbcc_menu_state_sheet_prefs;
wbc_class->menu_state.sensitivity = wbcc_menu_state_sensitivity;
wbc_class->menu_state.sheet_count = wbcc_menu_state_sheet_count;
g_return_if_fail (wbcg_class != NULL);
wbc_class->claim_selection = wbcc_claim_selection;
/* wbc_class->paste_from_selection inherited from wbcg */
wbc_class->validation_msg = wbcc_validation_msg;
}
E_MAKE_TYPE(workbook_control_component, "WorkbookControlComponent",
WorkbookControlComponent,
workbook_control_component_ctor_class, NULL,
WORKBOOK_CONTROL_GUI_TYPE);
WorkbookControl *
workbook_control_component_new (WorkbookView *optional_view, Workbook *wb)
{
WorkbookControlComponent *wbcc;
WorkbookControl *wbc;
wbcc = g_object_new (workbook_control_component_get_type (), NULL);
wbc = WORKBOOK_CONTROL (wbcc);