comparison src/preferences.c @ 375:612b39ee9a7e

Rename l_conf to layout_order and make it more local.
author zas_
date Tue, 15 Apr 2008 20:55:21 +0000
parents a264519f1c21
children 603206ffa644
comparison
equal deleted inserted replaced
374:a264519f1c21 375:612b39ee9a7e
144 */ 144 */
145 145
146 static void config_window_apply(void) 146 static void config_window_apply(void)
147 { 147 {
148 const gchar *buf; 148 const gchar *buf;
149 gchar *l_conf;
150 gint new_style; 149 gint new_style;
151 gint i; 150 gint i;
152 gint refresh = FALSE; 151 gint refresh = FALSE;
153 152
154 for(i = 0; i < GQ_EDITOR_SLOTS; i++) 153 for(i = 0; i < GQ_EDITOR_SLOTS; i++)
288 for (i=0; ExifUIList[i].key; i++) 287 for (i=0; ExifUIList[i].key; i++)
289 { 288 {
290 ExifUIList[i].current = ExifUIList[i].temp; 289 ExifUIList[i].current = ExifUIList[i].temp;
291 } 290 }
292 291
293 l_conf = layout_config_get(layout_widget, &new_style); 292 {
293 gchar *layout_order = layout_config_get(layout_widget, &new_style);
294 294
295 if (new_style != options->layout.style || 295 if (new_style != options->layout.style ||
296 (l_conf == NULL) != (options->layout.order == NULL) || 296 (layout_order == NULL) != (options->layout.order == NULL) ||
297 !options->layout.order || 297 !options->layout.order ||
298 strcmp(l_conf, options->layout.order) != 0) 298 strcmp(layout_order, options->layout.order) != 0)
299 { 299 {
300 if (refresh) filter_rebuild(); 300 if (refresh) filter_rebuild();
301 refresh = FALSE; 301 refresh = FALSE;
302 302
303 g_free(options->layout.order); 303 g_free(options->layout.order);
304 options->layout.order = l_conf; 304 options->layout.order = layout_order;
305 l_conf = NULL; 305 layout_order = NULL; /* g_free() later */
306 306
307 options->layout.style = new_style; 307 options->layout.style = new_style;
308 308
309 layout_styles_update(); 309 layout_styles_update();
310 } 310 }
311 311
312 g_free(l_conf); 312 g_free(layout_order);
313 }
313 314
314 image_options_sync(); 315 image_options_sync();
315 316
316 if (refresh) 317 if (refresh)
317 { 318 {