Re: [Planner Dev] Task/Resource and Project property redo/undo patch.



On mån, 2004-05-10 at 02:00 +0100, lincoln phipps openmutual net wrote:

Good morning!

> >>@@ -885,6 +972,10 @@ mpp_property_added (MrpProject  *project
> >>                    MrpProperty *property,
> >>                    GtkWidget   *dialog)
> >> {
> >>+       if (!dialog) {
> >>+               return;  /* This happens when signal for
> >>property-added wasn't intended for this dialog */
> > 
> > 
> > Hm, is dialog really NULL ever here? Sounds like a bug if that's the
> > case.
> 
> Ah - I can see the bug in mpp_property_added (); the
> existing code tries to use dialog data before its checked
> to see if its a dialog - I'll fix the current code.

Hm, it sounds like a bug if we get a callback after the dialog is gone,
or use the same callback in cases where there can be a dialog present or
not.

> I propose to create the following routines in mrp-property.c,
> 
> const gchar *mrp_get_property_value_as_string (MrpProperty *property);
> boolean     *mrp_set_property_value_from_string (MrpProperty *property, gchar *string);
> 
> and then refactor current code (and patch) to use that.

Yeah, good idea.

/Richard

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




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