summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2010-03-11 19:35:03 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2010-03-11 22:31:48 +0900
commit0b8a908719588d202bd83c85dc2052f5144bb691 (patch)
treedfc3b0145062b2d75363b227f2d67290711a1dcd /setup
parentf8c60a9844df6da08cc0327b62dec6917961dfc4 (diff)
downloadibus-anthy-0b8a908719588d202bd83c85dc2052f5144bb691.tar.gz
Fix Segment convertion mode. #147
Diffstat (limited to 'setup')
-rw-r--r--setup/anthyprefs.py1
-rw-r--r--setup/main.py16
-rw-r--r--setup/setup.glade60
3 files changed, 57 insertions, 20 deletions
diff --git a/setup/anthyprefs.py b/setup/anthyprefs.py
index 2f66a3d..d46fcb8 100644
--- a/setup/anthyprefs.py
+++ b/setup/anthyprefs.py
@@ -156,6 +156,7 @@ _config = {
'common': {
'input_mode': 0,
'typing_method': 0,
+ 'conversion_segment_mode': 0,
'period_style': 0,
'symbol_style': 1,
diff --git a/setup/main.py b/setup/main.py
index a05d421..78a7755 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -64,7 +64,7 @@ class AnthySetup(object):
if path.exists(icon_path):
xml.get_widget('main').set_icon_from_file(icon_path)
- for name in ['input_mode', 'typing_method',
+ for name in ['input_mode', 'typing_method', 'conversion_segment_mode',
'period_style', 'symbol_style', 'ten_key_mode',
'behavior_on_focus_out', 'behavior_on_period',
'half_width_symbol', 'half_width_number', 'half_width_space',
@@ -298,19 +298,19 @@ class AnthySetup(object):
if new:
if file in files:
- self.__run_message_dialog(_("Your choosed file has already been added."),
+ self.__run_message_dialog(_("Your choosed file has already been added: ") + file,
gtk.MESSAGE_ERROR)
return
if not path.exists(file):
- self.__run_message_dialog(_("Your choosed file does not exist."),
+ self.__run_message_dialog(_("Your choosed file does not exist: ") + file,
gtk.MESSAGE_ERROR)
return
if path.isdir(file):
- self.__run_message_dialog(_("Your choosed file is a directory."),
+ self.__run_message_dialog(_("Your choosed file is a directory: " + file),
gtk.MESSAGE_ERROR)
return
if file.startswith(self.__get_userhome() + "/.anthy"):
- self.__run_message_dialog(_("You cannot add dictionaries in the anthy private directory."),
+ self.__run_message_dialog(_("You cannot add dictionaries in the anthy private directory: " + file),
gtk.MESSAGE_ERROR)
return
@@ -593,6 +593,10 @@ class AnthySetup(object):
else:
return
command = self.prefs.get_value('common', key)
+ if not path.exists(command[0]):
+ self.__run_message_dialog(_("Your file does not exist: ") + command[0],
+ gtk.MESSAGE_ERROR)
+ return
os.spawnl(os.P_NOWAIT, *command)
def on_btn_dict_add_clicked(self, widget):
@@ -676,7 +680,7 @@ class AnthySetup(object):
gtk.MESSAGE_ERROR)
return
if not path.exists(dict_file):
- self.__run_message_dialog(_("Your file does not exist."),
+ self.__run_message_dialog(_("Your file does not exist: ") + dict_file,
gtk.MESSAGE_ERROR)
return
diff --git a/setup/setup.glade b/setup/setup.glade
index d44d7fb..7130411 100644
--- a/setup/setup.glade
+++ b/setup/setup.glade
@@ -33,7 +33,7 @@
<child>
<widget class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="n_rows">2</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
@@ -51,6 +51,22 @@
</packing>
</child>
<child>
+ <widget class="GtkComboBox" id="input_mode">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">Hiragana
+Katakana
+Half Width Katakana
+Latin
+Wide Latin</property>
+ <signal name="changed" handler="on_cb_changed"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="xalign">0</property>
@@ -66,34 +82,50 @@
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="input_mode">
+ <widget class="GtkComboBox" id="typing_method">
<property name="visible">True</property>
- <property name="items" translatable="yes">Hiragana
-Katakana
-Half Width Katakana
-Latin
-Wide Latin</property>
+ <property name="items" translatable="yes">Romaji
+Kana
+Thumb shift</property>
<signal name="changed" handler="on_cb_changed"/>
</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="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="typing_method">
+ <widget class="GtkLabel" id="label10">
<property name="visible">True</property>
- <property name="items" translatable="yes">Romaji
-Kana
-Thumb shift</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Conversion _Mode:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">conversion_segment_mode</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="conversion_segment_mode">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">Multiple segment
+Single segment
+Immediate conversion (Multiple segment)
+Immediate conversion (Single segment)</property>
<signal name="changed" handler="on_cb_changed"/>
</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">2</property>
+ <property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
@@ -153,7 +185,7 @@ Thumb shift</property>
<widget class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Sy_mbol Style:</property>
+ <property name="label" translatable="yes">Symbo_l Style:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">symbol_style</property>
</widget>