aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorBolian Yin <bolian.yin@sun.com>2003-07-29 13:21:39 +0800
committerBolian Yin <byin@src.gnome.org>2003-07-29 13:21:39 +0800
commita6a09fd2fd0a92ab4cd27516fe19fee4312d17ea (patch)
tree2b90ae911c1f9131d784b752ca64f3982e057b19 /calendar/gui/e-week-view.c
parent1448bfd7fc4b3f8d138f9612a08f921975e283db (diff)
downloadgsoc2013-evolution-a6a09fd2fd0a92ab4cd27516fe19fee4312d17ea.tar.gz
gsoc2013-evolution-a6a09fd2fd0a92ab4cd27516fe19fee4312d17ea.tar.zst
gsoc2013-evolution-a6a09fd2fd0a92ab4cd27516fe19fee4312d17ea.zip
Fixes #46847
2003-07-29 Bolian Yin <bolian.yin@sun.com> Fixes #46847 * gui/e-day-view.c (e_day_view_get_next_tab_event, e_day_view_focus): add day view widget in the tab loop of events. * gui/e-week-view.c (e_week_view_get_next_tab_event, e_week_view_focus): add week view widget in the tab loop of events. Also: add some comments in gui/e-day-view.c and gui/e-week-view.c remove two compile warnings in gui/e-day-view.c svn path=/trunk/; revision=22002
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index ef4f718c4e..9beb123b95 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -930,7 +930,15 @@ e_week_view_expose_event (GtkWidget *widget,
return FALSE;
}
-
+/**
+ * e_week_view_get_next_tab_event
+ * @week_view: the week_view widget operate on
+ * @direction: GTK_DIR_TAB_BACKWARD or GTK_DIR_TAB_FORWARD.
+ * @current_event_num and @current_span_num: current status.
+ * @next_event_num: the event number focus should go next.
+ * -1 indicates focus should go to week_view widget.
+ * @next_span_num: always return 0.
+ **/
static gboolean
e_week_view_get_next_tab_event (EWeekView *week_view,
GtkDirectionType direction,
@@ -962,10 +970,18 @@ e_week_view_get_next_tab_event (EWeekView *week_view,
return FALSE;
}
- if (event_num < 0)
+ if (event_num == -1)
+ /* backward, out of event range, go to week view widget
+ */
+ *next_event_num = -1;
+ else if (event_num < -1)
+ /* backward from week_view, go to the last event
+ */
*next_event_num = week_view->events->len - 1;
else if (event_num >= week_view->events->len)
- *next_event_num = 0;
+ /* forward, out of event range, go to week view widget
+ */
+ *next_event_num = -1;
else
*next_event_num = event_num;
return TRUE;
@@ -997,6 +1013,13 @@ e_week_view_focus (GtkWidget *widget, GtkDirectionType direction)
&new_span_num))
return FALSE;
+ if (new_event_num == -1) {
+ /* focus should go to week_view widget
+ */
+ gtk_widget_grab_focus (widget);
+ return TRUE;
+ }
+
editable = e_week_view_start_editing_event (week_view,
new_event_num,
new_span_num,