summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-07-31 19:47:43 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-07-31 19:47:43 +0800
commit50a7676aa97b84719ffb16369052a9557c961dbf (patch)
tree26868dc7bd6d820cfae74fd967318377dbf9c31a /setup
parent4b70c60463cf791ebc820ba3740ed375bf348737 (diff)
downloadibus-libpinyin-50a7676aa97b84719ffb16369052a9557c961dbf.tar.gz
ibus-libpinyin-50a7676aa97b84719ffb16369052a9557c961dbf.tar.xz
ibus-libpinyin-50a7676aa97b84719ffb16369052a9557c961dbf.zip
WIP.
Diffstat (limited to 'setup')
-rw-r--r--setup/main.py230
-rw-r--r--setup/setup.glade441
2 files changed, 336 insertions, 335 deletions
diff --git a/setup/main.py b/setup/main.py
index c3337c8..367e5a0 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -27,173 +27,175 @@ import ibus
from pydict import SHUANGPIN_SCHEMAS
from gettext import dgettext
-_ = lambda a : dgettext ("ibus-pinyin", a)
+_ = lambda a : dgettext("ibus-pinyin", a)
RGB_COLOR = lambda c : ((c.red & 0xff00) << 8) + (c.green & 0xff00) + ((c.blue & 0xff00) >> 8)
-GDK_COLOR = lambda c : gdk.Color (((c >> 16) & 0xff) * 256, ((c >> 8) & 0xff) * 256, (c & 0xff) * 256)
+GDK_COLOR = lambda c : gdk.Color(((c >> 16) & 0xff) * 256, ((c >> 8) & 0xff) * 256, (c & 0xff) * 256)
RGB = lambda r, g, b : ((r & 0xff) << 16) + ((g & 0xff) << 8) + (b & 0xff)
class SetupUI ():
def __init__ (self):
- self._need_reload_config = False
-
- self._options = {
- "SupportGBK" : [True, self._checkbutton_op],
- "ShuangPin" : [False, self._checkbutton_op],
- "AutoCorrect" : [True, self._checkbutton_op],
- #FuzzyPinYin Hacking by YW
- "FuzzyPinYin" : [False, self._checkbutton_op],#0
- "FuzzyS_Sh" : [False, self._checkbutton_op],#1
- "FuzzyC_Ch" : [False, self._checkbutton_op],#2
- "FuzzyZ_Zh" : [False, self._checkbutton_op],#3
- "FuzzyL_N" : [False, self._checkbutton_op],#4
- "FuzzyIn_Ing" : [False, self._checkbutton_op],#5
- "FuzzyEn_Eng" : [False, self._checkbutton_op],#6
- "FuzzyAn_Ang" : [False, self._checkbutton_op],#7
-
- "SpellCheck" : [True, self._checkbutton_op],
- "UVToTemp" : [True, self._checkbutton_op],
+ self.__need_reload_config = False
+ self.__bus = ibus.Bus()
+
+ self.__options = {
+ "SupportGBK" : [True, self.__checkbutton_op],
+ "ShuangPin" : [False, self.__checkbutton_op],
+ "AutoCorrect" : [True, self.__checkbutton_op],
+
+ "FuzzyPinYin" : [False, self.__checkbutton_op],
+ "FuzzyS_Sh" : [False, self.__checkbutton_op],
+ "FuzzyC_Ch" : [False, self.__checkbutton_op],
+ "FuzzyZ_Zh" : [False, self.__checkbutton_op],
+ "FuzzyL_N" : [False, self.__checkbutton_op],
+ "FuzzyIn_Ing" : [False, self.__checkbutton_op],
+ "FuzzyEn_Eng" : [False, self.__checkbutton_op],
+ "FuzzyAn_Ang" : [False, self.__checkbutton_op],
+
+ "SpellCheck" : [True, self.__checkbutton_op],
+ "UVToTemp" : [True, self.__checkbutton_op],
"ShiftSelectCandidates" :
- [True, self._checkbutton_op],
+ [True, self.__checkbutton_op],
- "CommaPageDownUp" : [True, self._checkbutton_op],
- "EqualPageDownUp" : [True, self._checkbutton_op],
- "AutoCommit" : [False, self._checkbutton_op],
+ "CommaPageDownUp" : [True, self.__checkbutton_op],
+ "EqualPageDownUp" : [True, self.__checkbutton_op],
+ "AutoCommit" : [False, self.__checkbutton_op],
- "PhraseColor" : [RGB (0, 0, 0), self._colorbutton_op],
- "NewPhraseColor" : [RGB (0xef, 0, 0), self._colorbutton_op],
- "UserPhraseColor" : [RGB (0, 0, 0xbf), self._colorbutton_op],
+ "PhraseColor" : [RGB (0, 0, 0), self.__colorbutton_op],
+ "NewPhraseColor" : [RGB (0xef, 0, 0), self.__colorbutton_op],
+ "UserPhraseColor" : [RGB (0, 0, 0xbf), self.__colorbutton_op],
"SpecialPhraseColor" :
- [RGB (0, 0xbf, 0), self._colorbutton_op],
- "EnglishPhraseColor" : [RGB (0, 0xbf, 0), self._colorbutton_op],
+ [RGB (0, 0xbf, 0), self.__colorbutton_op],
+ "EnglishPhraseColor" :
+ [RGB (0, 0xbf, 0), self.__colorbutton_op],
"ErrorEnglishPhraseColor" :
- [RGB (0xef, 0, 0), self._colorbutton_op],
- "PageSize" : [5, self._combobox_op, range (1, 10)],
- "ShuangPinSchema" : ["MSPY", self._combobox_op, SHUANGPIN_SCHEMAS.keys ()],
+ [RGB (0xef, 0, 0), self.__colorbutton_op],
+ "PageSize" : [5, self.__combobox_op, range(1, 10)],
+ "ShuangPinSchema" : ["MSPY", self.__combobox_op, SHUANGPIN_SCHEMAS.keys()],
}
- def run (self):
+ def run(self):
- self._init_ui ()
- self._load_config ()
- gtk.main ()
+ self.__init_ui()
+ self.__load_config()
+ gtk.main()
- def _combobox_op (self, name, opt, info):
- widget = self._xml.get_widget (name)
+ def _combobox_op(self, name, opt, info):
+ widget = self.__xml.get_widget(name)
if widget == None:
print >> sys.stderr, "Can not find widget %s" % name
return False
if opt == "read":
- info[0] = self._read (name, info[0])
- widget.set_active (info[2].index (info[0]))
+ info[0] = self.__read(name, info[0])
+ widget.set_active(info[2].index(info[0]))
return True
if opt == "write":
- info[0] = info[2][widget.get_active ()]
- self._write (name, info[0])
+ info[0] = info[2][widget.get_active()]
+ self.__write(name, info[0])
return True
if opt == "check":
- return info[0] != info[2][widget.get_active ()]
+ return info[0] != info[2][widget.get_active()]
if opt == "init":
- model = gtk.ListStore (str)
+ model = gtk.ListStore(str)
for v in info[2]:
- model.append ([_(str (v))])
- widget.set_model (model)
+ model.append([_(str(v))])
+ widget.set_model(model)
return False
- def _colorbutton_op (self, name, opt, info):
- widget = self._xml.get_widget (name)
+ def _colorbutton_op(self, name, opt, info):
+ widget = self.__xml.get_widget(name)
if widget == None:
print >> sys.stderr, "Can not find widget %s" % name
return False
if opt == "read":
- info[0] = self._read (name, info[0])
- widget.set_color (GDK_COLOR (info[0]))
+ info[0] = self.__read(name, info[0])
+ widget.set_color(GDK_COLOR (info[0]))
return True
if opt == "write":
- info[0] = RGB_COLOR (widget.get_color ())
- self._write (name, info[0])
+ info[0] = RGB_COLOR (widget.get_color())
+ self.__write(name, info[0])
return True
if opt == "check":
- return info[0] != RGB_COLOR (widget.get_color ())
+ return info[0] != RGB_COLOR (widget.get_color())
return False
- def _checkbutton_op (self, name, opt, info):
- widget = self._xml.get_widget (name)
+ def _checkbutton_op(self, name, opt, info):
+ widget = self.__xml.get_widget(name)
if widget == None:
print >> sys.stderr, "Can not find widget %s" % name
return False
if opt == "read":
- info[0] = self._read (name, info[0])
- widget.set_active (info[0])
+ info[0] = self.__read(name, info[0])
+ widget.set_active(info[0])
return True
if opt == "write":
- info[0] = widget.get_active ()
- self._write (name, info[0])
+ info[0] = widget.get_active()
+ self.__write(name, info[0])
return True
if opt == "check":
- return info[0] != widget.get_active ()
+ return info[0] != widget.get_active()
return False
- def _read (self, name, v):
- # return self._config.read ("/engine/PinYin/" + name, v)
+ def _read(self, name, v):
+ # return self.__config.read("/engine/PinYin/" + name, v)
return v
- def _write (self, name, v):
- #return self._config.write ("/engine/PinYin/" + name, v)
+ def _write(self, name, v):
+ #return self.__config.write("/engine/PinYin/" + name, v)
pass
- def _init_ui (self):
+ def _init_ui(self):
glade.textdomain("ibus-pinyin")
- glade_file = path.join (path.dirname (__file__), "setup.glade")
- self._xml = glade.XML (glade_file)
- self._window = self._xml.get_widget ("window_main")
- for name, info in self._options.items ():
+ glade_file = path.join(path.dirname(__file__), "setup.glade")
+ self.__xml = glade.XML (glade_file)
+ self.__window = self.__xml.get_widget("window_main")
+ for name, info in self.__options.items():
info[1] (name, "init", info)
info[1] (name, "read", info)
- self._xml.signal_autoconnect (self)
- self._window.show_all ()
+ self.__xml.signal_autoconnect(self)
+ self.__window.show_all()
- def _load_config (self):
- for name, info in self._options.items ():
+ def _load_config(self):
+ for name, info in self.__options.items():
info[1] (name, "read", info)
- def _save_config (self):
- self._need_reload_config = True
- for name, info in self._options.items ():
+ def _save_config(self):
+ self.__need_reload_config = True
+ for name, info in self.__options.items():
info[1] (name, "write", info)
- def _query_changed (self):
- for name, info in self._options.items ():
+ def _query_changed(self):
+ for name, info in self.__options.items():
if info[1] (name, "check", info):
return True
return False
- def _quit (self, need_confirm ):
+ def _quit(self, need_confirm ):
if need_confirm == False:
- gtk.main_quit ()
+ gtk.main_quit()
return True
else:
- dlg = gtk.MessageDialog (self._window, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION,
+ dlg = gtk.MessageDialog(self.__window, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION,
gtk.BUTTONS_YES_NO, _("Are you sure to close Python PinYin Setup without save configure?"))
- id = dlg.run ()
- dlg.destroy ()
+ id = dlg.run()
+ dlg.destroy()
if id == gtk.RESPONSE_YES:
- gtk.main_quit ()
+ gtk.main_quit()
return True
return False
- def _optimize_user_db (self):
+ def _optimize_user_db(self):
import sqlite3
- dlg = gtk.MessageDialog (self._window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO,
+ dlg = gtk.MessageDialog(self.__window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO,
gtk.BUTTONS_OK, _("The user phrases database will be reorganized! Please don't use python PinYin now."))
- dlg.run ()
- dlg.destroy ()
+ dlg.run()
+ dlg.destroy()
try:
- db = sqlite3.connect (path.expanduser ("~/.scim/scim-python/pinyin/user.db"))
+ db = sqlite3.connect(path.expanduser("~/.scim/scim-python/pinyin/user.db"))
sqlstring = """
BEGIN TRANSACTION;
CREATE TABLE tmp AS SELECT * FROM py_phrase;
@@ -202,46 +204,46 @@ class SetupUI ():
DROP TABLE tmp;
COMMIT;
"""
- db.executescript (sqlstring)
- db.executescript ("VACUUM;")
+ db.executescript(sqlstring)
+ db.executescript("VACUUM;")
except:
import traceback
- traceback.print_exc ()
+ traceback.print_exc()
- dlg.destroy ()
- dlg = gtk.MessageDialog (self._window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO,
+ dlg.destroy()
+ dlg = gtk.MessageDialog(self.__window, gtk.DIALOG_MODAL, gtk.MESSAGE_INFO,
gtk.BUTTONS_OK, _("Reorganizing is over!"))
- dlg.run ()
- dlg.destroy ()
+ dlg.run()
+ dlg.destroy()
# events handlers
- def on_window_main_delete_event (self, widget, event):
- result = self._quit (True)
+ def on_window_main_delete_event(self, widget, event):
+ result = self.__quit(True)
return True
- def on_button_ok_clicked (self, button):
- changed = self._query_changed ()
+ def on_button_ok_clicked(self, button):
+ changed = self.__query_changed()
if changed:
- self._save_config ()
- self._quit (False)
+ self.__save_config()
+ self.__quit(False)
- def on_button_apply_clicked (self, button):
- self._save_config ()
+ def on_button_apply_clicked(self, button):
+ self.__save_config()
- def on_button_cancel_clicked (self, button):
- changed = self._query_changed ()
- self._quit (changed)
+ def on_button_cancel_clicked(self, button):
+ changed = self.__query_changed()
+ self.__quit(changed)
- def on_button_optimize_db_clicked (self, button):
- self._optimize_user_db ()
+ def on_button_optimize_db_clicked(self, button):
+ self.__optimize_user_db()
- def on_value_changed (self, widget, data = None):
- if self._query_changed ():
- self._xml.get_widget ("button_apply").set_sensitive (True)
+ def on_value_changed(self, widget, data = None):
+ if self.__query_changed():
+ self.__xml.get_widget("button_apply").set_sensitive(True)
else:
- self._xml.get_widget ("button_apply").set_sensitive (False)
+ self.__xml.get_widget("button_apply").set_sensitive(False)
if __name__ == "__main__":
- SetupUI (). run ()
+ SetupUI(). run()
diff --git a/setup/setup.glade b/setup/setup.glade
index ac36667..5e5d7da 100644
--- a/setup/setup.glade
+++ b/setup/setup.glade
@@ -24,23 +24,33 @@
<property name="row_spacing">2</property>
<property name="homogeneous">True</property>
<child>
- <widget class="GtkLabel" id="label21">
+ <widget class="GtkLabel" id="label24">
<property name="visible">True</property>
<property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Press [u] or [v] to temporary English mode</property>
+ <property name="label" translatable="yes">Press [,] [.] to page down up.</property>
</widget>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="UVToTemp">
+ <widget class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Auto commit</property>
+ </widget>
+ <packing>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="AutoCommit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_value_changed"/>
<child>
<placeholder/>
</child>
@@ -48,17 +58,16 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="SpellCheck">
+ <widget class="GtkCheckButton" id="CommaPageDownUp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_value_changed"/>
<child>
<placeholder/>
</child>
@@ -66,17 +75,16 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="AutoCorrect">
+ <widget class="GtkCheckButton" id="EqualPageDownUp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_value_changed"/>
<child>
<placeholder/>
</child>
@@ -84,81 +92,89 @@
<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">8</property>
+ <property name="bottom_attach">9</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="PageSize">
+ <widget class="GtkLabel" id="label22">
<property name="visible">True</property>
- <property name="items" translatable="yes">1
-</property>
- <signal name="changed" handler="on_value_changed"/>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Press [-] [=] to page down up.</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="ShuangPinSchema">
+ <widget class="GtkCheckButton" id="ShiftSelectCandidates">
<property name="visible">True</property>
- <property name="items" translatable="yes">1
-</property>
- <signal name="changed" handler="on_value_changed"/>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<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="top_attach">7</property>
+ <property name="bottom_attach">8</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label14">
+ <widget class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">English spelling check</property>
+ <property name="label" translatable="yes">Press [shift] to select candidates</property>
</widget>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label13">
+ <widget class="GtkCheckButton" id="SupportGBK">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Wrong PinYin auto correct</property>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_value_changed"/>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label11">
+ <widget class="GtkCheckButton" id="ShuangPin">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Lookup table page size</property>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_value_changed"/>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label10">
+ <widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">ShuangPin Schema</property>
+ <property name="label" translatable="yes">Support GBK</property>
</widget>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
</child>
<child>
<widget class="GtkLabel" id="label16">
@@ -172,91 +188,84 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label17">
+ <widget class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Support GBK</property>
+ <property name="label" translatable="yes">ShuangPin Schema</property>
</widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
</child>
<child>
- <widget class="GtkCheckButton" id="ShuangPin">
+ <widget class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_value_changed"/>
- <child>
- <placeholder/>
- </child>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Lookup table page size</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="SupportGBK">
+ <widget class="GtkLabel" id="label13">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_value_changed"/>
- <child>
- <placeholder/>
- </child>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Wrong PinYin auto correct</property>
</widget>
<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>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label20">
+ <widget class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Press [shift] to select candidates</property>
+ <property name="label" translatable="yes">English spelling check</property>
</widget>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="ShiftSelectCandidates">
+ <widget class="GtkComboBox" id="ShuangPinSchema">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <child>
- <placeholder/>
- </child>
+ <property name="items" translatable="yes">1
+</property>
+ <signal name="changed" handler="on_value_changed"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label22">
+ <widget class="GtkComboBox" id="PageSize">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Press [-] [=] to page down up.</property>
+ <property name="items" translatable="yes">1
+</property>
+ <signal name="changed" handler="on_value_changed"/>
</widget>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="EqualPageDownUp">
+ <widget class="GtkCheckButton" id="AutoCorrect">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_value_changed"/>
<child>
<placeholder/>
</child>
@@ -264,16 +273,17 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="CommaPageDownUp">
+ <widget class="GtkCheckButton" id="SpellCheck">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_value_changed"/>
<child>
<placeholder/>
</child>
@@ -281,16 +291,17 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="AutoCommit">
+ <widget class="GtkCheckButton" id="UVToTemp">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_value_changed"/>
<child>
<placeholder/>
</child>
@@ -298,30 +309,19 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Auto commit</property>
- </widget>
- <packing>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label24">
+ <widget class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Press [,] [.] to page down up.</property>
+ <property name="label" translatable="yes">Press [u] or [v] to temporary English mode</property>
</widget>
<packing>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
</widget>
@@ -393,41 +393,35 @@
<placeholder/>
</child>
<child>
- <widget class="GtkCheckButton" id="FuzzyPinYin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Enable Fuzzy PinYin</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkCheckButton" id="FuzzyS_Sh">
+ <widget class="GtkCheckButton" id="FuzzyAn_Ang">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">s &lt;=&gt; sh</property>
+ <property name="label" translatable="yes">an &lt;=&gt; ang</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="FuzzyC_Ch">
+ <widget class="GtkCheckButton" id="FuzzyEn_Eng">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">c &lt;=&gt; ch</property>
+ <property name="label" translatable="yes">en &lt;=&gt; eng</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<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="x_options">GTK_FILL</property>
@@ -435,17 +429,19 @@
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="FuzzyZ_Zh">
+ <widget class="GtkCheckButton" id="FuzzyIn_Ing">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">z &lt;=&gt; zh</property>
+ <property name="label" translatable="yes">in &lt;=&gt; ing</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -467,35 +463,31 @@
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="FuzzyIn_Ing">
+ <widget class="GtkCheckButton" id="FuzzyZ_Zh">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">in &lt;=&gt; ing</property>
+ <property name="label" translatable="yes">z &lt;=&gt; zh</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="FuzzyEn_Eng">
+ <widget class="GtkCheckButton" id="FuzzyC_Ch">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">en &lt;=&gt; eng</property>
+ <property name="label" translatable="yes">c &lt;=&gt; ch</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<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="x_options">GTK_FILL</property>
@@ -503,23 +495,31 @@
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="FuzzyAn_Ang">
+ <widget class="GtkCheckButton" id="FuzzyS_Sh">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">an &lt;=&gt; ang</property>
+ <property name="label" translatable="yes">s &lt;=&gt; sh</property>
<property name="use_underline">True</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="FuzzyPinYin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable Fuzzy PinYin</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="position">1</property>
@@ -575,69 +575,47 @@
<placeholder/>
</child>
<child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Color of Spelling Error</property>
- </widget>
- <packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label8">
+ <widget class="GtkColorButton" id="PhraseColor">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Color of English Candidates</property>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <signal name="color_set" handler="on_value_changed"/>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label7">
+ <widget class="GtkColorButton" id="NewPhraseColor">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Color of Special Phrases</property>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <signal name="color_set" handler="on_value_changed"/>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label6">
+ <widget class="GtkColorButton" id="UserPhraseColor">
<property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Color of User Phrases</property>
+ <property name="can_focus">True</property>
+ <property name="response_id">0</property>
+ <signal name="color_set" handler="on_value_changed"/>
</widget>
<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>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Color of New Phrases</property>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="xalign">0.89999997615814209</property>
- <property name="label" translatable="yes">Color of Normal Phrases</property>
- </widget>
- </child>
- <child>
- <widget class="GtkColorButton" id="ErrorEnglishPhraseColor">
+ <widget class="GtkColorButton" id="SpecialPhraseColor">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
@@ -646,8 +624,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
@@ -665,7 +643,7 @@
</packing>
</child>
<child>
- <widget class="GtkColorButton" id="SpecialPhraseColor">
+ <widget class="GtkColorButton" id="ErrorEnglishPhraseColor">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="response_id">0</property>
@@ -674,48 +652,70 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <widget class="GtkColorButton" id="UserPhraseColor">
+ <widget class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <signal name="color_set" handler="on_value_changed"/>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Color of Normal Phrases</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Color of New Phrases</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Color of User Phrases</property>
</widget>
<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>
</packing>
</child>
<child>
- <widget class="GtkColorButton" id="NewPhraseColor">
+ <widget class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <signal name="color_set" handler="on_value_changed"/>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Color of Special Phrases</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkColorButton" id="PhraseColor">
+ <widget class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="response_id">0</property>
- <signal name="color_set" handler="on_value_changed"/>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Color of English Candidates</property>
</widget>
<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>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="xalign">0.89999997615814209</property>
+ <property name="label" translatable="yes">Color of Spelling Error</property>
+ </widget>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
</widget>
@@ -852,7 +852,6 @@ provided by
Huang Peng &lt;shawn.p.huang@gmail.com&gt;
</property>
- <property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
</widget>
<packing>