Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/xkbutil.c

Issue 2810050: Use Muhenkan as a hot-key. See crosbug.com/2543 (comment #25) for details. (Closed) Base URL: ssh://git@gitrw.chromium.org//ibus-xkb-layouts.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <string.h> 1 #include <string.h>
2 #include <glib.h> 2 #include <glib.h>
3 #include "xkbutil.h" 3 #include "xkbutil.h"
4 4
5 #ifndef XKB_RULES_XML_FILE 5 #ifndef XKB_RULES_XML_FILE
6 #define XKB_RULES_XML_FILE "/usr/share/X11/xkb/rules/evdev.xml" 6 #define XKB_RULES_XML_FILE "/usr/share/X11/xkb/rules/evdev.xml"
7 #endif 7 #endif
8 8
9 static IBusEngineDesc * 9 static IBusEngineDesc *
10 ibus_xkb_engine_new (gchar *layout, 10 ibus_xkb_engine_new (gchar *layout,
(...skipping 10 matching lines...) Expand all
21 21
22 engine_name = g_strdup_printf ("xkb:%s:%s:%s", layout, variant, language); 22 engine_name = g_strdup_printf ("xkb:%s:%s:%s", layout, variant, language);
23 if (variant_desc && *variant_desc) { 23 if (variant_desc && *variant_desc) {
24 engine_longname = g_strdup_printf ("%s - %s", layout_desc, variant_desc) ; 24 engine_longname = g_strdup_printf ("%s - %s", layout_desc, variant_desc) ;
25 } 25 }
26 26
27 if (variant && *variant) { 27 if (variant && *variant) {
28 engine_layout = g_strdup_printf ("%s(%s)", layout, variant); 28 engine_layout = g_strdup_printf ("%s(%s)", layout, variant);
29 } 29 }
30 30
31 /* Adds special hotkey on Japanese keyboard to activate English input 31 /* Adds special hotkey on Japanese keyboard to activate English input. */
32 * TODO(suzhe): make sure the corresponding key on ChromeOS device generates
33 * the same key symbol.*/
34 if (g_strcmp0(language, "jpn") == 0) { 32 if (g_strcmp0(language, "jpn") == 0) {
35 engine_hotkeys = "Eisu_toggle"; 33 engine_hotkeys = "Muhenkan";
36 } 34 }
37 35
38 engine = ibus_engine_desc_new2(engine_name, 36 engine = ibus_engine_desc_new2(engine_name,
39 engine_longname ? engine_longname : layout_de sc, 37 engine_longname ? engine_longname : layout_de sc,
40 "", 38 "",
41 language, 39 language,
42 "", 40 "",
43 "", 41 "",
44 "", 42 "",
45 engine_layout ? engine_layout : layout, 43 engine_layout ? engine_layout : layout,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 225
228 engines = ibus_xkb_list_engines (); 226 engines = ibus_xkb_list_engines ();
229 227
230 for (p = engines; p != NULL; p = p->next) { 228 for (p = engines; p != NULL; p = p->next) {
231 ibus_component_add_engine (component, (IBusEngineDesc *) p->data); 229 ibus_component_add_engine (component, (IBusEngineDesc *) p->data);
232 } 230 }
233 231
234 g_list_free (engines); 232 g_list_free (engines);
235 return component; 233 return component;
236 } 234 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698