aboutsummaryrefslogtreecommitdiffstats
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
parente1cbf635f8c681643294d74eceba71ad8aa5a046 (diff)
downloadgsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar
gsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar.gz
gsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar.bz2
gsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar.lz
gsoc2013-evolution-897f2574fd48427e81a21692e6ec0abc8f74eee4.tar.xz
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
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-day-view.c20
2 files changed, 20 insertions, 7 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d861be1a76..a0bf88c458 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
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.
+
+2007-11-26 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #380644
* gui/dialogs/task-page.h: (task_page_add_attendee):
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;