Commit 26a47636 authored by Almer S. Tigelaar's avatar Almer S. Tigelaar Committed by Almer S. Tigelaar

Remove insert struct, there is only one function in it anyway so no need

2001-01-25  Almer S. Tigelaar  <almer1@dds.nl>

        * src/workbook-control-priv.h: Remove insert struct, there
	is only one function in it anyway so no need for a struct.

	* src/workbook-control.c: Adjust for removal of the insert struct.

	* src/workbook-control-gui.c
	(wbcg_paste_special_enable): Use change_menu_sensitivity.
	(workbook_control_gui_ctor_class): Adjust for removal of the insert struct.
parent 09be334a
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/workbook-control-priv.h: Remove insert struct, there
is only one function in it anyway so no need for a struct.
* src/workbook-control.c: Adjust for removal of the insert struct.
* src/workbook-control-gui.c
(wbcg_paste_special_enable): Use change_menu_sensitivity.
(workbook_control_gui_ctor_class): Adjust for removal of the insert struct.
2001-01-25 Morten Welinder <terra@diku.dk>
* src/commands.c (cmd_search_replace_update_after_action): Delete
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/workbook-control-priv.h: Remove insert struct, there
is only one function in it anyway so no need for a struct.
* src/workbook-control.c: Adjust for removal of the insert struct.
* src/workbook-control-gui.c
(wbcg_paste_special_enable): Use change_menu_sensitivity.
(workbook_control_gui_ctor_class): Adjust for removal of the insert struct.
2001-01-25 Morten Welinder <terra@diku.dk>
* src/commands.c (cmd_search_replace_update_after_action): Delete
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/workbook-control-priv.h: Remove insert struct, there
is only one function in it anyway so no need for a struct.
* src/workbook-control.c: Adjust for removal of the insert struct.
* src/workbook-control-gui.c
(wbcg_paste_special_enable): Use change_menu_sensitivity.
(workbook_control_gui_ctor_class): Adjust for removal of the insert struct.
2001-01-25 Morten Welinder <terra@diku.dk>
* src/commands.c (cmd_search_replace_update_after_action): Delete
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/workbook-control-priv.h: Remove insert struct, there
is only one function in it anyway so no need for a struct.
* src/workbook-control.c: Adjust for removal of the insert struct.
* src/workbook-control-gui.c
(wbcg_paste_special_enable): Use change_menu_sensitivity.
(workbook_control_gui_ctor_class): Adjust for removal of the insert struct.
2001-01-25 Morten Welinder <terra@diku.dk>
* src/commands.c (cmd_search_replace_update_after_action): Delete
......
2001-01-25 Almer S. Tigelaar <almer1@dds.nl>
* src/workbook-control-priv.h: Remove insert struct, there
is only one function in it anyway so no need for a struct.
* src/workbook-control.c: Adjust for removal of the insert struct.
* src/workbook-control-gui.c
(wbcg_paste_special_enable): Use change_menu_sensitivity.
(workbook_control_gui_ctor_class): Adjust for removal of the insert struct.
2001-01-25 Morten Welinder <terra@diku.dk>
* src/commands.c (cmd_search_replace_update_after_action): Delete
......
......@@ -807,14 +807,12 @@ wbcg_undo_redo_labels (WorkbookControl *wbc, char const *undo, char const *redo)
static void
wbcg_paste_special_enable (WorkbookControl *wbc, gboolean enable)
{
WorkbookControlGUI *wbcg = (WorkbookControlGUI *)wbc;
WorkbookControlGUI *wbcg = (WorkbookControlGUI *)wbc;
#ifndef ENABLE_BONOBO
gtk_widget_set_sensitive (
wbcg->menu_item_paste_special, enable);
change_menu_sensitivity (wbcg->menu_item_paste_special, enable);
#else
bonobo_ui_component_set_prop (wbcg->uic,
"/commands/EditPasteSpecial",
"sensitive", enable ? "1" : "0", NULL);
change_menu_sensitivity (wbcg, "/commands/EditPasteSpecial", "/menu/Edit/PasteSpecial", enable);
#endif
}
......@@ -3238,11 +3236,11 @@ workbook_control_gui_ctor_class (GtkObjectClass *object_class)
wbc_class->undo_redo.push = wbcg_undo_redo_push;
wbc_class->undo_redo.labels = wbcg_undo_redo_labels;
wbc_class->insert.cols_rows_enable = wbcg_insert_cols_rows_enable;
wbc_class->paste.special_enable = wbcg_paste_special_enable;
wbc_class->paste.from_selection = wbcg_paste_from_selection;
wbc_class->claim_selection = wbcg_claim_selection;
wbc_class->insert_cols_rows_enable = wbcg_insert_cols_rows_enable;
wbc_class->claim_selection = wbcg_claim_selection;
}
GNUMERIC_MAKE_TYPE(workbook_control_gui,
......
......@@ -41,16 +41,14 @@ typedef struct {
void (*labels) (WorkbookControl *wbc,
char const *undo, char const *redo);
} undo_redo;
struct {
void (*cols_rows_enable) (WorkbookControl *wbc, gboolean col,
gboolean enable);
} insert;
struct {
void (*special_enable) (WorkbookControl *wbc, gboolean enable);
void (*from_selection) (WorkbookControl *wbc,
PasteTarget const *pt, guint32 time);
} paste;
gboolean (*claim_selection) (WorkbookControl *wbc);
void (*insert_cols_rows_enable) (WorkbookControl *wbc, gboolean col,
gboolean enable);
gboolean (*claim_selection) (WorkbookControl *wbc);
} WorkbookControlClass;
#define WORKBOOK_CONTROL_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), WORKBOOK_CONTROL_TYPE, WorkbookControlClass))
......
......@@ -95,7 +95,7 @@ WBC_VIRTUAL_FULL (undo_redo_labels, undo_redo.labels,
(WorkbookControl *wbc, char const *undo, char const *redo),
(wbc, undo, redo))
WBC_VIRTUAL_FULL (insert_cols_rows_enable, insert.cols_rows_enable,
WBC_VIRTUAL_FULL (insert_cols_rows_enable, insert_cols_rows_enable,
(WorkbookControl *wbc, gboolean col, gboolean enable),
(wbc, col, enable))
......
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