openbsd-ports/x11/gnome/planner/patches/patch-src_planner-gantt-chart_c
ajacoutot 310da959d4 Fix crash when using zoom-to-fit (bug #550559).
Merged from upstream git.
2009-11-18 14:08:31 +00:00

65 lines
2.0 KiB
Plaintext

$OpenBSD: patch-src_planner-gantt-chart_c,v 1.1 2009/11/18 14:08:31 ajacoutot Exp $
Fix crash when using zoom-to-fit (bug #550559)
--- src/planner-gantt-chart.c.orig Tue Jul 22 15:41:47 2008
+++ src/planner-gantt-chart.c Wed Nov 18 13:36:20 2009
@@ -189,11 +189,6 @@ gantt_chart_add_relation
TreeNode *task,
TreeNode *predecessor,
MrpRelationType type);
-static void gantt_chart_get_visible_region (PlannerGanttChart *chart,
- gdouble *x1,
- gdouble *y1,
- gdouble *x2,
- gdouble *y2);
static void gantt_chart_set_scroll_region (PlannerGanttChart *chart,
gdouble x1,
gdouble y1,
@@ -967,7 +962,6 @@ gantt_chart_reflow_idle (PlannerGanttChart *chart)
PlannerGanttChartPriv *priv;
mrptime t1, t2;
gdouble x1, y1, x2, y2;
- gdouble vx1, vy1, vx2, vy2;
gdouble width, height;
gdouble bx1, bx2;
GtkAllocation allocation;
@@ -1011,11 +1005,6 @@ gantt_chart_reflow_idle (PlannerGanttChart *chart)
x2 = x1 + width;
- gantt_chart_get_visible_region(chart, &vx1, &vy1, &vx2, &vy2);
-
- x2 = MAX (x2, vx2);
- y2 = MAX (y2, vy2);
-
gantt_chart_set_scroll_region (chart,
x1,
y1,
@@ -1668,25 +1657,6 @@ gantt_chart_tree_traverse (TreeNode *node, TreeFunc fu
}
func (node, data);
-}
-
-static void
-gantt_chart_get_visible_region (PlannerGanttChart *chart,
- gdouble *x1,
- gdouble *y1,
- gdouble *x2,
- gdouble *y2)
-{
- GnomeCanvas *canvas;
- gint cx, cy;
-
- canvas = chart->priv->canvas;
-
- gnome_canvas_get_scroll_offsets(canvas, &cx, &cy);
- gnome_canvas_c2w(canvas, cx, cy, x1, y1);
-
- *x2 = *x1 + GTK_WIDGET(canvas)->allocation.width;
- *y2 = *y1 + GTK_WIDGET(canvas)->allocation.height;
}
static void