comparison src/options.c @ 1511:73cecf473802

startup path options simplified and moved to layout options
author nadvornik
date Sat, 04 Apr 2009 21:14:34 +0000
parents 1b2ddc6b2b27
children 0a1266bde95b
comparison
equal deleted inserted replaced
1510:ad5018434476 1511:73cecf473802
111 111
112 options->slideshow.delay = 50; 112 options->slideshow.delay = 50;
113 options->slideshow.random = FALSE; 113 options->slideshow.random = FALSE;
114 options->slideshow.repeat = FALSE; 114 options->slideshow.repeat = FALSE;
115 115
116 options->startup.path = NULL;
117 options->startup.restore_path = FALSE;
118 options->startup.use_last_path = FALSE;
119
120 options->thumbnails.cache_into_dirs = FALSE; 116 options->thumbnails.cache_into_dirs = FALSE;
121 options->thumbnails.enable_caching = TRUE; 117 options->thumbnails.enable_caching = TRUE;
122 options->thumbnails.fast = TRUE; 118 options->thumbnails.fast = TRUE;
123 options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT; 119 options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT;
124 options->thumbnails.max_width = DEFAULT_THUMB_WIDTH; 120 options->thumbnails.max_width = DEFAULT_THUMB_WIDTH;
171 167
172 *dest = *src; 168 *dest = *src;
173 dest->id = g_strdup(src->id); 169 dest->id = g_strdup(src->id);
174 dest->order = g_strdup(src->order); 170 dest->order = g_strdup(src->order);
175 dest->home_path = g_strdup(src->home_path); 171 dest->home_path = g_strdup(src->home_path);
172 dest->last_path = g_strdup(src->last_path);
176 } 173 }
177 174
178 void free_layout_options_content(LayoutOptions *dest) 175 void free_layout_options_content(LayoutOptions *dest)
179 { 176 {
180 g_free(dest->id); 177 g_free(dest->id);
181 g_free(dest->order); 178 g_free(dest->order);
182 g_free(dest->home_path); 179 g_free(dest->home_path);
180 g_free(dest->last_path);
183 } 181 }
184 182
185 LayoutOptions *init_layout_options(LayoutOptions *options) 183 LayoutOptions *init_layout_options(LayoutOptions *options)
186 { 184 {
187 memset(options, 0, sizeof(LayoutOptions)); 185 memset(options, 0, sizeof(LayoutOptions));
228 options->color_profile.enabled = layout_image_color_profile_get_use(lw); 226 options->color_profile.enabled = layout_image_color_profile_get_use(lw);
229 layout_image_color_profile_get(lw, 227 layout_image_color_profile_get(lw,
230 &options->color_profile.input_type, 228 &options->color_profile.input_type,
231 &options->color_profile.screen_type, 229 &options->color_profile.screen_type,
232 &options->color_profile.use_image); 230 &options->color_profile.use_image);
233
234 if (options->startup.restore_path && options->startup.use_last_path)
235 {
236 g_free(options->startup.path);
237 options->startup.path = g_strdup(layout_get_path(lw));
238 }
239 } 231 }
240 232
241 } 233 }
242 234
243 void save_options(ConfOptions *options) 235 void save_options(ConfOptions *options)