Commit 24df79c9 authored by Kurt Maute's avatar Kurt Maute

Two patches from Maurice van der Pot:

* src/planner-task-tree.c - disable selection updates before manipulating
  tasks (works for single selection, but not multiple - bug 436263)
* src/planner-gantt-row.c - fix resource name redraw in gantt chart when
  dragging relation arrow over it
* MAINTAINERS - added Maurice
* AUTHORS - added Maurice


svn path=/trunk/; revision=847
parent 010ff2f9
Richard Hult <richard@imendio.com>
Mikael Hallendal <micke@imendio.com>
Alvaro del Castillo <acs@barrapunto.com>
Kurt Maute <kurt@maute.us>
Maurice van der Pot <griffon26@kfk4ever.com>
2007-07-28 Kurt Maute <kurt@maute.us>
Two patches from Maurice van der Pot:
* src/planner-task-tree.c - disable selection updates before manipulating
tasks (works for single selection, but not multiple - bug 436263)
* src/planner-gantt-row.c - fix resource name redraw in gantt chart when
dragging relation arrow over it
* MAINTAINERS - added Maurice
* AUTHORS - added Maurice
2007-07-15 Kurt Maute <kurt@maute.us>
The following update provided by Maurice van der Pot <griffon26@kfk4ever.com>
* src/planner-gantt-row.c - allow dragging the completion bar in the
......
Kurt Maute <kurt@maute.us>
Maurice van der Pot <griffon26@kfk4ever.com>
Richard Hult <richard@imendio.com>
......@@ -162,6 +162,7 @@ struct _PlannerGanttRowPriv {
gdouble bar_top; /* Top y position of the bar. */
gdouble bar_bot; /* Bottom y position of the bar. */
gdouble text_width;
gdouble text_height;
/* Cached positions of each assigned resource. */
GArray *resource_widths;
......@@ -493,7 +494,7 @@ recalc_bounds (PlannerGanttRow *row)
{
PlannerGanttRowPriv *priv;
GnomeCanvasItem *item;
gint width;
gint width, height;
mrptime t;
MrpTaskType type;
gdouble old_x, old_x_start, old_width;
......@@ -511,13 +512,14 @@ recalc_bounds (PlannerGanttRow *row)
pango_layout_get_pixel_size (priv->layout,
&width,
NULL);
&height);
if (width > 0) {
width += TEXT_PADDING;
}
priv->text_width = width;
priv->text_height = height;
t = mrp_task_get_work_start (priv->task);
priv->x = t * priv->scale;
......@@ -742,7 +744,7 @@ gantt_row_update_resources (PlannerGanttRow *row)
pango_layout_set_text (priv->layout, ", ", 2);
pango_layout_get_extents (priv->layout, NULL, &rect);
spacing = rect.width / PANGO_SCALE;
x = 0;
resources = mrp_task_get_assigned_resources (priv->task);
......@@ -1955,14 +1957,15 @@ gantt_row_draw (GnomeCanvasItem *item,
rx2 = MIN (cx2 + TEXT_PADDING + priv->text_width, width);
if (priv->layout != NULL && rx1 < rx2) {
/* NOTE: cy1 - priv->bar_top: report to the top of the cell,
+ 3: is an empirical value to realign with task-tree result of the
default gtkcellrenderertext ypad property (2) + 1 ??? ;). */
/* NOTE: cy1 is the pixel coordinate of the top of the bar.
subtract round(priv->bar_top) to bring us to the top of the row
add priv->height / 2 to get to the center of the row
subtract priv->text_height / 2 to get to the top of the text */
draw_cut_layout (drawable,
GTK_WIDGET (item->canvas)->style->text_gc[GTK_STATE_NORMAL],
cx2 + TEXT_PADDING,
cy1 - priv->bar_top + 3,
cy1 - (gint)(priv->bar_top + 0.5) + (priv->height - priv->text_height) / 2,
priv->layout);
if (priv->mouse_over_index != -1) {
......
......@@ -3134,6 +3134,8 @@ planner_task_tree_unindent_task (PlannerTaskTree *tree)
_("Unindent tasks"));
}
task_tree_block_selection_changed (tree);
for (l = unindent_tasks; l; l = l->next) {
MrpTask *sibling;
gboolean before;
......@@ -3157,7 +3159,6 @@ planner_task_tree_unindent_task (PlannerTaskTree *tree)
path = planner_gantt_model_get_path_from_task (PLANNER_GANTT_MODEL (model),
unindent_tasks->data);
task_tree_block_selection_changed (tree);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree));
gtk_tree_selection_select_path (selection, path);
task_tree_unblock_selection_changed (tree);
......
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