aboutsummaryrefslogtreecommitdiffstats
path: root/a11y
Commit message (Expand)AuthorAgeFilesLines
* Patch submitted by Pavel Roskin <proski@gnu.org>Li Yuan2006-08-172-1/+8
* Don't leak summary_string here.Kjartan Maraas2006-08-162-0/+6
* Added translator comments to some strings. Fixes bug #331016. Thanks toAndre Klapper2006-07-132-0/+15
* Revert Rajeev's patch for #330728, #332727..Harish Krishnaswamy2006-06-222-1/+6
* Do not install header files, and make sure they will be included in theLi Yuan2006-06-124-16/+10
* Revert the earlier patch. They are needed, after all.Harish Krishnaswamy2006-05-164-0/+34
* Patch submitted by Li Yuan <li.yuan@sun.com> Do not install header files.Harish Krishnaswamy2006-05-154-28/+6
* Fix for #333279.Li Yuan2006-05-082-0/+10
* Fix for #339136Boby Wang2006-04-287-11/+71
* Fix for # 333725Boby Wang2006-04-283-8/+15
* Fix for #332821Boby Wang2006-04-276-0/+235
* reviewed by: Harish Krishnaswamy <kharish@novell.com>Rajeev ramanathan2006-04-242-1/+9
* Fix for #319308Boby Wang2006-03-202-5/+22
* Fix for 331550.Harry Lu2006-03-063-0/+14
* reviewed by: Harish Krishnaswamy <kharish@novell.com>Kjartan Maraas2006-01-2711-66/+34
* use e_utf8_strftime() inSimon Zheng2006-01-102-1/+7
* Use g_ascii_strcasecmp() instead of g_strcasecmp() for well-definedness.Tor Lillqvist2005-12-172-1/+7
* Fix for #316351Harry Lu2005-09-282-0/+10
* Fixes #313514. For the code change in gnopernicus, we should useLi Yuan2005-08-172-4/+9
* Fixes #310136 #310138. The first items of e-table are column-header. So weLi Yuan2005-07-192-7/+17
* Added widgets in INCLUDES.Kaushal Kumar2005-06-231-2/+2
* Cosmetics.Tor Lillqvist2005-06-191-4/+4
* Makefile.am addressbook/Makefile.am calendar/Makefile.am UseTor Lillqvist2005-06-195-5/+7
* Makefile.am addressbook/Makefile.am calendar/Makefile.am Use the fakeTor Lillqvist2005-06-188-72/+102
* Remove stray trailing slash from -I path, confuses gcc on Win32.Tor Lillqvist2005-06-182-2/+3
* Remove stray trailing slash from -I path, confuses gcc on Win32.Tor Lillqvist2005-06-182-1/+6
* Retired GAL from Head. The relevant files have moved inside evolution.Kaushal Kumar2005-06-1735-80/+165
* add two files to sort table items. add table header. ditto.Li Yuan2005-05-204-10/+264
* Port to Windows, initial commit:Tor Lillqvist2005-04-2919-89/+109
* return FALSE to let GTK run "F6" handler.Li Yuan2005-04-281-1/+1
* change the order of the code to avoid a crash.Li Yuan2005-04-253-2/+12
* return proper atk_object name and atk_stateset to avoid crash.Yu Mengjie2005-04-073-4/+24
* New function to reset focus object. (eti_rows_deleted),Harry Lu2005-03-241-43/+45
* Fix for 72897 and 72797. no need to output the information. add instanceLi Yuan2005-02-255-22/+132
* Fix for 72793.Harry Lu2005-02-241-0/+7
* Fix for 72781Harry Lu2005-02-223-2/+10
* Fix for 72088.Harry Lu2005-02-042-1/+20
* Some code clean work.Harry Lu2005-02-049-16/+60
* Fix for 71924, 71926, 71932 Don't split sentences that need translation.Harry Lu2005-02-025-75/+72
* Fixes #71929Rodrigo Moya2005-01-313-4/+12
* fix a typo present in the string tooSivaiah Nallagatla2005-01-292-1/+7
* use ngetext instead of splitting the the sentence to take care ofSivaiah Nallagatla2005-01-282-14/+16
* add gal-a11y-e-cell-vbox.h and gal-a11y-e-cell-vbox.cLi Yuan2005-01-2714-452/+990
* use E_CALENDAR_VIEW, not E_CAL_VIEWJP Rosevear2005-01-163-33/+14
* add ea-combo-button.[ch] to Makefile.Harry Lu2005-01-046-1/+224
* Fix a warning.Harry Lu2004-12-092-2/+8
* Change e_minicard_activiate_editor to e_minicard_activate_editor.Hao Sheng2004-12-022-1/+7
* Implement accessible feature for e-minicard and e-mini-card-view. AddSteven Zhang2004-11-086-52/+447
* use ngettext for n_events. ditto.Li Yuan2004-11-033-12/+11
* for calendar_get_text_for_folder_bar_label has been removed formLi Yuan2004-10-295-5/+124
* Make accessibility name and description translatable.Li Yuan2004-09-3013-55/+401
* Fixes 59047.Eric Zhao2004-06-211-3/+51
* added castRadek Doulik2004-06-111-6/+6
* fixes to get rid of compiler warningsRadek Doulik2004-06-1110-47/+30
* clean code to avoid compiler warningsRadek Doulik2004-06-101-2/+4
* Add $(top_srcdir)/widgets/misc for the e-activity-handler.h stuffRodney Dawes2004-04-302-4/+10
* If the week view has no spans, there is no visible events in the view.Kidd Wang2004-04-232-0/+9
* Fixes #48974.Eric Zhao2004-04-221-1/+4
* Fixes bug #52935.Eric Zhao2004-04-221-3/+106
* i'm sick of seeing ?'s in my cvs up listsChris Toshok2004-04-101-0/+2
* add some sanity check here. add atk_state_focused to focused cell, it isYuedong Du2004-04-012-4/+16
* fix includeJP Rosevear2004-03-162-1/+5
* svn path=/trunk/; revision=25062Hao Sheng2004-03-152-0/+2
* Contritbuted by Leon Zhang <leon.zhang@sun.com> add directory addressbook.Hao Sheng2004-03-1511-1/+800
* Fixed bug 51917, add atk support for ClickToAddYuedong Du2003-12-176-15/+464
* corret index error in week view. impl. get_index_in_parent emit signalBolian Yin2003-12-107-46/+143
* add entries for new source files add cases for jump button. add cases forAndrew Wu2003-12-0912-12/+2163
* shortcut when cal_view is NULL. Change an action name. add check for eventBolian Yin2003-12-091-1/+1
* shortcut when cal_view is NULL. Change an action name. add check for eventBolian Yin2003-12-095-21/+44
* A small fix from Andrew Wu.Bolian Yin2003-12-081-3/+6
* Fixed #50844Andrew Wu2003-12-082-0/+207
* Remove hard coded disable deprecated flagsJP Rosevear2003-12-073-3/+7
* (SHELL_IDLS): Only get Evolution.idl.Ettore Perazzoli2003-12-042-13/+4
* Fixes #51145Bolian Yin2003-12-021-9/+33
* Fixes #51139Bolian Yin2003-12-021-29/+65
* a11y implementations for ECellText. new functions to support correspondingTim Wo2003-12-021-80/+137
* use table item to get the model. (gal_a11y_e_cell_toggle_new): use tableTim Wo2003-12-023-38/+95
* don't assert row=0 as fault, it cause bug 51199.Yuedong Du2003-12-021-6/+9
* handle the structure changed signal of table model. Thus we can handleYuedong Du2003-12-021-0/+157
* override the function in base class, to retrieve the content of the text.Tim Wo2003-11-215-5/+94
* don't reset these fields, we need these info to a11y weak ref on each cellYuedong Du2003-11-203-15/+224
* new files (gal-a11y-e-cell-tree.c/h) added adding 2 new functions to addTim Wo2003-11-124-0/+260
* Fixes #50538Bolian Yin2003-11-117-9/+1518
* Fixes # 50480Bolian Yin2003-11-111-2/+100
* don't include toplevel libicalJP Rosevear2003-11-082-1/+4
* Handle some more renamingJP Rosevear2003-11-075-8/+12
* Various changes to merge in evolution-data-server reliance.JP Rosevear2003-11-075-46/+50
* Fixes # 48509Bolian Yin2003-11-0416-223/+2554
* *e-table/gal-a11y-e-table-item: defunct widget checking, selectionBolian Yin2003-11-032-43/+334
* new function to deal with grabing table cell focusTim Wo2003-11-031-0/+22
* add new file for toggle cell a11y object. new a11y object toggle cellYuedong Du2003-10-284-0/+427
* make sure the declation is at the beginning of the block.Larry Ewing2003-10-121-1/+2
* add new files. set the right role. new file.Yuedong Du2003-10-118-0/+446
* set the role of the atk object in the initialization function ofTim Wo2003-10-102-25/+496
* INCLUDE path fixes for changes made to libical build.Jeffrey Stedfast2003-10-102-9/+24
* some checking code added to ensure that end_offset and start_offset bothTim Wo2003-09-241-45/+118
* make the code be compliant with C89, or it can't be compiled on solaris.Tim Wo2003-09-181-12/+59
* GalA11yETextFactory should inherit from AtkObjectFactory not AtkObject.Tim Wo2003-09-122-2/+4
* addDan Winship2003-09-113-0/+10
* add widgets directory; move calendar idl stuff to calendar directory; stopBolian Yin2003-08-2711-56/+564
* adapted to changes in ECalViewEvent.Rodrigo Moya2003-08-202-11/+13
* add ea-factory.h into source listBolian Yin2003-08-201-1/+3
* setup the a11y directory for evolution accessibility work New files are:Bolian Yin2003-08-2018-0/+2190
* add libgal-a11y-2.0.so dependency change the build sequence for a11y partGilbert Fang2003-07-311-0/+94
* call AC_LIBTOOL_WIN32_DLL which is necessary for building shared libraryMasahiro Sakai2003-05-041-0/+4
* gal a11y work from claheyChris Toshok2002-11-3020-0/+2587
>0 }, { "GMT", 0 }, { "EST", -500 }, /* these are all US timezones. bloody yanks */ { "EDT", -400 }, { "CST", -600 }, { "CDT", -500 }, { "MST", -700 }, { "MDT", -600 }, { "PST", -800 }, { "PDT", -700 }, { "Z", 0 }, { "A", -100 }, { "M", -1200 }, { "N", 100 }, { "Y", 1200 }, }; static char *tm_months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; static char *tm_days[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; struct _date_token { struct _date_token *next; const unsigned char *start; unsigned int len; unsigned int mask; }; /* This is where it gets ugly... */ static struct _date_token * datetok (const char *date) { struct _date_token *tokens = NULL, *token, *tail = (struct _date_token *) &tokens; const unsigned char *start, *end; unsigned int mask; start = date; while (*start) { /* kill leading whitespace */ while (*start && isspace ((int) *start)) start++; if (*start == '\0') break; mask = datetok_table[*start]; /* find the end of this token */ end = start + 1; while (*end && !strchr ("-/,\t\r\n ", *end)) mask |= datetok_table[*end++]; if (end != start) { token = g_malloc (sizeof (struct _date_token)); token->next = NULL; token->start = start; token->len = end - start; token->mask = mask; tail->next = token; tail = token; } if (*end) start = end + 1; else break; } return tokens; } static int decode_int (const unsigned char *in, unsigned int inlen) { register const unsigned char *inptr; const unsigned char *inend; int sign = 1, val = 0; inptr = in; inend = in + inlen; if (*inptr == '-') { sign = -1; inptr++; } else if (*inptr == '+') inptr++; for ( ; inptr < inend; inptr++) { if (!isdigit ((int) *inptr)) return -1; else val = (val * 10) + (*inptr - '0'); } val *= sign; return val; } static int get_wday (const unsigned char *in, unsigned int inlen) { int wday; if (inlen < 3) return -1; for (wday = 0; wday < 7; wday++) if (!strncasecmp (in, tm_days[wday], 3)) return wday; return -1; /* unknown week day */ } static int get_mday (const unsigned char *in, unsigned int inlen) { int mday; mday = decode_int (in, inlen); if (mday < 0 || mday > 31) mday = -1; return mday; } static int get_month (const unsigned char *in, unsigned int inlen) { int i; if (inlen < 3) return -1; for (i = 0; i < 12; i++) if (!strncasecmp (in, tm_months[i], 3)) return i; return -1; /* unknown month */ } static int get_year (const unsigned char *in, unsigned int inlen) { int year; year = decode_int (in, inlen); if (year == -1) return -1; if (year < 100) year += (year < 70) ? 2000 : 1900; if (year < 1969) return -1; return year; } static gboolean get_time (const unsigned char *in, unsigned int inlen, int *hour, int *min, int *sec) { register const unsigned char *inptr; const unsigned char *inend; int *val, colons = 0; *hour = *min = *sec = 0; inend = in + inlen; val = hour; for (inptr = in; inptr < inend; inptr++) { if (*inptr == ':') { colons++; switch (colons) { case 1: val = min; break; case 2: val = sec; break; default: return FALSE; } } else if (!isdigit ((int) *inptr)) return FALSE; else *val = (*val * 10) + (*inptr - '0'); } return TRUE; } static int get_tzone (struct _date_token **token) { const unsigned char *inptr, *inend; unsigned int inlen; int i, t; for (i = 0; *token && i < 2; *token = (*token)->next, i++) { inptr = (*token)->start; inlen = (*token)->len; inend = inptr + inlen; if (*inptr == '+' || *inptr == '-') { t = decode_int (inptr, inlen); if (t < -1200 || t > 1200) return -1; return t; } else { if (*inptr == '(') { inptr++; if (*(inend - 1) == ')') inlen -= 2; else inlen--; } for (t = 0; t < 15; t++) { unsigned int len = strlen (tz_offsets[t].name); if (len != inlen) continue; if (!strncmp (inptr, tz_offsets[t].name, len)) return tz_offsets[t].offset; } } } return -1; } /* This is where things get interesting... ;-) */ #define date_token_mask(t) (((struct _date_token *) t)->mask) #define is_numeric(t) ((date_token_mask (t) & DATE_TOKEN_NON_NUMERIC) == 0) #define is_weekday(t) ((date_token_mask (t) & DATE_TOKEN_NON_WEEKDAY) == 0) #define is_month(t) ((date_token_mask (t) & DATE_TOKEN_NON_MONTH) == 0) #define is_time(t) (((date_token_mask (t) & DATE_TOKEN_NON_TIME) == 0) && (date_token_mask (t) & DATE_TOKEN_HAS_COLON)) #define is_tzone_alpha(t) ((date_token_mask (t) & DATE_TOKEN_NON_TIMEZONE_ALPHA) == 0) #define is_tzone_numeric(t) (((date_token_mask (t) & DATE_TOKEN_NON_TIMEZONE_NUMERIC) == 0) && (date_token_mask (t) & DATE_TOKEN_HAS_SIGN)) #define is_tzone(t) (is_tzone_alpha (t) || is_tzone_numeric (t)) static time_t decode_broken_date (struct _date_token *tokens, int *tzone) { gboolean got_wday, got_month, got_tzone; int hour, min, sec, offset, n; struct _date_token *token; struct tm tm; time_t time; memset ((void *) &tm, 0, sizeof (struct tm)); got_wday = got_month = got_tzone = FALSE; offset = 0; token = tokens; while (token) { if (is_weekday (token) && !got_wday) { if ((n = get_wday (token->start, token->len)) != -1) { d(printf ("weekday; ")); got_wday = TRUE; tm.tm_wday = n; goto next_token; } } if (is_month (token) && !got_month) { if ((n = get_month (token->start, token->len)) != -1) { d(printf ("month; ")); got_month = TRUE; tm.tm_mon = n; goto next_token; } } if (is_time (token) && !tm.tm_hour && !tm.tm_min && !tm.tm_sec) { if (get_time (token->start, token->len, &hour, &min, &sec)) { d(printf ("time; ")); tm.tm_hour = hour; tm.tm_min = min; tm.tm_sec = sec; goto next_token; } } if (is_tzone (token) && !got_tzone) { struct _date_token *t = token; if ((n = get_tzone (&t)) != -1) { d(printf ("tzone; ")); got_tzone = TRUE; offset = n; goto next_token; } } if (is_numeric (token)) { if (token->len == 4 && !tm.tm_year) { if ((n = get_year (token->start, token->len)) != -1) { d(printf ("year; ")); tm.tm_year = n - 1900; goto next_token; } } else { if (!got_month && !got_wday && token->next && is_numeric (token->next)) { d(printf ("mon; ")); n = decode_int (token->start, token->len); got_month = TRUE; tm.tm_mon = n - 1; goto next_token; } else if (!tm.tm_mday && (n = get_mday (token->start, token->len)) != -1) { d(printf ("mday; ")); tm.tm_mday = n; goto next_token; } else if (!tm.tm_year) { d(printf ("2-digit year; ")); n = get_year (token->start, token->len); tm.tm_year = n - 1900; goto next_token; } } } d(printf ("???; ")); next_token: token = token->next; } d(printf ("\n")); time = e_mktime_utc (&tm); /* time is now GMT of the time we want, but not offset by the timezone ... */ /* this should convert the time to the GMT equiv time */ time -= ((offset / 100) * 60 * 60) + (offset % 100) * 60; if (tzone) *tzone = offset; return time; } /** * parse_broken_date: * @datestr: input date string * @saveoffset: * * Decodes the rfc822/broken date string and saves the GMT offset into * @saveoffset if non-NULL. * * Returns the time_t representation of the date string specified by * @in. If 'saveoffset' is non-NULL, the value of the timezone offset * will be stored. **/ time_t parse_broken_date (const char *datestr, int *saveoffset) { struct _date_token *token, *tokens; time_t date; tokens = datetok (datestr); date = decode_broken_date (tokens, saveoffset); /* cleanup */ while (tokens) { token = tokens; tokens = tokens->next; g_free (token); } return date; } #ifdef DATETOK_STANDALONE static void table_init () { int i; memset (datetok_table, 0, sizeof (datetok_table)); for (i = 0; i < 256; i++) { if (!strchr (NUMERIC_CHARS, i)) datetok_table[i] |= DATE_TOKEN_NON_NUMERIC; if (!strchr (WEEKDAY_CHARS, i)) datetok_table[i] |= DATE_TOKEN_NON_WEEKDAY; if (!strchr (MONTH_CHARS, i)) datetok_table[i] |= DATE_TOKEN_NON_MONTH; if (!strchr (TIME_CHARS, i)) datetok_table[i] |= DATE_TOKEN_NON_TIME; if (!strchr (TIMEZONE_ALPHA_CHARS, i)) datetok_table[i] |= DATE_TOKEN_NON_TIMEZONE_ALPHA; if (!strchr (TIMEZONE_NUMERIC_CHARS, i)) datetok_table[i] |= DATE_TOKEN_NON_TIMEZONE_NUMERIC; if (((char) i) == ':') datetok_table[i] |= DATE_TOKEN_HAS_COLON; if (strchr ("+-", i)) datetok_table[i] |= DATE_TOKEN_HAS_SIGN; } printf ("static unsigned int datetok_table[256] = {"); for (i = 0; i < 256; i++) { if (i % 16 == 0) printf ("\n\t"); printf ("%3d,", datetok_table[i]); } printf ("\n};\n"); } int main (int argc, char **argv) { time_t date; int offset; /*table_init ();*/ date = parse_broken_date (argv[1], &offset); printf ("%d; %d\n", date, offset); return 0; } #endif /* DATETOK_STANDALONE */