diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-23 21:45:51 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-23 21:45:51 -0400 |
commit | 00fd7b82f09bcced5fa13e85d5c188a2c9640003 (patch) | |
tree | 59e084a2e36504aac4cadade97bc26f1a0205fdd /src/text-backend.c | |
parent | 673a889fd88a70a9308d29bd6574f7c8c67da68d (diff) |
text-backend: Use new config parser
Diffstat (limited to 'src/text-backend.c')
-rw-r--r-- | src/text-backend.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/text-backend.c b/src/text-backend.c index 3d1670b5..c6d8e9e6 100644 --- a/src/text-backend.c +++ b/src/text-backend.c @@ -909,25 +909,13 @@ handle_seat_created(struct wl_listener *listener, static void text_backend_configuration(struct text_backend *text_backend) { - int config_fd; - char *path = NULL; + struct weston_config_section *section; - struct config_key input_method_keys[] = { - { "path", CONFIG_KEY_STRING, &path } - }; - - struct config_section cs[] = { - { "input-method", input_method_keys, ARRAY_LENGTH(input_method_keys), NULL } - }; - - config_fd = open_config_file("weston.ini"); - parse_config_file(config_fd, cs, ARRAY_LENGTH(cs), text_backend); - close(config_fd); - - if (path) - text_backend->input_method.path = path; - else - text_backend->input_method.path = strdup(LIBEXECDIR "/weston-keyboard"); + section = weston_config_get_section(text_backend->compositor->config, + "input-method", NULL, NULL); + weston_config_section_get_string(section, "path", + &text_backend->input_method.path, + LIBEXECDIR "/weston-keyboard"); } static void |