fix non-ASCII input key bug
remove repeat unichr; remove blank lines in table.py
exclude control characters from input range
Merge remote-tracking branch 'acevery/master' into rel20121001

Conflicts:
	engine/table.py
Improve check whether a phrase is simplified or traditional Chinese

The improvement is to ignore all non-Han characters when
doing the check.

This is to avoid classifying a simplified Chinese string as
traditional just because it happens to include some non-Chinese
characters, for example box drawing characters, which cannot be
converted to gb2312 but happen to be convertible to big5hkscs.

This fixes the problem in the emoji-table input method that most
phrases cannot be input at all.

See: https://bugzilla.redhat.com/show_bug.cgi?id=856320
Fix ipa-x-sampa table and phrases containing spaces in emoji-table

Currently there is a regular expression which filters out several
lines defining valid phrases. The emoji-table for example has phrases
containing spaces which are currently filtered out and the ipa-x-sampa
table has trailing comments which are filtered out as well.

In phrase_parser, the phrases are parsed like:

xingma, phrase, freq = unicode (l, "utf-8").strip ().split ('\t')[:3]

Therefore, it seems reasonable to change the regular expression checking
for a table line containing a phrase definition to accept every
line which has 3 columns seperated by tabs followed optionally
by more columns also separated by tabs (the optional columns are ignored,
i.e. they are just comments in the table source).

See: https://bugzilla.redhat.com/show_bug.cgi?id=856903
Merge remote-tracking branch 'mike-fabian/acevery-master-improve-chinese-category-check-rhbz856320' into rel20121001
Merge remote-tracking branch 'mike-fabian/acevery-master-fix-ipa-x-sampa-rhbz856903' into rel20121001
Remove unneeded sort in select_words(), speedup

Since sql query statement already sorted (ORDER BY) the result, remove
the unneeded sort operation.

Sorting with a python compare function is terribly slow for large list.
Fill input panel on demand. Huge GUI respond speedup

Huge speedup on ibus-table GUI repsond time when using a large phrases
table.

Currently, all the candidate phrases are created in the input panel
before shown to the users, while only 6 of the candidates actually show
up on the panel. For a phrase table with a lot of phrases, the candidate
list can contain more than 3000 entries, especially when only the 1st
key is entried.

3000 candidates will cause 3000 input widgets being generated before the
first 6 candidates were show to the users. This can make the GUI update
lagging up to a few seconds depending on the speed of the CPU. This is
at least O(n).

In this optimzed code, only 6 candidate widgets were generated at a
time. More candidate widgets will be generate on next-page/previous-
page action. Now we are O(1) for the GUI part of panel update.
Make page up/down keys configurable
Merge remote-tracking branch 'mozbugbox/page-up-down-config' into rel20121001
Updated PO files.
Refactor _refresh_properties() function.
Add page_size property for the tables.
Update ChangeLog.
Merge branch 'refactor-set-property' into rel20121101
Merge branch 'page-size-from-table' into rel20121101