summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorPeng Huang <shawn.p.huang@gmail.com>2010-03-25 19:35:30 +0800
committerPeng Huang <shawn.p.huang@gmail.com>2010-03-25 19:35:30 +0800
commit090dd34a67d4dfa5d0546c5bd05bc1cf27d9cc5b (patch)
treeb25fd22f510a151f1d6f10cccbd43968f134f358 /setup
parent1b3ffa8d9368078b9cc4a2c4515f3330f554f906 (diff)
Add option - Show raw input of Double Pinyin
Diffstat (limited to 'setup')
-rw-r--r--setup/ibus-pinyin-preferences.ui19
-rw-r--r--setup/main.py6
2 files changed, 23 insertions, 2 deletions
diff --git a/setup/ibus-pinyin-preferences.ui b/setup/ibus-pinyin-preferences.ui
index 425ae9e..1613473 100644
--- a/setup/ibus-pinyin-preferences.ui
+++ b/setup/ibus-pinyin-preferences.ui
@@ -97,7 +97,6 @@
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="tooltip_text" translatable="yes">Select double pinyin schema.</property>
<property name="spacing">6</property>
<property name="homogeneous">True</property>
<child>
@@ -115,6 +114,7 @@
<object class="GtkComboBox" id="DoublePinyinSchema">
<property name="visible">True</property>
<property name="sensitive">False</property>
+ <property name="tooltip_text" translatable="yes">Select double pinyin schema.</property>
<property name="model">liststoreDoublePinyin</property>
<property name="button_sensitivity">on</property>
</object>
@@ -360,7 +360,7 @@
<child>
<object class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="n_rows">5</property>
+ <property name="n_rows">6</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -490,6 +490,21 @@
<property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="DoublePinyinShowRaw">
+ <property name="label" translatable="yes">Show raw input of Double Pinyin</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="tooltip_text" translatable="yes">Show raw input of Double Pinyin</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/setup/main.py b/setup/main.py
index 6ded867..ac18d66 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -34,6 +34,7 @@ class PreferencesDialog:
self.__double_pinyin = self.__builder.get_object("DoublePinyin")
self.__double_pinyin_schema = self.__builder.get_object("DoublePinyinSchema")
self.__double_pinyin_schema_label = self.__builder.get_object("labelDoublePinyinSchema")
+ self.__double_pinyin_show_raw = self.__builder.get_object("DoublePinyinShowRaw")
self.__name_version = self.__builder.get_object("NameVersion")
self.__name_version.set_markup(_("<big><b>IBus Pinyin %s</b></big>") % version.get_version())
@@ -45,14 +46,17 @@ class PreferencesDialog:
self.__incomplete_pinyin.set_active(self.__get_value("IncompletePinyin", True))
self.__full_pinyin.set_active(not self.__get_value("DoublePinyin", False))
self.__double_pinyin_schema.set_active(self.__get_value("DoublePinyinSchema", 0))
+ self.__double_pinyin_show_raw.set_active(self.__get_value("DoublePinyinShowRaw", False))
if self.__full_pinyin.get_active():
# self.__incomplete_pinyin.set_sensitive(True)
self.__double_pinyin_schema.set_sensitive(False)
self.__double_pinyin_schema_label.set_sensitive(False)
+ self.__double_pinyin_show_raw.set_sensitive(False)
else:
# self.__incomplete_pinyin.set_sensitive(False)
self.__double_pinyin_schema.set_sensitive(True)
self.__double_pinyin_schema_label.set_sensitive(True)
+ self.__double_pinyin_show_raw.set_sensitive(True)
def __full_pinyin_toggled_cb(widget):
val = widget.get_active()
@@ -64,6 +68,7 @@ class PreferencesDialog:
self.__set_value("DoublePinyin", val)
self.__double_pinyin_schema.set_sensitive(val)
self.__double_pinyin_schema_label.set_sensitive(val)
+ self.__double_pinyin_show_raw.set_sensitive(val)
def __double_pinyin_schema_changed_cb(widget):
self.__set_value("DoublePinyinSchema", widget.get_active())
@@ -73,6 +78,7 @@ class PreferencesDialog:
self.__double_pinyin.connect("toggled", __double_pinyin_toggled_cb)
self.__incomplete_pinyin.connect("toggled", self.__toggled_cb, "IncompletePinyin")
self.__double_pinyin_schema.connect("changed", __double_pinyin_schema_changed_cb)
+ self.__double_pinyin_show_raw.connect("toggled", self.__toggled_cb, "DoublePinyinShowRaw")
def __init_init_state(self):
# init state