config-parser: consolidate shell files into weston.ini only

The shell choice happens in the configuration file now.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This commit is contained in:
Tiago Vignatti
2012-03-21 19:49:18 +02:00
committed by Kristian Høgsberg
parent 6bd4d97271
commit 9a206c4da5
6 changed files with 30 additions and 92 deletions
+14 -1
View File
@@ -2513,12 +2513,21 @@ int main(int argc, char *argv[])
int32_t idle_time = 300;
int32_t xserver;
char *socket_name = NULL;
char *config_file;
const const struct config_key shell_config_keys[] = {
{ "type", CONFIG_KEY_STRING, &shell },
};
const const struct config_section cs[] = {
{ "shell",
shell_config_keys, ARRAY_LENGTH(shell_config_keys) },
};
const struct weston_option core_options[] = {
{ WESTON_OPTION_STRING, "backend", 'B', &backend },
{ WESTON_OPTION_STRING, "socket", 'S', &socket_name },
{ WESTON_OPTION_INTEGER, "idle-time", 'i', &idle_time },
{ WESTON_OPTION_STRING, "shell", 's', &shell },
{ WESTON_OPTION_BOOLEAN, "xserver", 0, &xserver },
};
@@ -2555,6 +2564,10 @@ int main(int argc, char *argv[])
backend = "drm-backend.so";
}
config_file = config_file_path("weston.ini");
parse_config_file(config_file, cs, ARRAY_LENGTH(cs), shell);
free(config_file);
if (!shell)
shell = "desktop-shell.so";
+1 -1
View File
@@ -164,7 +164,7 @@ shell_configuration(struct wl_shell *shell)
{ "screensaver", saver_keys, ARRAY_LENGTH(saver_keys), NULL },
};
config_file = config_file_path("weston-desktop-shell.ini");
config_file = config_file_path("weston.ini");
parse_config_file(config_file, cs, ARRAY_LENGTH(cs), shell);
free(config_file);