Add option - orientation of candidates
authorPeng Huang <shawn.p.huang@gmail.com>
Thu, 25 Mar 2010 11:10:24 +0000 (19:10 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Thu, 25 Mar 2010 11:12:46 +0000 (19:12 +0800)
po/ibus-pinyin.pot
po/ru.po
po/zh_CN.po
setup/ibus-pinyin-preferences.ui
setup/main.py
src/Config.cc
src/Config.h
src/DoublePinyinEditor.cc
src/LookupTable.h
src/PinyinEditor.cc

index 8133738..bc5bde0 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-03-16 10:12+0800\n"
+"POT-Creation-Date: 2010-03-25 19:11+0800\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -41,7 +41,7 @@ msgid "Simplfied/Traditional Chinese"
 msgstr ""
 
 #: ../src/PinyinProperties.cc:69 ../src/PinyinProperties.cc:71
-#: ../setup/ibus-pinyin-preferences.ui.h:34
+#: ../setup/ibus-pinyin-preferences.ui.h:36
 msgid "Pinyin preferences"
 msgstr ""
 
@@ -82,7 +82,7 @@ msgid "About"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:11
-msgid "Auto commit phrase"
+msgid "Auto commit"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:13
@@ -146,100 +146,100 @@ msgid "Half/full width:"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:28
-msgid "Incomplete pinyin"
+msgid "Horizontal"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:29
-msgid "Language:"
+msgid "Incomplete pinyin"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:30
-msgid "MSPY"
+msgid "Language:"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:31
-msgid "Number of candidates:"
+msgid "MSPY"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:32
-msgid "PYJJ"
+msgid "Number of candidates:"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:33
-msgid "Pinyin input method for IBus"
+msgid "Orientation of candidates:"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:35
-msgid "Press [,] [.] key to flip page"
+#: ../setup/ibus-pinyin-preferences.ui.h:34
+msgid "PYJJ"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:36
-msgid "Press [-] [=] key to flip page"
+#: ../setup/ibus-pinyin-preferences.ui.h:35
+msgid "Pinyin input method for IBus"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:37
-msgid "Press [Shift] key to select candidate"
-msgstr ""
-
-#: ../setup/ibus-pinyin-preferences.ui.h:38
 msgid "Punctuations:"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:39
+#: ../setup/ibus-pinyin-preferences.ui.h:38
 msgid "Schema:"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:40
+#: ../setup/ibus-pinyin-preferences.ui.h:39
 msgid "Select double pinyin schema."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:41
+#: ../setup/ibus-pinyin-preferences.ui.h:40
 msgid "Setup the initial state of pinyin input method."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:42
+#: ../setup/ibus-pinyin-preferences.ui.h:41
 msgid "Setup the number of candidates show in one page of lookup table."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:43
+#: ../setup/ibus-pinyin-preferences.ui.h:42
 msgid "Show candidates in traditional Chinese"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:44
+#: ../setup/ibus-pinyin-preferences.ui.h:43
 msgid ""
 "Show candidates in traditional Chinese, if the input method is in "
 "traditional Chinese inputing mode."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:45
+#: ../setup/ibus-pinyin-preferences.ui.h:44
 msgid "Simplified"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:46
+#: ../setup/ibus-pinyin-preferences.ui.h:45
 msgid "Traditional"
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:47
+#: ../setup/ibus-pinyin-preferences.ui.h:46
 msgid "Use [,] [.] key to page up/down the lookup table."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:48
+#: ../setup/ibus-pinyin-preferences.ui.h:47
 msgid "Use [-] [=] key to page up/down the lookup table."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:49
+#: ../setup/ibus-pinyin-preferences.ui.h:48
 msgid "Use double pinyin."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:50
+#: ../setup/ibus-pinyin-preferences.ui.h:49
 msgid "Use full pinyin."
 msgstr ""
 
-#: ../setup/ibus-pinyin-preferences.ui.h:51
+#: ../setup/ibus-pinyin-preferences.ui.h:50
 msgid ""
 "Use left and right shift keys to select the second and thrid candidates."
 msgstr ""
 
+#: ../setup/ibus-pinyin-preferences.ui.h:51
+msgid "Vertical"
+msgstr ""
+
 #: ../setup/ibus-pinyin-preferences.ui.h:52
 msgid "ZGPY"
 msgstr ""
@@ -249,5 +249,17 @@ msgid "ZRM"
 msgstr ""
 
 #: ../setup/ibus-pinyin-preferences.ui.h:54
+msgid "[,] [.] flip page"
+msgstr ""
+
+#: ../setup/ibus-pinyin-preferences.ui.h:55
+msgid "[-] [=] flip page"
+msgstr ""
+
+#: ../setup/ibus-pinyin-preferences.ui.h:56
+msgid "[Shift] select candidate"
+msgstr ""
+
+#: ../setup/ibus-pinyin-preferences.ui.h:57
 msgid "http://ibus.googlecode.com"
 msgstr ""
index c12d204..2ea7815 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-03-16 10:12+0800\n"
+"POT-Creation-Date: 2010-03-25 19:11+0800\n"
 "PO-Revision-Date: 2009-10-14 09:44+0300\n"
 "Last-Translator: Alexey Kotlyarov <koterpillar@gmail.com>\n"
 "Language-Team: Russian\n"
@@ -42,11 +42,12 @@ msgid "Simplfied/Traditional Chinese"
 msgstr "Упрощенные/традиционные иероглифы"
 
 #: ../src/PinyinProperties.cc:69 ../src/PinyinProperties.cc:71
-#: ../setup/ibus-pinyin-preferences.ui.h:34
+#: ../setup/ibus-pinyin-preferences.ui.h:36
 msgid "Pinyin preferences"
 msgstr "Настройки пиньиня"
 
 #: ../setup/main.py:38 ../setup/ibus-pinyin-preferences.ui.h:7
+#, no-c-format, python-format
 msgid "<big><b>IBus Pinyin %s</b></big>"
 msgstr "<big><b>IBus Пиньинь %s</b></big>"
 
@@ -83,7 +84,7 @@ msgid "About"
 msgstr "О программе"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:11
-msgid "Auto commit phrase"
+msgid "Auto commit"
 msgstr "Автоматически подтверждать фразу"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:13
@@ -147,66 +148,63 @@ msgid "Half/full width:"
 msgstr "Полная/половинная ширина:"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:28
+msgid "Horizontal"
+msgstr ""
+
+#: ../setup/ibus-pinyin-preferences.ui.h:29
 msgid "Incomplete pinyin"
 msgstr "Неполный пиньинь"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:29
+#: ../setup/ibus-pinyin-preferences.ui.h:30
 msgid "Language:"
 msgstr "Язык:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:30
+#: ../setup/ibus-pinyin-preferences.ui.h:31
 msgid "MSPY"
 msgstr "MSPY"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:31
+#: ../setup/ibus-pinyin-preferences.ui.h:32
 msgid "Number of candidates:"
 msgstr "Число кандидатов"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:32
+#: ../setup/ibus-pinyin-preferences.ui.h:33
+msgid "Orientation of candidates:"
+msgstr "Число кандидатов"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:34
 msgid "PYJJ"
 msgstr "PYJJ"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:33
+#: ../setup/ibus-pinyin-preferences.ui.h:35
 msgid "Pinyin input method for IBus"
 msgstr "Метод ввода пиньинь для IBus"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:35
-msgid "Press [,] [.] key to flip page"
-msgstr "Использовать клавиши [,] [.] для переключения страниц"
-
-#: ../setup/ibus-pinyin-preferences.ui.h:36
-msgid "Press [-] [=] key to flip page"
-msgstr "Использовать клавиши [-] [=] для переключения страниц"
-
 #: ../setup/ibus-pinyin-preferences.ui.h:37
-msgid "Press [Shift] key to select candidate"
-msgstr "Использовать [Shift] для выбора кандидатов"
-
-#: ../setup/ibus-pinyin-preferences.ui.h:38
 msgid "Punctuations:"
 msgstr "Знаки препинания:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:39
+#: ../setup/ibus-pinyin-preferences.ui.h:38
 msgid "Schema:"
 msgstr "Схема:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:40
+#: ../setup/ibus-pinyin-preferences.ui.h:39
 msgid "Select double pinyin schema."
 msgstr "Выбор схемы двойного пиньиня."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:41
+#: ../setup/ibus-pinyin-preferences.ui.h:40
 msgid "Setup the initial state of pinyin input method."
 msgstr "Настройка начального состояния метода ввода."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:42
+#: ../setup/ibus-pinyin-preferences.ui.h:41
 msgid "Setup the number of candidates show in one page of lookup table."
 msgstr "Число кандидатов на одной странице таблицы поиска."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:43
+#: ../setup/ibus-pinyin-preferences.ui.h:42
 msgid "Show candidates in traditional Chinese"
 msgstr "Показывать кандидаты традиционными иероглифами."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:44
+#: ../setup/ibus-pinyin-preferences.ui.h:43
+#, fuzzy
 msgid ""
 "Show candidates in traditional Chinese, if the input method is in "
 "traditional Chinese inputing mode."
@@ -214,39 +212,43 @@ msgstr ""
 "Показывать кандидаты традиционными иероглифами, если включен ввод "
 "традиционных иероглифов."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:45
+#: ../setup/ibus-pinyin-preferences.ui.h:44
 msgid "Simplified"
 msgstr "Упрощенные"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:46
+#: ../setup/ibus-pinyin-preferences.ui.h:45
 msgid "Traditional"
 msgstr "Традиционные"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:47
+#: ../setup/ibus-pinyin-preferences.ui.h:46
 msgid "Use [,] [.] key to page up/down the lookup table."
 msgstr ""
 "Использовать клавиши [,] [.] для перемещения вверх-вниз по таблице поиска."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:48
+#: ../setup/ibus-pinyin-preferences.ui.h:47
 msgid "Use [-] [=] key to page up/down the lookup table."
 msgstr ""
 "Использовать клавиши [-] [=] для перемещения вверх-вниз по таблице поиска."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:49
+#: ../setup/ibus-pinyin-preferences.ui.h:48
 msgid "Use double pinyin."
 msgstr "Использовать двойной пиньинь (шуанпинь)."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:50
+#: ../setup/ibus-pinyin-preferences.ui.h:49
 msgid "Use full pinyin."
 msgstr "Использовать полный пиньинь."
 
-#: ../setup/ibus-pinyin-preferences.ui.h:51
+#: ../setup/ibus-pinyin-preferences.ui.h:50
 msgid ""
 "Use left and right shift keys to select the second and thrid candidates."
 msgstr ""
 "Использовать клавиши \"влево\" и \"вправо\" для выбора второго и третьего "
 "кандидатов"
 
+#: ../setup/ibus-pinyin-preferences.ui.h:51
+msgid "Vertical"
+msgstr ""
+
 #: ../setup/ibus-pinyin-preferences.ui.h:52
 msgid "ZGPY"
 msgstr "ZGPY"
@@ -256,5 +258,17 @@ msgid "ZRM"
 msgstr "ZRM"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:54
+msgid "[,] [.] flip page"
+msgstr "Использовать клавиши [,] [.] для переключения страниц"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:55
+msgid "[-] [=] flip page"
+msgstr "Использовать клавиши [-] [=] для переключения страниц"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:56
+msgid "[Shift] select candidate"
+msgstr "Использовать [Shift] для выбора кандидатов"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:57
 msgid "http://ibus.googlecode.com"
 msgstr "http://ibus.googlecode.com"
index 2563a41..27ded66 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ibus-pinyin 1.2.99\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-03-16 10:12+0800\n"
+"POT-Creation-Date: 2010-03-25 19:11+0800\n"
 "PO-Revision-Date: 2009-09-20 16:05+8\n"
 "Last-Translator: Peng Huang <shawn.p.huang@gmail.com>\n"
 "Language-Team: Peng Huang <shawn.p.huang@gmail.com>\n"
@@ -40,11 +40,12 @@ msgid "Simplfied/Traditional Chinese"
 msgstr "简体/繁体中文"
 
 #: ../src/PinyinProperties.cc:69 ../src/PinyinProperties.cc:71
-#: ../setup/ibus-pinyin-preferences.ui.h:34
+#: ../setup/ibus-pinyin-preferences.ui.h:36
 msgid "Pinyin preferences"
 msgstr "拼音首选项"
 
 #: ../setup/main.py:38 ../setup/ibus-pinyin-preferences.ui.h:7
+#, no-c-format, python-format
 msgid "<big><b>IBus Pinyin %s</b></big>"
 msgstr "<big><b>IBus 拼音 %s</b></big>"
 
@@ -80,7 +81,7 @@ msgid "About"
 msgstr "关于"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:11
-msgid "Auto commit phrase"
+msgid "Auto commit"
 msgstr "自动上词"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:13
@@ -144,100 +145,100 @@ msgid "Half/full width:"
 msgstr "全角/半角:"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:28
+msgid "Horizontal"
+msgstr "水平"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:29
 msgid "Incomplete pinyin"
 msgstr "简拼"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:29
+#: ../setup/ibus-pinyin-preferences.ui.h:30
 msgid "Language:"
 msgstr "语言:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:30
+#: ../setup/ibus-pinyin-preferences.ui.h:31
 msgid "MSPY"
 msgstr "微软拼音"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:31
+#: ../setup/ibus-pinyin-preferences.ui.h:32
 msgid "Number of candidates:"
-msgstr "每页显示候选词数:"
+msgstr "每页显示候选词数:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:32
+#: ../setup/ibus-pinyin-preferences.ui.h:33
+msgid "Orientation of candidates:"
+msgstr "候选词排列方向:"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:34
 msgid "PYJJ"
 msgstr "拼音加加"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:33
+#: ../setup/ibus-pinyin-preferences.ui.h:35
 msgid "Pinyin input method for IBus"
 msgstr "IBus 拼音输入法"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:35
-msgid "Press [,] [.] key to flip page"
-msgstr "按[,][.]键翻页"
-
-#: ../setup/ibus-pinyin-preferences.ui.h:36
-msgid "Press [-] [=] key to flip page"
-msgstr "按[-][=]键翻页"
-
 #: ../setup/ibus-pinyin-preferences.ui.h:37
-msgid "Press [Shift] key to select candidate"
-msgstr "按[Shift]键选词"
-
-#: ../setup/ibus-pinyin-preferences.ui.h:38
 msgid "Punctuations:"
 msgstr "标点符号:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:39
+#: ../setup/ibus-pinyin-preferences.ui.h:38
 msgid "Schema:"
 msgstr "双拼方案:"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:40
+#: ../setup/ibus-pinyin-preferences.ui.h:39
 msgid "Select double pinyin schema."
 msgstr "选择双拼模式。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:41
+#: ../setup/ibus-pinyin-preferences.ui.h:40
 msgid "Setup the initial state of pinyin input method."
 msgstr "设置拼音输入法初始状态。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:42
+#: ../setup/ibus-pinyin-preferences.ui.h:41
 msgid "Setup the number of candidates show in one page of lookup table."
 msgstr "设置每页显示后先词数量。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:43
+#: ../setup/ibus-pinyin-preferences.ui.h:42
 msgid "Show candidates in traditional Chinese"
 msgstr "显示繁体候选词"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:44
+#: ../setup/ibus-pinyin-preferences.ui.h:43
 msgid ""
 "Show candidates in traditional Chinese, if the input method is in "
 "traditional Chinese inputing mode."
 msgstr "当输入法处于繁体模式时,使用繁体候选词。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:45
+#: ../setup/ibus-pinyin-preferences.ui.h:44
 msgid "Simplified"
 msgstr "简体"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:46
+#: ../setup/ibus-pinyin-preferences.ui.h:45
 msgid "Traditional"
 msgstr "繁体"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:47
+#: ../setup/ibus-pinyin-preferences.ui.h:46
 msgid "Use [,] [.] key to page up/down the lookup table."
 msgstr "按[,][.]键翻页。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:48
+#: ../setup/ibus-pinyin-preferences.ui.h:47
 msgid "Use [-] [=] key to page up/down the lookup table."
 msgstr "使用[-][=]键翻页。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:49
+#: ../setup/ibus-pinyin-preferences.ui.h:48
 msgid "Use double pinyin."
 msgstr "使用双拼。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:50
+#: ../setup/ibus-pinyin-preferences.ui.h:49
 msgid "Use full pinyin."
 msgstr "使用全拼。"
 
-#: ../setup/ibus-pinyin-preferences.ui.h:51
+#: ../setup/ibus-pinyin-preferences.ui.h:50
 msgid ""
 "Use left and right shift keys to select the second and thrid candidates."
 msgstr "使用左右[shift]键选择第二个和第三个候选词。"
 
+#: ../setup/ibus-pinyin-preferences.ui.h:51
+msgid "Vertical"
+msgstr "竖直"
+
 #: ../setup/ibus-pinyin-preferences.ui.h:52
 msgid "ZGPY"
 msgstr "紫光拼音"
@@ -247,5 +248,17 @@ msgid "ZRM"
 msgstr "自然码"
 
 #: ../setup/ibus-pinyin-preferences.ui.h:54
+msgid "[,] [.] flip page"
+msgstr "[,][.]键翻页"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:55
+msgid "[-] [=] flip page"
+msgstr "[-][=]键翻页"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:56
+msgid "[Shift] select candidate"
+msgstr "[Shift]键选词"
+
+#: ../setup/ibus-pinyin-preferences.ui.h:57
 msgid "http://ibus.googlecode.com"
 msgstr "http://ibus.googlecode.com"
index 6e4a01a..425ae9e 100644 (file)
                             <child>
                               <object class="GtkTable" id="table3">
                                 <property name="visible">True</property>
-                                <property name="n_rows">6</property>
+                                <property name="n_rows">5</property>
                                 <property name="n_columns">2</property>
                                 <property name="column_spacing">12</property>
                                 <property name="row_spacing">6</property>
                                 <property name="homogeneous">True</property>
                                 <child>
                                   <object class="GtkCheckButton" id="ShiftSelectCandidate">
-                                    <property name="label" translatable="yes">Press [Shift] key to select candidate</property>
+                                    <property name="label" translatable="yes">[Shift] select candidate</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
                                   <packing>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkCheckButton" id="MinusEqualPage">
-                                    <property name="label" translatable="yes">Press [-] [=] key to flip page</property>
+                                    <property name="label" translatable="yes">[-] [=] flip page</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
                                   <packing>
+                                    <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                 </child>
                                 <child>
                                   <object class="GtkCheckButton" id="CommaPeriodPage">
-                                    <property name="label" translatable="yes">Press [,] [.] key to flip page</property>
+                                    <property name="label" translatable="yes">[,] [.] flip page</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
                                   <packing>
-                                    <property name="right_attach">2</property>
                                     <property name="top_attach">3</property>
                                     <property name="bottom_attach">4</property>
                                   </packing>
                                 </child>
                                 <child>
                                   <object class="GtkCheckButton" id="AutoCommit">
-                                    <property name="label" translatable="yes">Auto commit phrase</property>
+                                    <property name="label" translatable="yes">Auto commit</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">False</property>
                                     <property name="draw_indicator">True</property>
                                   </object>
                                   <packing>
+                                    <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
-                                    <property name="top_attach">4</property>
-                                    <property name="bottom_attach">5</property>
+                                    <property name="top_attach">3</property>
+                                    <property name="bottom_attach">4</property>
                                   </packing>
                                 </child>
                                 <child>
                                   </object>
                                   <packing>
                                     <property name="right_attach">2</property>
-                                    <property name="top_attach">5</property>
-                                    <property name="bottom_attach">6</property>
+                                    <property name="top_attach">4</property>
+                                    <property name="bottom_attach">5</property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkHBox" id="hbox3">
+                                  <object class="GtkComboBox" id="LookupTableOrientation">
                                     <property name="visible">True</property>
+                                    <property name="model">liststoreLookupTableOrientation</property>
+                                    <property name="button_sensitivity">on</property>
+                                  </object>
+                                  <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label4">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Orientation of candidates:</property>
+                                    <property name="use_markup">True</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkHScale" id="hscaleLookupTablePageSize">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
                                     <property name="tooltip_text" translatable="yes">Setup the number of candidates show in one page of lookup table.</property>
-                                    <property name="spacing">12</property>
-                                    <child>
-                                      <object class="GtkLabel" id="label16">
-                                        <property name="visible">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Number of candidates:</property>
-                                        <property name="use_markup">True</property>
-                                      </object>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <object class="GtkHScale" id="hscaleLookupTablePageSize">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="update_policy">delayed</property>
-                                        <property name="adjustment">LookupTablePageSize</property>
-                                        <property name="digits">0</property>
-                                        <property name="value_pos">left</property>
-                                      </object>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
+                                    <property name="update_policy">delayed</property>
+                                    <property name="adjustment">LookupTablePageSize</property>
+                                    <property name="digits">0</property>
+                                    <property name="value_pos">left</property>
                                   </object>
                                   <packing>
+                                    <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
-                                    <property name="x_options">GTK_FILL</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label16">
+                                    <property name="visible">True</property>
+                                    <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Number of candidates:</property>
+                                    <property name="use_markup">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                   </packing>
                                 </child>
                               </object>
     <property name="page_increment">1</property>
     <property name="page_size">1</property>
   </object>
+  <object class="GtkListStore" id="liststoreLookupTableOrientation">
+    <columns>
+      <!-- column-name orientation -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Horizontal</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Vertical</col>
+      </row>
+    </data>
+  </object>
 </interface>
index c0ed614..6ded867 100644 (file)
@@ -100,6 +100,11 @@ class PreferencesDialog:
     def __init_others(self):
         #others
         self.__lookup_table_page_size = self.__builder.get_object("LookupTablePageSize")
+        self.__lookup_table_orientation = self.__builder.get_object("LookupTableOrientation")
+
+        renderer = gtk.CellRendererText()
+        self.__lookup_table_orientation.pack_start(renderer)
+        self.__lookup_table_orientation.set_attributes(renderer, text=0)
 
         self.__shift_select_candidate = self.__builder.get_object("ShiftSelectCandidate")
         self.__minus_equal_page = self.__builder.get_object("MinusEqualPage")
@@ -109,6 +114,7 @@ class PreferencesDialog:
         self.__half_width_puncts = self.__builder.get_object("HalfWidthPuncts")
 
         # read values
+        self.__lookup_table_orientation.set_active(self.__get_value("LookupTableOrientation", 0))
         self.__lookup_table_page_size.set_value(self.__get_value("LookupTablePageSize", 5))
         self.__shift_select_candidate.set_active(self.__get_value("ShiftSelectCandidate", False))
         self.__minus_equal_page.set_active(self.__get_value("MinusEqualPage", True))
@@ -121,12 +127,17 @@ class PreferencesDialog:
         def __lookup_table_page_size_changed_cb(adjustment):
             self.__set_value("LookupTablePageSize", int(adjustment.get_value()))
 
+        def __lookup_table_orientation_changed_cb(widget):
+            self.__set_value("LookupTableOrientation", widget.get_active())
+
+        self.__lookup_table_orientation.connect("changed", __lookup_table_orientation_changed_cb)
+        self.__lookup_table_page_size.connect("value-changed", __lookup_table_page_size_changed_cb)
+
         self.__shift_select_candidate.connect("toggled", self.__toggled_cb, "ShiftSelectCandidate")
         self.__minus_equal_page.connect("toggled", self.__toggled_cb, "MinusEqualPage")
         self.__comma_period_page.connect("toggled", self.__toggled_cb, "CommaPeriodPage")
         self.__auto_commit.connect("toggled", self.__toggled_cb, "AutoCommit")
         self.__trad_candidate.connect("toggled", self.__toggled_cb, "TradCandidate")
-        self.__lookup_table_page_size.connect("value-changed", __lookup_table_page_size_changed_cb)
 
         def __entry_activate_cb(widget, name):
             text = widget.get_text()
index 4b5555a..bbbd2b7 100644 (file)
@@ -7,6 +7,7 @@ namespace PY {
 guint Config::m_option = PINYIN_INCOMPLETE_PINYIN | PINYIN_CORRECT_ALL;
 guint Config::m_option_mask = PINYIN_INCOMPLETE_PINYIN | PINYIN_CORRECT_ALL;
 
+gint Config::m_orientation = IBUS_ORIENTATION_HORIZONTAL;
 guint Config::m_page_size = 5;
 gboolean Config::m_shift_select_candidate = FALSE;
 gboolean Config::m_minus_equal_page = TRUE;
@@ -26,6 +27,7 @@ static const StaticString engine_pinyin ("engine/Pinyin");
 static const StaticString correct_pinyin ("CorrectPinyin");
 static const StaticString fuzzy_pinyin ("FuzzyPinyin");
 
+static const StaticString orientation ("LookupTableOrientation");
 static const StaticString page_size ("LookupTablePageSize");
 static const StaticString shift_select_candidate ("ShiftSelectCandidate");
 static const StaticString minus_equal_page ("MinusEqualPage");
@@ -99,7 +101,17 @@ Config::readDefaultValues (void)
     m_trad_candidate = read (engine_pinyin, trad_candidate, false);
 
     /* others */
+    m_orientation = read (engine_pinyin, PY::orientation, 0);
+    if (m_orientation != IBUS_ORIENTATION_VERTICAL &&
+        m_orientation != IBUS_ORIENTATION_HORIZONTAL) {
+        m_orientation = IBUS_ORIENTATION_HORIZONTAL;
+        g_warn_if_reached ();
+    }
     m_page_size = read (engine_pinyin, page_size, 5);
+    if (m_page_size > 10) {
+        m_page_size = 5;
+        g_warn_if_reached ();
+    }
     m_shift_select_candidate = read (engine_pinyin, shift_select_candidate, false);
     m_minus_equal_page = read (engine_pinyin, minus_equal_page, true);
     m_comma_period_page = read (engine_pinyin, comma_period_page, true);
@@ -191,8 +203,21 @@ Config::valueChangedCallback (IBusConfig    *config,
     else if (trad_candidate == name)
         m_trad_candidate = normalizeGValue (value, false);
     /* lookup table page size */
-    else if (page_size == name)
+    else if (PY::orientation == name) {
+        m_orientation = normalizeGValue (value, 0);
+        if (m_orientation != IBUS_ORIENTATION_VERTICAL &&
+            m_orientation != IBUS_ORIENTATION_HORIZONTAL) {
+            m_orientation = IBUS_ORIENTATION_HORIZONTAL;
+            g_warn_if_reached ();
+        }
+    }
+    else if (page_size == name) {
         m_page_size = normalizeGValue (value, 5);
+        if (m_page_size > 10) {
+            m_page_size = 5;
+            g_warn_if_reached ();
+        }
+    }
     else if (shift_select_candidate == name)
         m_shift_select_candidate = normalizeGValue (value, false);
     else if (minus_equal_page == name)
index 2f04ded..cbacae1 100644 (file)
@@ -17,6 +17,7 @@ public:
     }
 
     static guint option (void) { return m_option & m_option_mask; }
+    static guint orientation (void) { return m_orientation; }
     static guint pageSize (void) { return m_page_size; }
     static gboolean shiftSelectCandidate (void) { return m_shift_select_candidate; }
     static gboolean minusEqualPage (void) { return m_minus_equal_page; }
@@ -47,6 +48,7 @@ private:
     static guint m_option;
     static guint m_option_mask;
 
+    static gint m_orientation;
     static guint m_page_size;
     static gboolean m_shift_select_candidate;
     static gboolean m_minus_equal_page;
index e59930d..e0a1c48 100644 (file)
@@ -355,11 +355,22 @@ DoublePinyinEditor::updatePinyin (gboolean all)
 void
 DoublePinyinEditor::updateAuxiliaryTextAfter (String &buffer)
 {
-    buffer << "\n[ ";
-    buffer.append (m_text, m_cursor);
-    buffer << "|";
-    buffer.append (m_text.c_str () + m_cursor);
-    buffer << " ]";
+    if (G_LIKELY (Config::orientation () == IBUS_ORIENTATION_HORIZONTAL)) {
+        buffer << "        [ ";
+    }
+    else {
+        buffer << "\n[ ";
+    }
+    
+    if (G_LIKELY (m_cursor == m_text.length ())) {
+        m_buffer << m_text << " ]";
+    }
+    else {
+        buffer.append (m_text, m_cursor);
+        buffer << " ";
+        buffer.append (m_text.c_str () + m_cursor);
+        buffer << " ]";
+    }
 }
 
 #define CMSHM_MASK              \
index 2aca2a5..d5b34ae 100644 (file)
@@ -16,6 +16,7 @@ public:
         : Pointer <IBusLookupTable> (ibus_lookup_table_new (page_size, cursor_pos, cursor_visible, round)) { }
 
     guint pageSize (void) { return ibus_lookup_table_get_page_size (*this); }
+    guint orientation (void) { return ibus_lookup_table_get_orientation (*this); }
     guint cursorPos (void) { return ibus_lookup_table_get_cursor_pos (*this); }
 
     gboolean pageUp (void) { return ibus_lookup_table_page_up (*this); }
@@ -24,6 +25,7 @@ public:
     gboolean cursorDown (void) { return ibus_lookup_table_cursor_down (*this); }
 
     void setPageSize (guint size) { ibus_lookup_table_set_page_size (*this, size); }
+    void setOrientation (gint orientation) { ibus_lookup_table_set_orientation (*this, orientation); }
     void clear (void) { ibus_lookup_table_clear (*this); }
 
     void appendCandidate (IBusText *text) {
index f7a632f..e703a8b 100644 (file)
@@ -462,6 +462,7 @@ PinyinEditor::updateLookupTable (void)
 {
     m_lookup_table.clear ();
     m_lookup_table.setPageSize (Config::pageSize ());
+    m_lookup_table.setOrientation (Config::orientation ());
 
     guint candidate_nr = m_phrase_editor.candidates ().length ();