aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-26 18:20:59 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-26 18:20:59 +0800
commit897f2574fd48427e81a21692e6ec0abc8f74eee4 (patch)
tree085d9950eaa23994a05d75cb7f2460320ee08188 /calendar/gui
parente1cbf635f8c681643294d74eceba71ad8aa5a046 (diff)
downloadgsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar.gz
gsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar.zst
gsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.zip
** Fix for bug #346693
2007-11-26 Milan Crha <mcrha@redhat.com> ** Fix for bug #346693 * gui/e-day-view.c: (e_day_view_on_editing_started): Ensure new event in top canvas will be visible. svn path=/trunk/; revision=34584
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 598404b673..45de0472f5 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -7633,16 +7633,22 @@ e_day_view_on_editing_started (EDayView *day_view,
day_view->editing_event_num = event_num;
if (day == E_DAY_VIEW_LONG_EVENT) {
- gint item_y, scroll_y;
+ gint item_x, item_y, item_w, item_h, scroll_y;
+ gint start_day, end_day;
e_day_view_reshape_long_event (day_view, event_num);
- /* and ensure it's visible too */
- item_y = (event_num * (day_view->top_row_height + 1)) - 1;
- scroll_y = gtk_adjustment_get_value (GTK_LAYOUT (day_view->top_canvas)->vadjustment);
- if (item_y + day_view->top_row_height > day_view->top_canvas->allocation.height + scroll_y ||
- item_y < scroll_y)
- gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_canvas), 0, item_y);
+ if (e_day_view_get_long_event_position (day_view, event_num,
+ &start_day, &end_day,
+ &item_x, &item_y,
+ &item_w, &item_h)) {
+ /* and ensure it's visible too */
+ /*item_y = (event_num * (day_view->top_row_height + 1)) - 1;*/
+ scroll_y = gtk_adjustment_get_value (GTK_LAYOUT (day_view->top_canvas)->vadjustment);
+ if (item_y + day_view->top_row_height > day_view->top_canvas->allocation.height + scroll_y ||
+ item_y < scroll_y)
+ gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_canvas), 0, item_y);
+ }
} else {
day_view->resize_bars_event_day = day;
day_view->resize_bars_event_num = event_num;