summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
Diffstat (limited to 'setup')
-rw-r--r--setup/main.py10
-rw-r--r--setup/setup.ui58
2 files changed, 65 insertions, 3 deletions
diff --git a/setup/main.py b/setup/main.py
index f0eee996..f6adb098 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -4,7 +4,7 @@
# ibus - The Input Bus
#
# Copyright (c) 2007-2016 Peng Huang <shawn.p.huang@gmail.com>
-# Copyright (c) 2010-2017 Takao Fujiwara <takao.fujiwara1@gmail.com>
+# Copyright (c) 2010-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2007-2016 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
@@ -123,10 +123,15 @@ class Setup(object):
name = 'emoji'
label = 'emoji_dialog'
self.__init_hotkey(name, label)
+ name = 'unicode'
+ label = 'unicode_dialog'
+ self.__init_hotkey(name, label)
def __init_hotkey(self, name, label, comment=None):
if name == 'emoji':
shortcuts = self.__settings_emoji.get_strv('hotkey')
+ elif name == 'unicode':
+ shortcuts = self.__settings_emoji.get_strv('unicode-hotkey')
else:
shortcuts = self.__settings_hotkey.get_strv(name)
button = self.__builder.get_object("button_%s" % label)
@@ -139,6 +144,9 @@ class Setup(object):
if name == 'emoji':
button.connect("clicked", self.__shortcut_button_clicked_cb,
'hotkey', 'panel/' + name, label, entry)
+ elif name == 'unicode':
+ button.connect("clicked", self.__shortcut_button_clicked_cb,
+ 'unicode-hotkey', 'panel/emoji', label, entry)
else:
button.connect("clicked", self.__shortcut_button_clicked_cb,
name, "general/hotkey", label, entry)
diff --git a/setup/setup.ui b/setup/setup.ui
index e64b1046..f1beb1de 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
@@ -870,9 +870,9 @@
<object class="GtkLabel" id="label_emoji1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">The shortcut keys for showing emoji dialog</property>
+ <property name="tooltip_text" translatable="yes">The shortcut keys to enable conversions of emoji annotations or Unicode names</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">Emoji choice:</property>
+ <property name="label" translatable="yes">Emoji annotation:</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -920,6 +920,60 @@
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label_unicode1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">The shortcut keys to enable Unicode code point conversions</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Unicode code point:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="hbox_unicode1">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <property name="hexpand">true</property>
+ <child>
+ <object class="GtkEntry" id="entry_unicode_dialog">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button_unicode_dialog">
+ <property name="label" translatable="yes">...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
</object>
</child>
<child type="label">