mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
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:
parent
6bd4d97271
commit
9a206c4da5
6 changed files with 30 additions and 92 deletions
|
|
@ -118,7 +118,7 @@ static const struct config_key launcher_config_keys[] = {
|
|||
};
|
||||
|
||||
static const struct config_section config_sections[] = {
|
||||
{ "desktop-shell",
|
||||
{ "shell",
|
||||
shell_config_keys, ARRAY_LENGTH(shell_config_keys) },
|
||||
{ "launcher",
|
||||
launcher_config_keys, ARRAY_LENGTH(launcher_config_keys),
|
||||
|
|
@ -728,7 +728,7 @@ int main(int argc, char *argv[])
|
|||
desktop_shell_set_background(desktop.shell, output->output, s);
|
||||
}
|
||||
|
||||
config_file = config_file_path("weston-desktop-shell.ini");
|
||||
config_file = config_file_path("weston.ini");
|
||||
ret = parse_config_file(config_file,
|
||||
config_sections, ARRAY_LENGTH(config_sections),
|
||||
&desktop);
|
||||
|
|
|
|||
|
|
@ -54,13 +54,10 @@ static char *key_launcher_icon;
|
|||
static char *key_launcher_path;
|
||||
static void launcher_section_done(void *data);
|
||||
|
||||
static const struct config_key lockscreen_config_keys[] = {
|
||||
{ "icon", CONFIG_KEY_STRING, &key_lockscreen_icon },
|
||||
{ "background", CONFIG_KEY_STRING, &key_lockscreen_background },
|
||||
};
|
||||
|
||||
static const struct config_key homescreen_config_keys[] = {
|
||||
{ "background", CONFIG_KEY_STRING, &key_homescreen_background },
|
||||
static const struct config_key shell_config_keys[] = {
|
||||
{ "lockscreen-icon", CONFIG_KEY_STRING, &key_lockscreen_icon },
|
||||
{ "lockscreen", CONFIG_KEY_STRING, &key_lockscreen_background },
|
||||
{ "homescreen", CONFIG_KEY_STRING, &key_homescreen_background },
|
||||
};
|
||||
|
||||
static const struct config_key launcher_config_keys[] = {
|
||||
|
|
@ -69,10 +66,8 @@ static const struct config_key launcher_config_keys[] = {
|
|||
};
|
||||
|
||||
static const struct config_section config_sections[] = {
|
||||
{ "lockscreen",
|
||||
lockscreen_config_keys, ARRAY_LENGTH(lockscreen_config_keys) },
|
||||
{ "homescreen",
|
||||
homescreen_config_keys, ARRAY_LENGTH(homescreen_config_keys) },
|
||||
{ "shell",
|
||||
shell_config_keys, ARRAY_LENGTH(shell_config_keys) },
|
||||
{ "launcher",
|
||||
launcher_config_keys, ARRAY_LENGTH(launcher_config_keys),
|
||||
launcher_section_done }
|
||||
|
|
@ -327,7 +322,7 @@ int main(int argc, char *argv[])
|
|||
"tablet_shell", 1);
|
||||
shell = tablet_shell_create(display, id);
|
||||
|
||||
config_file = config_file_path("weston-tablet-shell.ini");
|
||||
config_file = config_file_path("weston.ini");
|
||||
parse_config_file(config_file,
|
||||
config_sections, ARRAY_LENGTH(config_sections),
|
||||
shell);
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,75 +0,0 @@
|
|||
[lockscreen]
|
||||
icon=/usr/share/icons/gnome/256x256/actions/lock.png
|
||||
background=/usr/share/backgrounds/gnome/Garden.jpg
|
||||
|
||||
[homescreen]
|
||||
background=/usr/share/backgrounds/gnome/Blinds.jpg
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/access.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/multimedia.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/background.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/calc.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/file-manager.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/fonts.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/gnome-character-map.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/help-browser.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/gnome-remote-desktop.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/key_bindings.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/style.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/terminal.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/locale.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/screensaver.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/text-editor.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/wallpaper.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/256x256/apps/web-browser.png
|
||||
path=/usr/bin/weston-terminal
|
||||
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
[desktop-shell]
|
||||
[shell]
|
||||
type=desktop-shell.so
|
||||
background-image=/usr/share/backgrounds/gnome/Aqua.jpg
|
||||
background-color=0xff002244
|
||||
panel-color=0x90ff0000
|
||||
locking=true
|
||||
|
||||
#type=tablet-shell.so
|
||||
#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
|
||||
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
|
||||
#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
|
||||
[launcher]
|
||||
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
|
||||
path=/usr/bin/gnome-terminal
|
||||
Loading…
Add table
Reference in a new issue