Re: [Planner Dev] Task dialog undo



On tis, 2004-06-01 at 07:39 +0000, Alvaro del Castillo wrote:
> +static gboolean
> +task_dialog_work_focus_out_cb (GtkWidget     *w,
> +                              GdkEventFocus *event,
> +                              DialogData    *data)
> +{
> +       MrpProject   *project;
> +       MrpCalendar  *calendar;
> +       gint          work;
> +       gint          current_work;
> +       gint          work_per_day;
> +       gdouble      *focus_in_work;
> +       GValue        value = { 0 };
> +       PlannerCmd   *cmd;
> +
> +       g_assert (MRP_IS_TASK (data->task));
> +
> +       g_object_get (data->task, "project", &project, NULL);
> +       calendar = mrp_project_get_calendar (project);
> +       work_per_day = mrp_calendar_day_get_total_work (calendar,
> +                                                       mrp_day_get_work ());
> +
> +       focus_in_work = g_object_get_data (G_OBJECT (data->task),
> "focus_in_work");

Isn't work always an integer? If so we don't need to allocate memory for
it, just set the data with GINT_TO_POINTER.

Same with duration and the others.

Other than that, the patch should be fine to commit.

Thanks,
Richard

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




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