Re: [Planner Dev] New undo patch: Link/unlink tasks



On ons, 2004-05-05 at 16:00 +0000, Alvaro del Castillo wrote:
> El mié, 05-05-2004 a las 11:45, Richard Hult escribió:
> > On ons, 2004-05-05 at 07:57 +0000, Alvaro del Castillo wrote:
> > > Hi guys!
> > > 
> > > Here goes another patch for the undo system. With this one you can
> > > do/undo link/unlink tasks, using the link/unlink button and also,
> > > linking tasks with drag and drop.
> > 
> > Thanks, will take a look later today.
> > 
> > > I have had to modify a little the PlannerCmd and here goes a proposal to
> > > add 2 new fields: error and success. Richard, what do you think? I am
> > > not sure I like to add new fields in this way to PlannerCmd.
> > 
> > Hm, the boolean return value is for indicating success/failure, why do
> > you need the field?
> > 
> 
> I need the field because I need to know if a "PlannerCmd" has been
> executed ok. For example:
> 
> cmd = planner_task_tree_task_cmdlink (tree, task, target_task,
> MRP_RELATION_FS, 0);
> 
> if (cmd->success == FALSE) {
> 	GtkWidget   *dialog;
> 
> ... 
> 
> a dialog to tell the user that the cmd can't be done.

But that's what the boolean I added is for. The function shouldn't
return a cmd if it didn't succeed, it should return NULL.
(..._insert_and_do propagates the boolean from the command).

/Richard

-- 
Imendio HB, http://www.imendio.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]