From ecc8ade211b346856f789b688cd67259cfe76b1e Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sat, 18 Dec 2010 18:40:01 +0100 Subject: Set default values for home screen and icon folders in device_info_new() --- src/device.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/device.c b/src/device.c index ddd6d53..9148404 100644 --- a/src/device.c +++ b/src/device.c @@ -246,7 +246,20 @@ char *device_sbs_save_wallpaper(sbservices_client_t sbc, const char *uuid, GErro device_info_t device_info_new() { - return g_new0(struct device_info_int, 1); + device_info_t device_info = g_new0(struct device_info_int, 1); + + /* initialize default values */ + device_info->home_screen_icon_columns = 4; + device_info->home_screen_icon_dock_max_count = 4; + device_info->home_screen_icon_height = 57; + device_info->home_screen_icon_rows = 4; + device_info->home_screen_icon_width = 57; + device_info->icon_folder_columns = 4; + device_info->icon_folder_max_pages = 1; + device_info->icon_folder_rows = 3; + device_info->icon_state_saves = 1; + + return device_info; } void device_info_free(device_info_t device_info) -- cgit v1.1-32-gdbae