diff options
Diffstat (limited to 'clients')
-rw-r--r-- | clients/desktop-shell.c | 6 | ||||
-rw-r--r-- | clients/tablet-shell.c | 6 | ||||
-rw-r--r-- | clients/terminal.c | 6 | ||||
-rw-r--r-- | clients/window.c | 7 |
4 files changed, 5 insertions, 20 deletions
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 381f387e..599c0a5b 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -1280,17 +1280,13 @@ panel_add_launchers(struct panel *panel, struct desktop *desktop) int main(int argc, char *argv[]) { struct desktop desktop = { 0 }; - int config_fd; struct output *output; struct weston_config_section *s; desktop.unlock_task.run = unlock_dialog_finish; wl_list_init(&desktop.outputs); - config_fd = open_config_file("weston.ini"); - desktop.config = weston_config_parse(config_fd); - close(config_fd); - + desktop.config = weston_config_parse("weston.ini"); s = weston_config_get_section(desktop.config, "shell", NULL, NULL); weston_config_section_get_bool(s, "locking", &desktop.locking, 1); diff --git a/clients/tablet-shell.c b/clients/tablet-shell.c index 7af6ac8e..094823c4 100644 --- a/clients/tablet-shell.c +++ b/clients/tablet-shell.c @@ -412,7 +412,6 @@ int main(int argc, char *argv[]) { struct tablet tablet = { 0 }; struct display *display; - int config_fd; struct output *output; struct weston_config *config; struct weston_config_section *s; @@ -438,10 +437,7 @@ int main(int argc, char *argv[]) wl_list_init(&tablet.homescreen->launcher_list); - config_fd = open_config_file("weston.ini"); - config = weston_config_parse(config_fd); - close(config_fd); - + config = weston_config_parse("weston.ini"); s = weston_config_get_section(config, "shell", NULL, NULL); weston_config_section_get_string(s, "lockscreen-icon", &key_lockscreen_icon, NULL); diff --git a/clients/terminal.c b/clients/terminal.c index c45c7764..cec1d67e 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -2793,7 +2793,6 @@ int main(int argc, char *argv[]) struct terminal *terminal; struct weston_config *config; struct weston_config_section *s; - int config_fd; /* as wcwidth is locale-dependent, wcwidth needs setlocale call to function properly. */ @@ -2803,10 +2802,7 @@ int main(int argc, char *argv[]) if (!option_shell) option_shell = "/bin/bash"; - config_fd = open_config_file("weston.ini"); - config = weston_config_parse(config_fd); - close(config_fd); - + config = weston_config_parse("weston.ini"); s = weston_config_get_section(config, "terminal", NULL, NULL); weston_config_section_get_string(s, "font", &option_font, "mono"); weston_config_section_get_int(s, "font-size", &option_font_size, 14); diff --git a/clients/window.c b/clients/window.c index 8d4ee3a7..5b20da57 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1309,15 +1309,12 @@ create_cursors(struct display *display) { struct weston_config *config; struct weston_config_section *s; - int config_fd, size; + int size; char *theme = NULL; unsigned int i, j; struct wl_cursor *cursor; - config_fd = open_config_file("weston.ini"); - config = weston_config_parse(config_fd); - close(config_fd); - + config = weston_config_parse("weston.ini"); s = weston_config_get_section(config, "shell", NULL, NULL); weston_config_section_get_string(s, "cursor-theme", &theme, NULL); weston_config_section_get_int(s, "cursor-size", &size, 32); |