Commit e0788b0d authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder
Browse files

Add wbc argument and pass it on to update_after_action. All callers

2006-01-06  Morten Welinder  <terra@gnome.org>

	* src/commands.c (cmd_search_replace_update_after_action): Add wbc
	argument and pass it on to update_after_action.  All callers
	changed.
	(cmd_search_replace_do): Add wbc argument and pass it on to
	cmd_search_replace_update_after_action.  All callers changed.
parent bcb6e035
2006-01-06 Morten Welinder <terra@gnome.org>
* src/commands.c (cmd_search_replace_update_after_action): Add wbc
argument and pass it on to update_after_action. All callers
changed.
(cmd_search_replace_do): Add wbc argument and pass it on to
cmd_search_replace_update_after_action. All callers changed.
2005-12-13 Morten Welinder <terra@gnome.org>
* src/parser.y (build_set): Make this function unregister argument
......
......@@ -24,6 +24,7 @@ Morten:
* Fix out-of-memory problem in REPT.
* Fix lots of little XL compatibility problems in string
functions.
* Fix error on Search-and-replace.
Jon Kåre:
* Hand clipboard off to clipboard manager when exiting.
......
2006-01-06 Morten Welinder <terra@gnome.org>
* src/commands.c (cmd_search_replace_update_after_action): Add wbc
argument and pass it on to update_after_action. All callers
changed.
(cmd_search_replace_do): Add wbc argument and pass it on to
cmd_search_replace_update_after_action. All callers changed.
2005-12-13 Morten Welinder <terra@gnome.org>
* src/parser.y (build_set): Make this function unregister argument
......
......@@ -3789,7 +3789,8 @@ typedef struct {
static void
cmd_search_replace_update_after_action (CmdSearchReplace *me)
cmd_search_replace_update_after_action (CmdSearchReplace *me,
WorkbookControl *wbc)
{
GList *tmp;
Sheet *last_sheet = NULL;
......@@ -3798,7 +3799,7 @@ cmd_search_replace_update_after_action (CmdSearchReplace *me)
SearchReplaceItem *sri = tmp->data;
if (sri->pos.sheet != last_sheet) {
last_sheet = sri->pos.sheet;
update_after_action (last_sheet, NULL);
update_after_action (last_sheet, wbc);
}
}
}
......@@ -3806,7 +3807,7 @@ cmd_search_replace_update_after_action (CmdSearchReplace *me)
static gboolean
cmd_search_replace_undo (GnmCommand *cmd,
G_GNUC_UNUSED WorkbookControl *wbc)
WorkbookControl *wbc)
{
CmdSearchReplace *me = CMD_SEARCH_REPLACE (cmd);
GList *tmp;
......@@ -3837,14 +3838,14 @@ cmd_search_replace_undo (GnmCommand *cmd,
break;
}
}
cmd_search_replace_update_after_action (me);
cmd_search_replace_update_after_action (me, wbc);
return FALSE;
}
static gboolean
cmd_search_replace_redo (GnmCommand *cmd,
G_GNUC_UNUSED WorkbookControl *wbc)
WorkbookControl *wbc)
{
CmdSearchReplace *me = CMD_SEARCH_REPLACE (cmd);
GList *tmp;
......@@ -3875,7 +3876,7 @@ cmd_search_replace_redo (GnmCommand *cmd,
break;
}
}
cmd_search_replace_update_after_action (me);
cmd_search_replace_update_after_action (me, wbc);
return FALSE;
}
......@@ -4018,7 +4019,8 @@ cmd_search_replace_do_cell (CmdSearchReplace *me, GnmEvalPos *ep,
static gboolean
cmd_search_replace_do (CmdSearchReplace *me, gboolean test_run)
cmd_search_replace_do (CmdSearchReplace *me, gboolean test_run,
WorkbookControl *wbc)
{
GnmSearchReplace *sr = me->sr;
GPtrArray *cells;
......@@ -4056,7 +4058,7 @@ cmd_search_replace_do (CmdSearchReplace *me, gboolean test_run)
/* Cells were added in the wrong order. Correct. */
me->cells = g_list_reverse (me->cells);
cmd_search_replace_update_after_action (me);
cmd_search_replace_update_after_action (me, wbc);
}
return result;
......@@ -4111,13 +4113,13 @@ cmd_search_replace (WorkbookControl *wbc, GnmSearchReplace *sr)
me->cmd.size = 1; /* Corrected below. */
me->cmd.cmd_descriptor = g_strdup (_("Search and Replace"));
if (cmd_search_replace_do (me, TRUE)) {
if (cmd_search_replace_do (me, TRUE, wbc)) {
/* There was an error and nothing was done. */
g_object_unref (me);
return TRUE;
}
cmd_search_replace_do (me, FALSE);
cmd_search_replace_do (me, FALSE, wbc);
me->cmd.size += g_list_length (me->cells);
command_register_undo (wbc, G_OBJECT (me));
......
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