diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2009-03-06 10:42:28 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2009-03-06 10:42:28 +0800 |
commit | a1ac8682c81051518ad0ff613958a0b96054091c (patch) | |
tree | ca42efb67a1dc9ef299e2a5fb145fa6183ca91a1 | |
parent | d415e945d62d69c097cf6aae701f42806529dfb7 (diff) | |
download | ibus-a1ac8682c81051518ad0ff613958a0b96054091c.tar.gz ibus-a1ac8682c81051518ad0ff613958a0b96054091c.tar.xz ibus-a1ac8682c81051518ad0ff613958a0b96054091c.zip |
Implement language panel: Always hide feature.1.1.0.20090306
-rw-r--r-- | data/ibus.schemas | 10 | ||||
-rw-r--r-- | po/fr.po | 78 | ||||
-rw-r--r-- | po/ja.po | 78 | ||||
-rw-r--r-- | po/pa.po | 78 | ||||
-rw-r--r-- | po/zh_CN.po | 81 | ||||
-rw-r--r-- | setup/main.py | 14 | ||||
-rw-r--r-- | setup/setup.glade | 188 | ||||
-rw-r--r-- | ui/gtk/languagebar.py | 24 | ||||
-rw-r--r-- | ui/gtk/panel.py | 12 |
9 files changed, 314 insertions, 249 deletions
diff --git a/data/ibus.schemas b/data/ibus.schemas index 2bd2bb5..828e4f0 100644 --- a/data/ibus.schemas +++ b/data/ibus.schemas @@ -49,14 +49,14 @@ </locale> </schema> <schema> - <key>/schemas/desktop/ibus/panel/auto_hide</key> - <applyto>/desktop/ibus/panel/auto_hide</applyto> + <key>/schemas/desktop/ibus/panel/show</key> + <applyto>/desktop/ibus/panel/show</applyto> <owner>ibus</owner> - <type>bool</type> - <default>true</default> + <type>int</type> + <default>1</default> <locale name="C"> <short>Auto Hide</short> - <long>Auto hide language panel</long> + <long>The behavior of language panel. 0 = Always hide, 1 = Auto hide, 2 = Always show</long> </locale> </schema> <schema> @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ibus VERSION\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" -"POT-Creation-Date: 2009-02-24 18:14+0800\n" +"POT-Creation-Date: 2009-03-06 10:39+0800\n" "PO-Revision-Date: 2009-02-06 01:55+0100\n" "Last-Translator: Julroy67 <julroy67@gmail.com>\n" "Language-Team: French <julroy67@gmail.com>\n" @@ -96,7 +96,7 @@ msgstr "Code touche :" msgid "Modifiers:" msgstr "Modificateurs :" -#: setup/keyboardshortcut.py:205 +#: setup/keyboardshortcut.py:206 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -104,11 +104,11 @@ msgstr "" "Veuillez presser une touche (ou une combinaison de touches).\n" "La boîte de dialogue se fermera lorsque la touche sera relâchée." -#: setup/keyboardshortcut.py:207 +#: setup/keyboardshortcut.py:208 msgid "Please press a key (or a key combination)" msgstr "Veuillez presser une touche (ou une combinaison de touches)" -#: setup/enginecombobox.py:94 +#: setup/enginecombobox.py:99 msgid "Select an input method" msgstr "" @@ -116,31 +116,31 @@ msgstr "" msgid "IBus Preferences" msgstr "" -#: setup/setup.glade:44 setup/setup.glade:63 setup/setup.glade:81 -msgid "..." -msgstr "…" - -#: setup/setup.glade:145 -msgid "Previous engine:" -msgstr "Moteur précédent :" +#: setup/setup.glade:46 +msgid "Trigger:" +msgstr "Déclencheur :" -#: setup/setup.glade:161 +#: setup/setup.glade:60 msgid "Next engine:" msgstr "Moteur suivant :" -#: setup/setup.glade:177 -msgid "Trigger:" -msgstr "Déclencheur :" +#: setup/setup.glade:76 +msgid "Previous engine:" +msgstr "Moteur précédent :" -#: setup/setup.glade:194 +#: setup/setup.glade:139 setup/setup.glade:156 setup/setup.glade:176 +msgid "..." +msgstr "…" + +#: setup/setup.glade:197 msgid "<b>Keyboard Shortcuts</b>" msgstr "<b>Raccourcis claviers</b>" -#: setup/setup.glade:226 +#: setup/setup.glade:229 msgid "Lookup table orientation:" msgstr "Orientation de la table :" -#: setup/setup.glade:238 +#: setup/setup.glade:240 msgid "" "Horizontal\n" "Vertical" @@ -148,53 +148,60 @@ msgstr "" "Horizontal\n" "Vertical" -#: setup/setup.glade:252 -msgid "Auto hide language bar" -msgstr "Cacher automatiquement la barre de langue" +#: setup/setup.glade:257 +msgid "Show language panel:" +msgstr "" -#: setup/setup.glade:264 +#: setup/setup.glade:268 +msgid "" +"Always Hide\n" +"On Daemon\n" +"Always Show" +msgstr "" + +#: setup/setup.glade:285 msgid "Use custom font" msgstr "Utiliser une police personnalisée" -#: setup/setup.glade:291 +#: setup/setup.glade:311 msgid "<b>Font and Style</b>" msgstr "" -#: setup/setup.glade:314 +#: setup/setup.glade:336 #, fuzzy msgid "Start ibus on login" msgstr "Démarrer automatiquement IBus lors de la connexion" -#: setup/setup.glade:326 +#: setup/setup.glade:346 #, fuzzy msgid "<b>Startup</b>" msgstr "<b>Interface Utilisateur</b>" -#: setup/setup.glade:351 +#: setup/setup.glade:371 msgid "General" msgstr "Général" -#: setup/setup.glade:425 +#: setup/setup.glade:442 msgid "gtk-add" msgstr "gtk-add" -#: setup/setup.glade:439 +#: setup/setup.glade:456 msgid "gtk-remove" msgstr "gtk-remove" -#: setup/setup.glade:453 +#: setup/setup.glade:471 msgid "gtk-go-up" msgstr "gtk-go-up" -#: setup/setup.glade:467 +#: setup/setup.glade:486 msgid "gtk-go-down" msgstr "gtk-go-down" -#: setup/setup.glade:496 +#: setup/setup.glade:513 msgid "Input Methods" msgstr "" -#: setup/setup.glade:512 +#: setup/setup.glade:529 msgid "" "<big><b>IBus</b></big>\n" "<small>The intelligent input bus</small>\n" @@ -210,14 +217,17 @@ msgstr "" "\n" "\n" -#: setup/setup.glade:537 +#: setup/setup.glade:554 msgid "About" msgstr "À propos" -#: setup/setup.glade:556 +#: setup/setup.glade:576 msgid "gtk-close" msgstr "gtk-close" +#~ msgid "Auto hide language bar" +#~ msgstr "Cacher automatiquement la barre de langue" + #, fuzzy #~ msgid "IBus - Running" #~ msgstr "IBus - Démarré" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ibus VERSION\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" -"POT-Creation-Date: 2009-02-24 18:14+0800\n" +"POT-Creation-Date: 2009-03-06 10:39+0800\n" "PO-Revision-Date: 2008-08-28 17:31+0900\n" "Last-Translator: UTUMI Hirosi <utuhiro78@yahoo.co.jp>\n" "Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n" @@ -92,7 +92,7 @@ msgstr "キーコード:" msgid "Modifiers:" msgstr "モディファイア:" -#: setup/keyboardshortcut.py:205 +#: setup/keyboardshortcut.py:206 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -100,11 +100,11 @@ msgstr "" "キーもしくはキーの組み合わせを入力してください。\n" "キーを離すとダイアログを閉じます" -#: setup/keyboardshortcut.py:207 +#: setup/keyboardshortcut.py:208 msgid "Please press a key (or a key combination)" msgstr "キーもしくはキーの組み合わせを入力してください" -#: setup/enginecombobox.py:94 +#: setup/enginecombobox.py:99 msgid "Select an input method" msgstr "" @@ -112,31 +112,31 @@ msgstr "" msgid "IBus Preferences" msgstr "" -#: setup/setup.glade:44 setup/setup.glade:63 setup/setup.glade:81 -msgid "..." -msgstr "..." - -#: setup/setup.glade:145 -msgid "Previous engine:" -msgstr "前のエンジン:" +#: setup/setup.glade:46 +msgid "Trigger:" +msgstr "トリガー:" -#: setup/setup.glade:161 +#: setup/setup.glade:60 msgid "Next engine:" msgstr "次のエンジン:" -#: setup/setup.glade:177 -msgid "Trigger:" -msgstr "トリガー:" +#: setup/setup.glade:76 +msgid "Previous engine:" +msgstr "前のエンジン:" -#: setup/setup.glade:194 +#: setup/setup.glade:139 setup/setup.glade:156 setup/setup.glade:176 +msgid "..." +msgstr "..." + +#: setup/setup.glade:197 msgid "<b>Keyboard Shortcuts</b>" msgstr "<b>キーボードショートカット</b>" -#: setup/setup.glade:226 +#: setup/setup.glade:229 msgid "Lookup table orientation:" msgstr "候補ウィンドウの向き:" -#: setup/setup.glade:238 +#: setup/setup.glade:240 msgid "" "Horizontal\n" "Vertical" @@ -144,53 +144,60 @@ msgstr "" "横\n" "縦" -#: setup/setup.glade:252 -msgid "Auto hide language bar" -msgstr "言語バーを自動で隠す" +#: setup/setup.glade:257 +msgid "Show language panel:" +msgstr "" -#: setup/setup.glade:264 +#: setup/setup.glade:268 +msgid "" +"Always Hide\n" +"On Daemon\n" +"Always Show" +msgstr "" + +#: setup/setup.glade:285 msgid "Use custom font" msgstr "カスタムフォントを使う" -#: setup/setup.glade:291 +#: setup/setup.glade:311 msgid "<b>Font and Style</b>" msgstr "" -#: setup/setup.glade:314 +#: setup/setup.glade:336 #, fuzzy msgid "Start ibus on login" msgstr "セッションログイン時に IBus を自動的に起動" -#: setup/setup.glade:326 +#: setup/setup.glade:346 msgid "<b>Startup</b>" msgstr "" -#: setup/setup.glade:351 +#: setup/setup.glade:371 msgid "General" msgstr "一般" -#: setup/setup.glade:425 +#: setup/setup.glade:442 msgid "gtk-add" msgstr "" -#: setup/setup.glade:439 +#: setup/setup.glade:456 #, fuzzy msgid "gtk-remove" msgstr "gtk-close" -#: setup/setup.glade:453 +#: setup/setup.glade:471 msgid "gtk-go-up" msgstr "" -#: setup/setup.glade:467 +#: setup/setup.glade:486 msgid "gtk-go-down" msgstr "" -#: setup/setup.glade:496 +#: setup/setup.glade:513 msgid "Input Methods" msgstr "" -#: setup/setup.glade:512 +#: setup/setup.glade:529 msgid "" "<big><b>IBus</b></big>\n" "<small>The intelligent input bus</small>\n" @@ -200,14 +207,17 @@ msgid "" "\n" msgstr "" -#: setup/setup.glade:537 +#: setup/setup.glade:554 msgid "About" msgstr "About" -#: setup/setup.glade:556 +#: setup/setup.glade:576 msgid "gtk-close" msgstr "gtk-close" +#~ msgid "Auto hide language bar" +#~ msgstr "言語バーを自動で隠す" + #~ msgid "IBus - Running" #~ msgstr "IBus - 実行中" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ibus\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" -"POT-Creation-Date: 2009-02-24 18:14+0800\n" +"POT-Creation-Date: 2009-03-06 10:39+0800\n" "PO-Revision-Date: 2008-10-17 14:15+0530\n" "Last-Translator: Amanpreet Singh <aalam@users.sf.net>\n" "Language-Team: Punjabi/Panjabi <punjabi-l10n@lists.sf.net>\n" @@ -91,7 +91,7 @@ msgstr "ਕੀ ਕੋਡ:" msgid "Modifiers:" msgstr "ਮਾਡੀਫਾਇਰ:" -#: setup/keyboardshortcut.py:205 +#: setup/keyboardshortcut.py:206 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -99,11 +99,11 @@ msgstr "" "ਕੋਈ ਵੀ ਸਵਿੱਚ ਦੱਬੋ (ਜਾਂ ਕੋਈ ਸਵਿੱਚ ਜੋੜ)।\n" "
ਜਦੋਂ ਸਵਿੱਚ ਛੱਡੀ ਜਾਵੇਗੀ ਤਾਂ ਇਹ ਡਾਈਲਾਗ ਬੰਦ ਹੋ ਜਾਵੇਗਾ।" -#: setup/keyboardshortcut.py:207 +#: setup/keyboardshortcut.py:208 msgid "Please press a key (or a key combination)" msgstr "ਕੋਈ ਵੀ ਸਵਿੱਚ ਦੱਬੋ (ਜਾਂ ਸਵਿੱਚ ਜੋੜ)" -#: setup/enginecombobox.py:94 +#: setup/enginecombobox.py:99 msgid "Select an input method" msgstr "" @@ -111,31 +111,31 @@ msgstr "" msgid "IBus Preferences" msgstr "" -#: setup/setup.glade:44 setup/setup.glade:63 setup/setup.glade:81 -msgid "..." -msgstr "..." - -#: setup/setup.glade:145 -msgid "Previous engine:" -msgstr "ਪਿਛਲਾ ਇੰਜਣ" +#: setup/setup.glade:46 +msgid "Trigger:" +msgstr "ਟਰਿੱਗਰ:" -#: setup/setup.glade:161 +#: setup/setup.glade:60 msgid "Next engine:" msgstr "ਅਗਲਾ ਇੰਜਣ:" -#: setup/setup.glade:177 -msgid "Trigger:" -msgstr "ਟਰਿੱਗਰ:" +#: setup/setup.glade:76 +msgid "Previous engine:" +msgstr "ਪਿਛਲਾ ਇੰਜਣ" -#: setup/setup.glade:194 +#: setup/setup.glade:139 setup/setup.glade:156 setup/setup.glade:176 +msgid "..." +msgstr "..." + +#: setup/setup.glade:197 msgid "<b>Keyboard Shortcuts</b>" msgstr "<b>ਕੀਬੋਰਡ ਸ਼ਾਰਟਕੱਟ</b>" -#: setup/setup.glade:226 +#: setup/setup.glade:229 msgid "Lookup table orientation:" msgstr "ਖੋਜ ਟੇਬਲ ਸਥਿਤੀ:" -#: setup/setup.glade:238 +#: setup/setup.glade:240 msgid "" "Horizontal\n" "Vertical" @@ -143,53 +143,60 @@ msgstr "" "ਹਰੀਜੱਟਲ\n" "
ਵਰਟੀਕਲ" -#: setup/setup.glade:252 -msgid "Auto hide language bar" -msgstr "ਭਾਸ਼ਾ ਪੱਟੀ ਆਟੋਮੈਟਿਕ ਓਹਲੇ ਕਰੋ" +#: setup/setup.glade:257 +msgid "Show language panel:" +msgstr "" -#: setup/setup.glade:264 +#: setup/setup.glade:268 +msgid "" +"Always Hide\n" +"On Daemon\n" +"Always Show" +msgstr "" + +#: setup/setup.glade:285 msgid "Use custom font" msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ ਵਰਤੋਂ" -#: setup/setup.glade:291 +#: setup/setup.glade:311 msgid "<b>Font and Style</b>" msgstr "" -#: setup/setup.glade:314 +#: setup/setup.glade:336 #, fuzzy msgid "Start ibus on login" msgstr "ਸ਼ੈਸ਼ਨ ਲਾਗਇਨ ਨਾਲ IBus ਆਟੋਮੈਟਿਕ ਚਾਲੂ ਕਰੋ" -#: setup/setup.glade:326 +#: setup/setup.glade:346 #, fuzzy msgid "<b>Startup</b>" msgstr "<b>UI</b>" -#: setup/setup.glade:351 +#: setup/setup.glade:371 msgid "General" msgstr "ਆਮ" -#: setup/setup.glade:425 +#: setup/setup.glade:442 msgid "gtk-add" msgstr "" -#: setup/setup.glade:439 +#: setup/setup.glade:456 msgid "gtk-remove" msgstr "gtk-close" -#: setup/setup.glade:453 +#: setup/setup.glade:471 msgid "gtk-go-up" msgstr "" -#: setup/setup.glade:467 +#: setup/setup.glade:486 msgid "gtk-go-down" msgstr "" -#: setup/setup.glade:496 +#: setup/setup.glade:513 msgid "Input Methods" msgstr "" -#: setup/setup.glade:512 +#: setup/setup.glade:529 msgid "" "<big><b>IBus</b></big>\n" "<small>The intelligent input bus</small>\n" @@ -205,14 +212,17 @@ msgstr "" "
\n" "
\n" -#: setup/setup.glade:537 +#: setup/setup.glade:554 msgid "About" msgstr "ਇਸ ਬਾਰੇ" -#: setup/setup.glade:556 +#: setup/setup.glade:576 msgid "gtk-close" msgstr "gtk-close" +#~ msgid "Auto hide language bar" +#~ msgstr "ਭਾਸ਼ਾ ਪੱਟੀ ਆਟੋਮੈਟਿਕ ਓਹਲੇ ਕਰੋ" + #~ msgid "IBus - Running" #~ msgstr "IBus - ਚੱਲ ਰਿਹਾ ਹੈ" diff --git a/po/zh_CN.po b/po/zh_CN.po index b4eb0fd..984517c 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1.1.20080813\n" "Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/entry\n" -"POT-Creation-Date: 2009-02-24 18:14+0800\n" +"POT-Creation-Date: 2009-03-06 10:39+0800\n" "PO-Revision-Date: 2008-08-13 21:59+0800\n" "Last-Translator: Huang Peng <shawn.p.huang@gmail.com>\n" "Language-Team: Huang Peng <shawn.p.huang@gmail.com>\n" @@ -91,7 +91,7 @@ msgstr "按键:" msgid "Modifiers:" msgstr "修饰符:" -#: setup/keyboardshortcut.py:205 +#: setup/keyboardshortcut.py:206 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -99,11 +99,11 @@ msgstr "" "请按一个键盘按键(或者一个组合按键)\n" "当您松开任意按键时,对话框会自动关闭。" -#: setup/keyboardshortcut.py:207 +#: setup/keyboardshortcut.py:208 msgid "Please press a key (or a key combination)" msgstr "请按一个键盘按键(或者一个组合按键)" -#: setup/enginecombobox.py:94 +#: setup/enginecombobox.py:99 msgid "Select an input method" msgstr "选择输入法" @@ -111,31 +111,31 @@ msgstr "选择输入法" msgid "IBus Preferences" msgstr "IBus设置" -#: setup/setup.glade:44 setup/setup.glade:63 setup/setup.glade:81 -msgid "..." -msgstr "" - -#: setup/setup.glade:145 -msgid "Previous engine:" -msgstr "上一个引擎:" +#: setup/setup.glade:46 +msgid "Trigger:" +msgstr "开关:" -#: setup/setup.glade:161 +#: setup/setup.glade:60 msgid "Next engine:" msgstr "下一个引擎:" -#: setup/setup.glade:177 -msgid "Trigger:" -msgstr "开关:" +#: setup/setup.glade:76 +msgid "Previous engine:" +msgstr "上一个引擎:" + +#: setup/setup.glade:139 setup/setup.glade:156 setup/setup.glade:176 +msgid "..." +msgstr "" -#: setup/setup.glade:194 +#: setup/setup.glade:197 msgid "<b>Keyboard Shortcuts</b>" msgstr "<b>快捷键</b>" -#: setup/setup.glade:226 +#: setup/setup.glade:229 msgid "Lookup table orientation:" msgstr "候选词表方向:" -#: setup/setup.glade:238 +#: setup/setup.glade:240 msgid "" "Horizontal\n" "Vertical" @@ -143,51 +143,62 @@ msgstr "" "水平\n" "竖直" -#: setup/setup.glade:252 -msgid "Auto hide language bar" -msgstr "自动隐藏语言栏" +#: setup/setup.glade:257 +msgid "Show language panel:" +msgstr "显示语言栏" + +#: setup/setup.glade:268 +msgid "" +"Always Hide\n" +"On Daemon\n" +"Always Show" +msgstr "" +"总是隐藏\n" +"按需要显示\n" +"总是显示" + -#: setup/setup.glade:264 +#: setup/setup.glade:285 msgid "Use custom font" msgstr "使用自定义字体" -#: setup/setup.glade:291 +#: setup/setup.glade:311 msgid "<b>Font and Style</b>" msgstr "<b>字体和风格</b>" -#: setup/setup.glade:314 +#: setup/setup.glade:336 msgid "Start ibus on login" msgstr "启动桌面时自动启动IBus" -#: setup/setup.glade:326 +#: setup/setup.glade:346 msgid "<b>Startup</b>" msgstr "<b>启动</b>" -#: setup/setup.glade:351 +#: setup/setup.glade:371 msgid "General" msgstr "通用" -#: setup/setup.glade:425 +#: setup/setup.glade:442 msgid "gtk-add" msgstr "" -#: setup/setup.glade:439 +#: setup/setup.glade:456 msgid "gtk-remove" msgstr "" -#: setup/setup.glade:453 +#: setup/setup.glade:471 msgid "gtk-go-up" msgstr "" -#: setup/setup.glade:467 +#: setup/setup.glade:486 msgid "gtk-go-down" msgstr "" -#: setup/setup.glade:496 +#: setup/setup.glade:513 msgid "Input Methods" msgstr "输入法" -#: setup/setup.glade:512 +#: setup/setup.glade:529 msgid "" "<big><b>IBus</b></big>\n" "<small>The intelligent input bus</small>\n" @@ -197,11 +208,13 @@ msgid "" "\n" msgstr "" -#: setup/setup.glade:537 +#: setup/setup.glade:554 msgid "About" msgstr "关于" -#: setup/setup.glade:556 +#: setup/setup.glade:576 msgid "gtk-close" msgstr "" +#~ msgid "Auto hide language bar" +#~ msgstr "自动隐藏语言栏" diff --git a/setup/main.py b/setup/main.py index 87f7962..afd7e0b 100644 --- a/setup/main.py +++ b/setup/main.py @@ -126,10 +126,10 @@ class Setup(object): self.__combobox_lookup_table_orientation_changed_cb) # auto hide - self.__checkbutton_auto_hide = self.__xml.get_widget("checkbutton_auto_hide") - self.__checkbutton_auto_hide.set_active( - self.__config.get_value("panel", "auto_hide", True)) - self.__checkbutton_auto_hide.connect("toggled", self.__checkbutton_auto_hide_toggled_cb) + self.__combobox_panel_show = self.__xml.get_widget("combobox_panel_show") + self.__combobox_panel_show.set_active( + self.__config.get_value("panel", "show", 1)) + self.__combobox_panel_show.connect("changed", self.__combobox_panel_show_changed_cb) # custom font self.__checkbutton_custom_font = self.__xml.get_widget("checkbutton_custom_font") @@ -328,10 +328,10 @@ class Setup(object): "panel", "lookup_table_orientation", self.__combobox_lookup_table_orientation.get_active()) - def __checkbutton_auto_hide_toggled_cb(self, button): + def __combobox_panel_show_changed_cb(self, combobox): self.__config.set_value( - "panel", "auto_hide", - self.__checkbutton_auto_hide.get_active()) + "panel", "show", + self.__combobox_panel_show.get_active()) def __checkbutton_custom_font_toggled_cb(self, button): if self.__checkbutton_custom_font.get_active(): diff --git a/setup/setup.glade b/setup/setup.glade index f58580d..d6b31ee 100644 --- a/setup/setup.glade +++ b/setup/setup.glade @@ -1,13 +1,13 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> +<!--Generated with glade3 3.4.5 on Fri Mar 6 10:26:22 2009 --> <glade-interface> - <!-- interface-requires gtk+ 2.16 --> - <!-- interface-naming-policy toplevel-contextual --> <widget class="GtkDialog" id="dialog_setup"> <property name="border_width">5</property> <property name="title" translatable="yes">IBus Preferences</property> - <property name="window_position">center-on-parent</property> + <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> <property name="icon_name">gtk-preferences</property> - <property name="type_hint">dialog</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="has_separator">False</property> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox1"> @@ -29,7 +29,7 @@ <widget class="GtkFrame" id="frame3"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment4"> <property name="visible">True</property> @@ -40,18 +40,13 @@ <property name="n_rows">3</property> <property name="n_columns">3</property> <child> - <widget class="GtkButton" id="button_prev_engine"> - <property name="label" translatable="yes">...</property> + <widget class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Trigger:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> @@ -59,15 +54,13 @@ </packing> </child> <child> - <widget class="GtkButton" id="button_next_engine"> - <property name="label" translatable="yes">...</property> + <widget class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Next engine:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> @@ -77,15 +70,15 @@ </packing> </child> <child> - <widget class="GtkButton" id="button_trigger"> - <property name="label" translatable="yes">...</property> + <widget class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Previous engine:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> @@ -93,7 +86,7 @@ </packing> </child> <child> - <widget class="GtkEntry" id="entry_prev_engine"> + <widget class="GtkEntry" id="entry_trigger"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">False</property> @@ -101,8 +94,6 @@ <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> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> @@ -125,7 +116,7 @@ </packing> </child> <child> - <widget class="GtkEntry" id="entry_trigger"> + <widget class="GtkEntry" id="entry_prev_engine"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="editable">False</property> @@ -133,21 +124,24 @@ <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> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> </packing> </child> <child> - <widget class="GtkLabel" id="label9"> + <widget class="GtkButton" id="button_trigger"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Previous engine:</property> - <property name="justify">right</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">...</property> + <property name="response_id">0</property> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> @@ -155,13 +149,16 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label8"> + <widget class="GtkButton" id="button_next_engine"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Next engine:</property> - <property name="justify">right</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">...</property> + <property name="response_id">0</property> </widget> <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> @@ -171,13 +168,19 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label7"> + <widget class="GtkButton" id="button_prev_engine"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Trigger:</property> - <property name="justify">right</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">...</property> + <property name="response_id">0</property> </widget> <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> @@ -201,14 +204,13 @@ </widget> <packing> <property name="expand">False</property> - <property name="position">0</property> </packing> </child> <child> <widget class="GtkFrame" id="frame4"> <property name="visible">True</property> <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment5"> <property name="visible">True</property> @@ -219,17 +221,17 @@ <child> <widget class="GtkHBox" id="hbox2"> <property name="visible">True</property> + <property name="homogeneous">True</property> <child> <widget class="GtkLabel" id="label6"> <property name="visible">True</property> <property name="xalign">1</property> <property name="label" translatable="yes">Lookup table orientation:</property> - <property name="justify">right</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> <property name="expand">False</property> <property name="padding">4</property> - <property name="position">0</property> </packing> </child> <child> @@ -243,17 +245,34 @@ Vertical</property> </packing> </child> </widget> - <packing> - <property name="position">0</property> - </packing> </child> <child> - <widget class="GtkCheckButton" id="checkbutton_auto_hide"> - <property name="label" translatable="yes">Auto hide language bar</property> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="draw_indicator">True</property> + <property name="homogeneous">True</property> + <child> + <widget class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Show language panel:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="padding">4</property> + </packing> + </child> + <child> + <widget class="GtkComboBox" id="combobox_panel_show"> + <property name="visible">True</property> + <property name="items" translatable="yes">Always Hide +On Daemon +Always Show</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> </widget> <packing> <property name="position">1</property> @@ -261,10 +280,10 @@ Vertical</property> </child> <child> <widget class="GtkCheckButton" id="checkbutton_custom_font"> - <property name="label" translatable="yes">Use custom font</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="label" translatable="yes">Use custom font</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> <packing> @@ -276,6 +295,7 @@ Vertical</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="response_id">0</property> </widget> <packing> <property name="position">3</property> @@ -304,17 +324,17 @@ Vertical</property> <child> <widget class="GtkFrame" id="frame1"> <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> <widget class="GtkAlignment" id="alignment7"> <property name="visible">True</property> <property name="left_padding">12</property> <child> <widget class="GtkCheckButton" id="checkbutton_auto_start"> - <property name="label" translatable="yes">Start ibus on login</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="label" translatable="yes">Start ibus on login</property> + <property name="response_id">0</property> <property name="draw_indicator">True</property> </widget> </child> @@ -351,8 +371,8 @@ Vertical</property> <property name="label" translatable="yes">General</property> </widget> <packing> - <property name="tab_fill">False</property> <property name="type">tab</property> + <property name="tab_fill">False</property> </packing> </child> <child> @@ -380,9 +400,6 @@ Vertical</property> <placeholder/> </child> </widget> - <packing> - <property name="position">0</property> - </packing> </child> <child> <widget class="GtkScrolledWindow" id="scrolledwindow_engine_treeview"> @@ -390,9 +407,9 @@ Vertical</property> <property name="height_request">350</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <property name="shadow_type">in</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> <child> <placeholder/> </child> @@ -404,9 +421,6 @@ Vertical</property> </widget> </child> </widget> - <packing> - <property name="position">0</property> - </packing> </child> <child> <widget class="GtkAlignment" id="alignment2"> @@ -419,28 +433,29 @@ Vertical</property> <widget class="GtkVButtonBox" id="vbuttonbox1"> <property name="visible">True</property> <property name="spacing">5</property> - <property name="layout_style">start</property> + <property name="layout_style">GTK_BUTTONBOX_START</property> <child> <widget class="GtkButton" id="button_engine_add"> - <property name="label" translatable="yes">gtk-add</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-add</property> <property name="use_stock">True</property> + <property name="response_id">0</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> <child> <widget class="GtkButton" id="button_engine_remove"> - <property name="label" translatable="yes">gtk-remove</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-remove</property> <property name="use_stock">True</property> + <property name="response_id">0</property> </widget> <packing> <property name="expand">False</property> @@ -450,11 +465,12 @@ Vertical</property> </child> <child> <widget class="GtkButton" id="button_engine_up"> - <property name="label" translatable="yes">gtk-go-up</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-go-up</property> <property name="use_stock">True</property> + <property name="response_id">0</property> </widget> <packing> <property name="expand">False</property> @@ -464,11 +480,12 @@ Vertical</property> </child> <child> <widget class="GtkButton" id="button_engine_down"> - <property name="label" translatable="yes">gtk-go-down</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-go-down</property> <property name="use_stock">True</property> + <property name="response_id">0</property> </widget> <packing> <property name="expand">False</property> @@ -496,9 +513,9 @@ Vertical</property> <property name="label" translatable="yes">Input Methods</property> </widget> <packing> + <property name="type">tab</property> <property name="position">1</property> <property name="tab_fill">False</property> - <property name="type">tab</property> </packing> </child> <child> @@ -517,7 +534,7 @@ Homepage: http://code.google.com/p/ibus </property> <property name="use_markup">True</property> - <property name="justify">center</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> </widget> <packing> <property name="position">1</property> @@ -537,9 +554,9 @@ Homepage: http://code.google.com/p/ibus <property name="label" translatable="yes">About</property> </widget> <packing> + <property name="type">tab</property> <property name="position">2</property> <property name="tab_fill">False</property> - <property name="type">tab</property> </packing> </child> </widget> @@ -550,26 +567,25 @@ Homepage: http://code.google.com/p/ibus <child internal-child="action_area"> <widget class="GtkHButtonBox" id="dialog-action_area1"> <property name="visible">True</property> - <property name="layout_style">end</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> <child> <widget class="GtkButton" id="button_close"> - <property name="label" translatable="yes">gtk-close</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> + <property name="label" translatable="yes">gtk-close</property> <property name="use_stock">True</property> + <property name="response_id">0</property> </widget> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">0</property> </packing> </child> </widget> <packing> <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="pack_type">GTK_PACK_END</property> </packing> </child> </widget> diff --git a/ui/gtk/languagebar.py b/ui/gtk/languagebar.py index 2a10a43..d2d6a60 100644 --- a/ui/gtk/languagebar.py +++ b/ui/gtk/languagebar.py @@ -50,7 +50,7 @@ class LanguageBar(gtk.Toolbar): def __init__ (self): super(LanguageBar, self).__init__() - self.__auto_hide = False + self.__show = 1 self.__enabled = False self.__has_focus = False self.set_style(gtk.TOOLBAR_ICONS) @@ -137,24 +137,27 @@ class LanguageBar(gtk.Toolbar): if self.__enabled: self.__set_opacity(1.0) if self.__has_focus: - self.show_all() + if self.__show in (1, 2): + self.show_all() else: self.__set_opacity(0.5) - if self.__auto_hide: + if self.__show in (1, 0): self.hide_all() def is_enabled(self): return self.__enabled - def set_auto_hide(self, auto_hide): - self.__auto_hide = auto_hide + def set_show(self, show): + if show not in (0, 1, 2): + show = 1 + self.__show = show if self.__has_focus: self.focus_in() else: self.focus_out() - def get_auto_hide(self): - return self.__auto_hide + def get_show(self): + return self.__show def register_properties(self, props): self.__remove_properties() @@ -206,12 +209,15 @@ class LanguageBar(gtk.Toolbar): self.__has_focus = True self.__im_menu.set_sensitive(True) if self.__enabled: - self.show_all() + if self.__show in (1, 2): + self.show_all() + else: + self.hide_all() def focus_out(self): self.__has_focus = False self.__im_menu.set_sensitive(False) - if self.__auto_hide: + if self.__show in (0, 1): self.hide_all() else: self.show_all() diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py index f046d23..2640c65 100644 --- a/ui/gtk/panel.py +++ b/ui/gtk/panel.py @@ -98,7 +98,7 @@ class Panel(ibus.PanelBase): self.__status_icon.set_visible(True) self.__config_load_lookup_table_orientation() - self.__config_load_auto_hide() + self.__config_load_show() self.__config_load_custom_font() # self.__bus.request_name(ibus.panel.IBUS_SERVICE_PANEL, 0) @@ -234,9 +234,9 @@ class Panel(ibus.PanelBase): else: self.__candidate_panel.set_orientation(gtk.ORIENTATION_VERTICAL) - def __config_load_auto_hide(self): - auto_hide = self.__config.get_value("panel", "auto_hide", True) - self.__language_bar.set_auto_hide(auto_hide) + def __config_load_show(self): + show = self.__config.get_value("panel", "show", 1) + self.__language_bar.set_show(show) def __config_load_custom_font(self): use_custom_font = self.__config.get_value("panel", "use_custom_font", False) @@ -260,8 +260,8 @@ class Panel(ibus.PanelBase): return if name == "lookup_table_orientation": self.__config_load_lookup_table_orientation() - elif name == "auto_hide": - self.__config_load_auto_hide() + elif name == "show": + self.__config_load_show() elif name == "use_custom_font" or name == "custom_font": self.__config_load_custom_font() |