diff options
-rw-r--r-- | clients/desktop-shell.c | 28 | ||||
-rw-r--r-- | data/COPYING | 5 | ||||
-rw-r--r-- | data/Makefile.am | 4 | ||||
-rw-r--r-- | data/pattern.png | bin | 0 -> 1846 bytes | |||
-rw-r--r-- | data/terminal.png | bin | 0 -> 1005 bytes | |||
-rw-r--r-- | src/shell.c | 10 |
6 files changed, 32 insertions, 15 deletions
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 7116a7d..a6a6147 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -95,10 +95,10 @@ struct unlock_dialog { struct desktop *desktop; }; -static char *key_background_image; -static char *key_background_type; -static uint32_t key_panel_color; -static uint32_t key_background_color; +static char *key_background_image = DATADIR "/weston/pattern.png"; +static char *key_background_type = "tile"; +static uint32_t key_panel_color = 0xaa000000; +static uint32_t key_background_color = 0xff002244; static char *key_launcher_icon; static char *key_launcher_path; static void launcher_section_done(void *data); @@ -690,11 +690,23 @@ launcher_section_done(void *data) key_launcher_path = NULL; } +static void +add_default_launcher(struct desktop *desktop) +{ + struct output *output; + + wl_list_for_each(output, &desktop->outputs, link) + panel_add_launcher(output->panel, + DATADIR "/weston/terminal.png", + "/usr/bin/weston-terminal"); +} + int main(int argc, char *argv[]) { struct desktop desktop = { 0 }; char *config_file; struct output *output; + int ret; desktop.unlock_task.run = unlock_dialog_finish; wl_list_init(&desktop.outputs); @@ -721,10 +733,12 @@ int main(int argc, char *argv[]) } config_file = config_file_path("weston-desktop-shell.ini"); - parse_config_file(config_file, - config_sections, ARRAY_LENGTH(config_sections), - &desktop); + ret = parse_config_file(config_file, + config_sections, ARRAY_LENGTH(config_sections), + &desktop); free(config_file); + if (ret < 0) + add_default_launcher(&desktop); signal(SIGCHLD, sigchild_handler); diff --git a/data/COPYING b/data/COPYING index b9d6c37..430a864 100644 --- a/data/COPYING +++ b/data/COPYING @@ -1,6 +1,11 @@ +For the DMZ cursors: + (c) 2007-2010 Novell, Inc. This work is licenced under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this licence, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA. + +The terminal icon is taken from the gnome-icon-theme collection which +is also distributed under the Creative Commons BY-SA 3.0 license.
\ No newline at end of file diff --git a/data/Makefile.am b/data/Makefile.am index c919381..a05989c 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -20,7 +20,9 @@ dist_westondata_DATA = \ top_side.png \ xterm.png \ wayland.svg \ - $(wayland_icon_png) + $(wayland_icon_png) \ + pattern.png \ + terminal.png if HAVE_RSVG_CONVERT wayland_icon_png = wayland.png diff --git a/data/pattern.png b/data/pattern.png Binary files differnew file mode 100644 index 0000000..5ac8986 --- /dev/null +++ b/data/pattern.png diff --git a/data/terminal.png b/data/terminal.png Binary files differnew file mode 100644 index 0000000..3c02dd2 --- /dev/null +++ b/data/terminal.png diff --git a/src/shell.c b/src/shell.c index 522a273..cf94e8e 100644 --- a/src/shell.c +++ b/src/shell.c @@ -110,10 +110,9 @@ struct weston_move_grab { int32_t dx, dy; }; -static int +static void shell_configuration(struct wl_shell *shell) { - int ret; char *config_file; char *path = NULL; int duration = 60; @@ -128,13 +127,11 @@ shell_configuration(struct wl_shell *shell) }; config_file = config_file_path("weston-desktop-shell.ini"); - ret = parse_config_file(config_file, cs, ARRAY_LENGTH(cs), shell); + parse_config_file(config_file, cs, ARRAY_LENGTH(cs), shell); free(config_file); shell->screensaver.path = path; shell->screensaver.duration = duration; - - return ret; } static void @@ -1447,8 +1444,7 @@ shell_init(struct weston_compositor *ec) wl_list_init(&shell->panels); wl_list_init(&shell->screensaver.surfaces); - if (shell_configuration(shell) < 0) - return -1; + shell_configuration(shell); if (wl_display_add_global(ec->wl_display, &wl_shell_interface, shell, bind_shell) == NULL) |