diff options
author | Andrew Wu <Yang.Wu@sun.com> | 2003-12-09 15:09:24 +0800 |
---|---|---|
committer | Bolian Yin <byin@src.gnome.org> | 2003-12-09 15:09:24 +0800 |
commit | adcb9e228978aded6cdf78f6dd1f8c460b650504 (patch) | |
tree | 449427aaaf8322d1d9fe039ac6f5ceb1e286abf3 /a11y/calendar/ea-calendar.c | |
parent | 0fdb5d6dc167d32226452dd521221c1ed994f573 (diff) | |
download | gsoc2013-evolution-adcb9e228978aded6cdf78f6dd1f8c460b650504.tar.gz gsoc2013-evolution-adcb9e228978aded6cdf78f6dd1f8c460b650504.tar.zst gsoc2013-evolution-adcb9e228978aded6cdf78f6dd1f8c460b650504.zip |
add entries for new source files add cases for jump button. add cases for
2003-12-09 Andrew Wu <Yang.Wu@sun.com>
* calendar/Makefile.am: add entries for new source files
* calendar/ea-calendar-helpers.c: add cases for jump button.
* calendar/ea-calendar.c: add cases for week view and week view main item.
* calendar/ea-jump-button.c: new impl.
* calendar/ea-week-view-cell.c: new impl.
* calendar/ea-week-view-main-item.c: new impl.
* calendar/ea-week-view.c: add main item as first child.
svn path=/trunk/; revision=23892
Diffstat (limited to 'a11y/calendar/ea-calendar.c')
-rw-r--r-- | a11y/calendar/ea-calendar.c | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/a11y/calendar/ea-calendar.c b/a11y/calendar/ea-calendar.c index bb528cb919..f2510bbcf9 100644 --- a/a11y/calendar/ea-calendar.c +++ b/a11y/calendar/ea-calendar.c @@ -24,6 +24,7 @@ */ #include <gal/e-text/e-text.h> +#include <libgnomecanvas/gnome-canvas-pixbuf.h> #include "ea-calendar-helpers.h" #include "ea-factory.h" #include "ea-calendar.h" @@ -33,6 +34,7 @@ #include "calendar/ea-day-view.h" #include "calendar/ea-day-view-main-item.h" #include "calendar/ea-week-view.h" +#include "calendar/ea-week-view-main-item.h" #include "calendar/ea-gnome-calendar.h" @@ -40,6 +42,7 @@ EA_FACTORY (EA_TYPE_CAL_VIEW, ea_cal_view, ea_cal_view_new) EA_FACTORY (EA_TYPE_DAY_VIEW, ea_day_view, ea_day_view_new) EA_FACTORY_GOBJECT (EA_TYPE_DAY_VIEW_MAIN_ITEM, ea_day_view_main_item, ea_day_view_main_item_new) EA_FACTORY (EA_TYPE_WEEK_VIEW, ea_week_view, ea_week_view_new) +EA_FACTORY_GOBJECT (EA_TYPE_WEEK_VIEW_MAIN_ITEM, ea_week_view_main_item, ea_week_view_main_item_new) EA_FACTORY (EA_TYPE_GNOME_CALENDAR, ea_gnome_calendar, ea_gnome_calendar_new) static gboolean ea_calendar_focus_watcher (GSignalInvocationHint *ihint, @@ -57,6 +60,9 @@ gnome_calendar_a11y_init (void) g_signal_add_emission_hook (g_signal_lookup ("event", E_TYPE_TEXT), 0, ea_calendar_focus_watcher, NULL, (GDestroyNotify) NULL); + g_signal_add_emission_hook (g_signal_lookup ("event", GNOME_TYPE_CANVAS_PIXBUF), + 0, ea_calendar_focus_watcher, + NULL, (GDestroyNotify) NULL); g_signal_add_emission_hook (g_signal_lookup ("event-after", e_day_view_get_type()), 0, ea_calendar_focus_watcher, @@ -65,6 +71,14 @@ gnome_calendar_a11y_init (void) e_day_view_main_item_get_type()), 0, ea_calendar_focus_watcher, NULL, (GDestroyNotify) NULL); + g_signal_add_emission_hook (g_signal_lookup ("event-after", + e_week_view_get_type()), + 0, ea_calendar_focus_watcher, + NULL, (GDestroyNotify) NULL); + g_signal_add_emission_hook (g_signal_lookup ("event", + e_week_view_main_item_get_type()), + 0, ea_calendar_focus_watcher, + NULL, (GDestroyNotify) NULL); } } @@ -81,7 +95,8 @@ e_day_view_a11y_init (void) EA_SET_FACTORY (e_day_view_get_type(), ea_day_view); } -void e_day_view_main_item_a11y_init (void) +void +e_day_view_main_item_a11y_init (void) { EA_SET_FACTORY (e_day_view_main_item_get_type (), ea_day_view_main_item); } @@ -92,6 +107,12 @@ e_week_view_a11y_init (void) EA_SET_FACTORY (e_week_view_get_type(), ea_week_view); } +void +e_week_view_main_item_a11y_init (void) +{ + EA_SET_FACTORY (e_week_view_main_item_get_type (), ea_week_view_main_item); +} + gboolean ea_calendar_focus_watcher (GSignalInvocationHint *ihint, guint n_param_values, @@ -105,7 +126,7 @@ ea_calendar_focus_watcher (GSignalInvocationHint *ihint, object = g_value_get_object (param_values + 0); event = g_value_get_boxed (param_values + 1); - if (E_IS_TEXT (object)) { + if ((E_IS_TEXT (object)) || (GNOME_IS_CANVAS_PIXBUF (object))) { /* "event" signal on canvas item */ GnomeCanvasItem *canvas_item; @@ -146,6 +167,29 @@ ea_calendar_focus_watcher (GSignalInvocationHint *ihint, #endif atk_focus_tracker_notify (ea_event); } + } else if (E_IS_WEEK_VIEW (object)) { + EWeekView *week_view = E_WEEK_VIEW (object); + if (event->type == GDK_FOCUS_CHANGE) { + if (event->focus_change.in) { + /* give main item chance to emit focus */ + gnome_canvas_item_grab_focus (week_view->main_canvas_item); + } + } + } + else if (E_IS_WEEK_VIEW_MAIN_ITEM (object)) { + if (event->type == GDK_FOCUS_CHANGE) { + if (event->focus_change.in) { + /* we should emit focus on main item */ + ea_event = atk_gobject_accessible_for_object (object); + } + else + /* focus out */ + ea_event = NULL; +#ifdef ACC_DEBUG + printf ("EvoAcc: focus notify on week main item %p\n", (void *)object); +#endif + atk_focus_tracker_notify (ea_event); + } } return TRUE; } |