Commit 3a9b2aa0 authored by Morten Welinder's avatar Morten Welinder

Namespace

parent 5261e1ce
......@@ -179,7 +179,7 @@ cb_gognm_save (G_GNUC_UNUSED GtkAction *a, WBCGtk *wbcg)
GOComponent *component = GO_COMPONENT (data);
/* update the component data since not all clients will call set_data */
GOGnmComponent *gognm = GO_GNM_COMPONENT (component);
WorkbookView *wv = wb_control_view (WORKBOOK_CONTROL (wbcg));
WorkbookView *wv = wb_control_view (GNM_WBC (wbcg));
if (wv != gognm->wv) {
if (gognm->wv != NULL) {
g_object_unref (gognm->wv);
......@@ -193,7 +193,7 @@ cb_gognm_save (G_GNUC_UNUSED GtkAction *a, WBCGtk *wbcg)
go_gnm_component_update_data (gognm);
go_component_emit_changed (component);
} else
gui_file_save (wbcg, wb_control_view (WORKBOOK_CONTROL (wbcg)));
gui_file_save (wbcg, wb_control_view (GNM_WBC (wbcg)));
}
static GtkActionEntry const actions[] = {
......@@ -253,7 +253,7 @@ go_gnm_component_finalize (GObject *obj)
gognm->wv = NULL;
}
if (gognm->edited != NULL) {
g_object_unref (wb_control_view (WORKBOOK_CONTROL (gognm->edited)));
g_object_unref (wb_control_view (GNM_WBC (gognm->edited)));
gognm->edited = NULL;
}
G_OBJECT_CLASS (gognm_parent_klass)->finalize (obj);
......
......@@ -4247,7 +4247,7 @@ chart_write_AI (XLChartWriteState *s, GOData const *dim, unsigned n,
gboolean need_release = FALSE;
if (dim != NULL) {
if (IS_GNM_GO_DATA_SCALAR (dim) || IS_GNM_GO_DATA_VECTOR (dim)) {
if (IS_GNM_GO_DATA_SCALAR (dim) || GNM_IS_GO_DATA_VECTOR (dim)) {
texpr = gnm_go_data_get_expr (dim);
if ((value = gnm_expr_top_get_range (texpr)) != NULL) {
GType const t = G_OBJECT_TYPE (dim);
......
......@@ -285,7 +285,7 @@ html_write_cell_content (GsfOutput *output, GnmCell *cell, GnmStyle const *style
GnmHLink* hlink = gnm_style_get_hlink (style);
const guchar* hlink_target = NULL;
if (hlink && IS_GNM_HLINK_URL (hlink)) {
if (hlink && GNM_IS_HLINK_URL (hlink)) {
hlink_target = gnm_hlink_get_target (hlink);
}
......
......@@ -319,7 +319,7 @@ gplp_load_service_function_group (GOPluginLoader *loader,
{
PluginServiceFunctionGroupCallbacks *cbs;
g_return_if_fail (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service));
g_return_if_fail (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (service));
GO_INIT_RET_ERROR_INFO (ret_error);
......@@ -330,7 +330,7 @@ gplp_load_service_function_group (GOPluginLoader *loader,
static gboolean
gplp_service_load (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
{
if (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (s))
if (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (s))
gplp_load_service_function_group (l, s, err);
else
return FALSE;
......@@ -340,7 +340,7 @@ gplp_service_load (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
static gboolean
gplp_service_unload (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
{
if (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (s))
if (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (s))
;
else
return FALSE;
......
......@@ -1833,7 +1833,7 @@ py_Gui_get_workbook (py_Gui_object *self, PyObject *args)
return NULL;
}
workbook = wb_control_get_workbook (WORKBOOK_CONTROL (self->wbcg));
workbook = wb_control_get_workbook (GNM_WBC (self->wbcg));
return py_new_Workbook_object (workbook);
}
......
......@@ -652,7 +652,7 @@ gplp_func_desc_load (GOPluginService *service,
ServiceLoaderDataFunctionGroup *loader_data;
PyObject *fn_info_obj;
g_return_val_if_fail (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service), FALSE);
g_return_val_if_fail (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (service), FALSE);
g_return_val_if_fail (name != NULL, FALSE);
loader_data = g_object_get_data (G_OBJECT (service), "loader_data");
......@@ -713,7 +713,7 @@ gplp_load_service_function_group (GOPluginLoader *loader,
gchar *fn_info_dict_name;
PyObject *python_fn_info_dict;
g_return_if_fail (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service));
g_return_if_fail (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (service));
GO_INIT_RET_ERROR_INFO (ret_error);
gnm_py_interpreter_switch_to (loader_python->py_interpreter_info);
......@@ -762,7 +762,7 @@ gplp_unload_service_function_group (GOPluginLoader *loader,
ServiceLoaderDataFunctionGroup *loader_data;
g_return_if_fail (IS_GNM_PYTHON_PLUGIN_LOADER (loader));
g_return_if_fail (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (service));
g_return_if_fail (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (service));
GO_INIT_RET_ERROR_INFO (ret_error);
loader_data = g_object_get_data (G_OBJECT (service), "loader_data");
......@@ -825,7 +825,7 @@ gplp_load_service_ui (GOPluginLoader *loader,
gchar *ui_action_names;
PyObject *ui_actions;
g_return_if_fail (IS_GNM_PLUGIN_SERVICE_UI (service));
g_return_if_fail (GNM_IS_PLUGIN_SERVICE_UI (service));
GO_INIT_RET_ERROR_INFO (ret_error);
gnm_py_interpreter_switch_to (loader_python->py_interpreter_info);
......@@ -869,9 +869,9 @@ gplp_load_service_ui (GOPluginLoader *loader,
static gboolean
gplp_service_load (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
{
if (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (s))
if (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (s))
gplp_load_service_function_group (l, s, err);
else if (IS_GNM_PLUGIN_SERVICE_UI (s))
else if (GNM_IS_PLUGIN_SERVICE_UI (s))
gplp_load_service_ui (l, s, err);
else
return FALSE;
......@@ -881,9 +881,9 @@ gplp_service_load (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
static gboolean
gplp_service_unload (GOPluginLoader *l, GOPluginService *s, GOErrorInfo **err)
{
if (IS_GNM_PLUGIN_SERVICE_FUNCTION_GROUP (s))
if (GNM_IS_PLUGIN_SERVICE_FUNCTION_GROUP (s))
;
else if (IS_GNM_PLUGIN_SERVICE_UI (s))
else if (GNM_IS_PLUGIN_SERVICE_UI (s))
gplp_unload_service_function_group (l, s, err);
else
return FALSE;
......
......@@ -3051,7 +3051,7 @@ cmd_paste_copy_impl (GnmCommand *cmd, WorkbookControl *wbc,
me->has_been_through_cycle = TRUE;
/* Select the newly pasted contents (this queues a redraw) */
if (me->only_objects && IS_WBC_GTK (wbc)) {
if (me->only_objects && GNM_IS_WBC_GTK (wbc)) {
SheetControlGUI *scg =
wbcg_get_nth_scg (WBC_GTK (wbc),
cmd->sheet->index_in_wb);
......@@ -4700,7 +4700,7 @@ cmd_objects_delete (WorkbookControl *wbc, GSList *objects,
{
CmdObjectsDelete *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (objects != NULL, TRUE);
me = g_object_new (CMD_OBJECTS_DELETE_TYPE, NULL);
......@@ -4738,7 +4738,7 @@ cmd_objects_move (WorkbookControl *wbc, GSList *objects, GSList *anchors,
GOUndo *redo = NULL;
gboolean result = TRUE;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
undo = sheet_object_move_undo (objects, objects_created);
redo = sheet_object_move_do (objects, anchors, objects_created);
......@@ -6261,7 +6261,7 @@ cmd_scenario_add (WorkbookControl *wbc, GnmScenario *s, Sheet *sheet)
{
CmdScenarioAdd *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
me = g_object_new (CMD_SCENARIO_ADD_TYPE, NULL);
......@@ -6324,7 +6324,7 @@ cmd_scenario_mngr (WorkbookControl *wbc, GnmScenario *sc, GOUndo *undo)
{
CmdScenarioMngr *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (GNM_IS_SCENARIO (sc), TRUE);
me = g_object_new (CMD_SCENARIO_MNGR_TYPE, NULL);
......@@ -6383,7 +6383,7 @@ cmd_data_shuffle (WorkbookControl *wbc, data_shuffling_t *sc, Sheet *sheet)
{
CmdDataShuffle *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
me = g_object_new (CMD_DATA_SHUFFLE_TYPE, NULL);
......@@ -6876,7 +6876,7 @@ cmd_so_graph_config (WorkbookControl *wbc, SheetObject *so,
{
CmdSOGraphConfig *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (GNM_IS_SO_GRAPH (so), TRUE);
g_return_val_if_fail (GOG_IS_GRAPH (n_graph), TRUE);
g_return_val_if_fail (GOG_IS_GRAPH (o_graph), TRUE);
......@@ -6948,7 +6948,7 @@ cmd_so_component_config (WorkbookControl *wbc, SheetObject *so,
{
CmdSOComponentConfig *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (GNM_IS_SO_COMPONENT (so), TRUE);
g_return_val_if_fail (GO_IS_COMPONENT (n_obj), TRUE);
g_return_val_if_fail (GO_IS_COMPONENT (o_obj), TRUE);
......@@ -7001,7 +7001,7 @@ cmd_toggle_rtl (WorkbookControl *wbc, Sheet *sheet)
{
CmdToggleRTL *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (IS_SHEET (sheet), TRUE);
me = g_object_new (CMD_TOGGLE_RTL_TYPE, NULL);
......@@ -7070,7 +7070,7 @@ cmd_so_set_value (WorkbookControl *wbc,
CmdSOSetValue *me;
GnmRange r;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
r.start.col = r.end.col = pref->col;
r.start.row = r.end.row = pref->row;
......@@ -7340,7 +7340,7 @@ cmd_so_set_links (WorkbookControl *wbc,
{
CmdSOSetLink *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
me = g_object_new (CMD_SO_SET_LINKS_TYPE, NULL);
me->cmd.sheet = sheet_object_get_sheet (so);
......@@ -7411,7 +7411,7 @@ cmd_so_set_frame_label (WorkbookControl *wbc,
{
CmdSOSetFrameLabel *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
me = g_object_new (CMD_SO_SET_FRAME_LABEL_TYPE, NULL);
me->cmd.sheet = sheet_object_get_sheet (so);
......@@ -7482,7 +7482,7 @@ cmd_so_set_button (WorkbookControl *wbc,
{
CmdSOSetButton *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
me = g_object_new (CMD_SO_SET_BUTTON_TYPE, NULL);
me->cmd.sheet = sheet_object_get_sheet (so);
......@@ -7563,7 +7563,7 @@ cmd_so_set_radio_button (WorkbookControl *wbc,
{
CmdSOSetRadioButton *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
me = g_object_new (CMD_SO_SET_RADIO_BUTTON_TYPE, NULL);
me->cmd.sheet = sheet_object_get_sheet (so);
......@@ -7639,7 +7639,7 @@ cmd_so_set_checkbox (WorkbookControl *wbc,
{
CmdSOSetCheckbox *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
me = g_object_new (CMD_SO_SET_CHECKBOX_TYPE, NULL);
me->cmd.sheet = sheet_object_get_sheet (so);
......@@ -7745,7 +7745,7 @@ cmd_so_set_adjustment (WorkbookControl *wbc,
{
CmdSOSetAdjustment *me;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
me = g_object_new (CMD_SO_SET_ADJUSTMENT_TYPE, NULL);
me->cmd.sheet = sheet_object_get_sheet (so);
......@@ -7935,7 +7935,7 @@ cmd_page_breaks_clear (WorkbookControl *wbc, Sheet *sheet)
GOUndo *undo = NULL;
GOUndo *redo = NULL;
g_return_val_if_fail (IS_WORKBOOK_CONTROL (wbc), TRUE);
g_return_val_if_fail (GNM_IS_WBC (wbc), TRUE);
g_return_val_if_fail (sheet != NULL, TRUE);
if (sheet->print_info->page_breaks.v != NULL) {
......
......@@ -129,17 +129,17 @@ advanced_filter_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
unique = (1 == gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)));
if (dao->type == InPlaceOutput)
err = advanced_filter (WORKBOOK_CONTROL (state->wbcg),
err = advanced_filter (GNM_WBC (state->wbcg),
dao, input, criteria, unique);
else {
analysis_tools_data_advanced_filter_t *
data = g_new0 (analysis_tools_data_advanced_filter_t, 1);
data->base.wbc = WORKBOOK_CONTROL (state->wbcg);
data->base.wbc = GNM_WBC (state->wbcg);
data->base.range_1 = input;
data->base.range_2 = criteria;
data->unique_only_flag = unique;
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data, analysis_tool_advanced_filter_engine, FALSE)) {
err = data->base.err;
g_free (data);
......@@ -196,7 +196,7 @@ dialog_advanced_filter (WBCGtk *wbcg)
g_return_if_fail (wbcg != NULL);
wbc = WORKBOOK_CONTROL (wbcg);
wbc = GNM_WBC (wbcg);
/* Only pop up one copy per workbook */
if (gnumeric_dialog_raise_if_exists (wbcg, ADVANCED_FILTER_KEY))
......
......@@ -85,7 +85,7 @@ chi_squared_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
(GNM_EXPR_ENTRY (state->base.input_entry),
state->base.sheet);
data->wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->wbc = GNM_WBC (state->base.wbcg);
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->label));
......
......@@ -182,7 +182,7 @@ frequency_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "exact-button");
data->exact = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, analysis_tool_frequency_engine,
TRUE))
......
......@@ -253,7 +253,7 @@ kaplan_meier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
dao = parse_output ((GenericToolState *)state, NULL);
data->base.wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->base.wbc = GNM_WBC (state->base.wbcg);
if (state->base.warning_dialog != NULL)
gtk_widget_destroy (state->base.warning_dialog);
......@@ -295,7 +295,7 @@ kaplan_meier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->std_err = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (state->std_error_button));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, analysis_tool_kaplan_meier_engine,
TRUE))
......
......@@ -161,7 +161,7 @@ normality_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "normalprobabilityplot");
data->graph = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, analysis_tool_normality_engine,
TRUE))
......
......@@ -153,7 +153,7 @@ one_mean_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, analysis_tool_one_mean_test_engine,
TRUE))
......
......@@ -122,7 +122,7 @@ principal_components_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data,
analysis_tool_principal_components_engine,
TRUE)) {
......
......@@ -219,7 +219,7 @@ sign_test_two_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
? analysis_tool_sign_test_two_engine
: analysis_tool_signed_rank_test_two_engine;
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, engine, TRUE))
gtk_widget_destroy (state->base.dialog);
......@@ -333,7 +333,7 @@ sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
? analysis_tool_sign_test_engine
: analysis_tool_signed_rank_test_engine;
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, engine, TRUE))
gtk_widget_destroy (state->base.dialog);
......
......@@ -130,7 +130,7 @@ wilcoxon_mann_whitney_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data = g_new0 (analysis_tools_data_generic_b_t, 1);
dao = parse_output (state, NULL);
data->wbc = WORKBOOK_CONTROL (state->wbcg);
data->wbc = GNM_WBC (state->wbcg);
data->range_1 = gnm_expr_entry_parse_as_value
(GNM_EXPR_ENTRY (state->input_entry), state->sheet);
......@@ -141,7 +141,7 @@ wilcoxon_mann_whitney_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data,
analysis_tool_wilcoxon_mann_whitney_engine, TRUE)) {
char *text;
......
......@@ -386,9 +386,9 @@ dialog_tool_init (GenericToolState *state,
GtkWidget *widget;
state->wbcg = wbcg;
state->wb = wb_control_get_workbook (WORKBOOK_CONTROL (wbcg));
state->wb = wb_control_get_workbook (GNM_WBC (wbcg));
state->sheet = sheet;
state->sv = wb_control_cur_sheet_view (WORKBOOK_CONTROL (wbcg));
state->sv = wb_control_cur_sheet_view (GNM_WBC (wbcg));
state->warning_dialog = NULL;
state->help_link = help_file;
state->state_destroy = NULL;
......@@ -646,7 +646,7 @@ corr_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data, analysis_tool_correlation_engine, FALSE)) {
switch (data->err - 1) {
......@@ -766,7 +766,7 @@ cov_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data, analysis_tool_covariance_engine, FALSE)) {
switch (data->err - 1) {
......@@ -886,7 +886,7 @@ rank_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->av_ties = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (!cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data, analysis_tool_ranking_engine, TRUE))
gtk_widget_destroy (state->dialog);
return;
......@@ -967,7 +967,7 @@ fourier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data = g_new0 (analysis_tools_data_fourier_t, 1);
dao = parse_output (state, NULL);
data->base.wbc = WORKBOOK_CONTROL (state->wbcg);
data->base.wbc = GNM_WBC (state->wbcg);
data->base.input = gnm_expr_entry_parse_as_list (
GNM_EXPR_ENTRY (state->input_entry), state->sheet);
data->base.group_by = gnm_gui_group_value (state->gui, grouped_by_group);
......@@ -978,7 +978,7 @@ fourier_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->gui, "inverse_button");
data->inverse = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) != 0;
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->wbcg), state->sheet,
if (!cmd_analysis_tool (GNM_WBC (state->wbcg), state->sheet,
dao, data, analysis_tool_fourier_engine, TRUE))
gtk_widget_destroy (state->dialog);
......@@ -1087,7 +1087,7 @@ cb_desc_stat_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_descriptive_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
......@@ -1324,7 +1324,7 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data = g_new0 (analysis_tools_data_ttests_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
data->base.wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->base.wbc = GNM_WBC (state->base.wbcg);
if (state->base.warning_dialog != NULL)
gtk_widget_destroy (state->base.warning_dialog);
......@@ -1358,19 +1358,19 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
switch (state->invocation) {
case TTEST_PAIRED:
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, analysis_tool_ttest_paired_engine,
TRUE))
gtk_widget_destroy (state->base.dialog);
break;
case TTEST_UNPAIRED_EQUALVARIANCES:
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_ttest_eqvar_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
break;
case TTEST_UNPAIRED_UNEQUALVARIANCES:
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_ttest_neqvar_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
break;
......@@ -1394,7 +1394,7 @@ ttest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
return;
}
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_ztest_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
break;
......@@ -1711,7 +1711,7 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data = g_new0 (analysis_tools_data_generic_b_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
data->wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->wbc = GNM_WBC (state->base.wbcg);
if (state->base.warning_dialog != NULL)
gtk_widget_destroy (state->base.warning_dialog);
......@@ -1727,7 +1727,7 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
entry_to_float (GTK_ENTRY (state->alpha_entry), &data->alpha, TRUE);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_ftest_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
......@@ -1936,7 +1936,7 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data = g_new0 (analysis_tools_data_sampling_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
data->base.wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->base.wbc = GNM_WBC (state->base.wbcg);
data->base.input = gnm_expr_entry_parse_as_list (
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
......@@ -1957,7 +1957,7 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
entry_to_int (GTK_ENTRY (state->number_entry), &data->number, TRUE);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_sampling_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
return;
......@@ -2176,7 +2176,7 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data = g_new0 (analysis_tools_data_regression_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
data->base.wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->base.wbc = GNM_WBC (state->base.wbcg);
data->base.range_1 = gnm_expr_entry_parse_as_value (
GNM_EXPR_ENTRY (state->base.input_entry), state->base.sheet);
......@@ -2206,7 +2206,7 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->multiple_y = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->switch_variables_check));
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_regression_engine, FALSE)) {
char *text;
......@@ -2531,7 +2531,7 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->es_type = gnm_gui_group_value (state->base.gui, exp_smoothing_group);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_exponential_smoothing_engine,
TRUE))
gtk_widget_destroy (state->base.dialog);
......@@ -2892,7 +2892,7 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
break;
}
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_moving_average_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
......@@ -3309,7 +3309,7 @@ histogram_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "only-num-button");
data->only_numbers = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_histogram_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
......@@ -3472,7 +3472,7 @@ anova_single_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
if (!cmd_analysis_tool (GNM_WBC (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_anova_single_engine, TRUE))
gtk_widget_destroy (state->base.dialog);
......@@ -3625,7 +3625,7 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
(GNM_EXPR_ENTRY (state->base.input_entry),
state->base.sheet);
data->err = analysis_tools_noerr;
data->wbc = WORKBOOK_CONTROL (state->base.wbcg);
data->wbc = GNM_WBC (state->base.wbcg);
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
......@@ -3635,7 +3635,7 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
entry_to_int (GTK_ENTRY (state->replication_entry),
&data->replication, TRUE);
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
if (cmd_analysis_tool (GNM_WBC (state->base.wbcg),
state->base.sheet,
dao, data, analysis_tool_anova_two_factor_engine, FALSE)) {
switch (data->err) {
......
......@@ -129,7 +129,7 @@ map_op (AutoFilterState *state, GnmFilterOp *op,
}
if (v == NULL) {
Workbook *wb = wb_control_get_workbook (WORKBOOK_CONTROL (state->wbcg));
Workbook *wb = wb_control_get_workbook (GNM_WBC (state->wbcg));
v = format_match (txt, NULL, workbook_date_conv (wb));
}
if (v == NULL)
......@@ -178,7 +178,7 @@ cb_autofilter_ok (G_GNUC_UNUSED GtkWidget *button,
count);
}
if (cond != NULL)
cmd_autofilter_set_condition (WORKBOOK_CONTROL (state->wbcg),
cmd_autofilter_set_condition (GNM_WBC (state->wbcg),
state->filter, state->field,
cond);
......
......@@ -361,7 +361,7 @@ cb_ok_clicked (G_GNUC_UNUSED GtkButton *button,
AutoFormatState *state)
{
if (state->selected_template)
cmd_selection_autoformat (WORKBOOK_CONTROL (state->wbcg),
cmd_selection_autoformat (GNM_WBC (state->wbcg),
format_template_clone (state->selected_template));
gtk_widget_destroy (GTK_WIDGET (state->dialog));
......@@ -518,7 +518,7 @@ dialog_autoformat (WBCGtk *wbcg)
return;
state = g_new0 (AutoFormatState, 1);
state->wb = wb_control_get_workbook (WORKBOOK_CONTROL (wbcg));
state->wb = wb_control_get_workbook (GNM_WBC (wbcg));
state->wbcg = wbcg;
state->templates = NULL;
state->category_groups = NULL;
......
......@@ -68,7 +68,7 @@ gboolean
dialog_autosave_prompt (WBCGtk *wbcg)
{
char const *uri = go_doc_get_uri (
wb_control_get_doc (WORKBOOK_CONTROL (wbcg)));
wb_control_get_doc (GNM_WBC (wbcg)));
GtkWidget *dialog = gtk_message_dialog_new (wbcg_toplevel (wbcg),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
......@@ -135,7 +135,7 @@ dialog_autosave (WBCGtk *wbcg)