Mercurial > geeqie.yaz
comparison src/layout.c @ 1461:e015b6573d36
improved config file formatting
author | nadvornik |
---|---|
date | Thu, 19 Mar 2009 22:12:14 +0000 |
parents | a3d3208b0c50 |
children | 25168240a247 |
comparison
equal
deleted
inserted
replaced
1460:8178ef34d257 | 1461:e015b6573d36 |
---|---|
2326 return lw; | 2326 return lw; |
2327 } | 2327 } |
2328 | 2328 |
2329 void layout_write_attributes(LayoutOptions *layout, GString *outstr, gint indent) | 2329 void layout_write_attributes(LayoutOptions *layout, GString *outstr, gint indent) |
2330 { | 2330 { |
2331 WRITE_INT(*layout, style); | 2331 WRITE_NL(); WRITE_INT(*layout, style); |
2332 WRITE_CHAR(*layout, order); | 2332 WRITE_NL(); WRITE_CHAR(*layout, order); |
2333 WRITE_UINT(*layout, dir_view_type); | 2333 WRITE_NL(); WRITE_UINT(*layout, dir_view_type); |
2334 WRITE_UINT(*layout, file_view_type); | 2334 WRITE_NL(); WRITE_UINT(*layout, file_view_type); |
2335 WRITE_BOOL(*layout, show_marks); | 2335 WRITE_NL(); WRITE_BOOL(*layout, show_marks); |
2336 WRITE_BOOL(*layout, show_thumbnails); | 2336 WRITE_NL(); WRITE_BOOL(*layout, show_thumbnails); |
2337 WRITE_BOOL(*layout, show_directory_date); | 2337 WRITE_NL(); WRITE_BOOL(*layout, show_directory_date); |
2338 WRITE_CHAR(*layout, home_path); | 2338 WRITE_NL(); WRITE_CHAR(*layout, home_path); |
2339 WRITE_SEPARATOR(); | 2339 WRITE_SEPARATOR(); |
2340 | 2340 |
2341 WRITE_INT(*layout, main_window.x); | 2341 WRITE_NL(); WRITE_INT(*layout, main_window.x); |
2342 WRITE_INT(*layout, main_window.y); | 2342 WRITE_NL(); WRITE_INT(*layout, main_window.y); |
2343 WRITE_INT(*layout, main_window.w); | 2343 WRITE_NL(); WRITE_INT(*layout, main_window.w); |
2344 WRITE_INT(*layout, main_window.h); | 2344 WRITE_NL(); WRITE_INT(*layout, main_window.h); |
2345 WRITE_BOOL(*layout, main_window.maximized); | 2345 WRITE_NL(); WRITE_BOOL(*layout, main_window.maximized); |
2346 WRITE_INT(*layout, main_window.hdivider_pos); | 2346 WRITE_NL(); WRITE_INT(*layout, main_window.hdivider_pos); |
2347 WRITE_INT(*layout, main_window.vdivider_pos); | 2347 WRITE_NL(); WRITE_INT(*layout, main_window.vdivider_pos); |
2348 WRITE_SEPARATOR(); | 2348 WRITE_SEPARATOR(); |
2349 | 2349 |
2350 WRITE_INT(*layout, float_window.x); | 2350 WRITE_NL(); WRITE_INT(*layout, float_window.x); |
2351 WRITE_INT(*layout, float_window.y); | 2351 WRITE_NL(); WRITE_INT(*layout, float_window.y); |
2352 WRITE_INT(*layout, float_window.w); | 2352 WRITE_NL(); WRITE_INT(*layout, float_window.w); |
2353 WRITE_INT(*layout, float_window.h); | 2353 WRITE_NL(); WRITE_INT(*layout, float_window.h); |
2354 WRITE_INT(*layout, float_window.vdivider_pos); | 2354 WRITE_NL(); WRITE_INT(*layout, float_window.vdivider_pos); |
2355 WRITE_SEPARATOR(); | 2355 WRITE_SEPARATOR(); |
2356 | 2356 |
2357 WRITE_INT(*layout, properties_window.w); | 2357 WRITE_NL(); WRITE_INT(*layout, properties_window.w); |
2358 WRITE_INT(*layout, properties_window.h); | 2358 WRITE_NL(); WRITE_INT(*layout, properties_window.h); |
2359 WRITE_SEPARATOR(); | 2359 WRITE_SEPARATOR(); |
2360 | 2360 |
2361 WRITE_BOOL(*layout, tools_float); | 2361 WRITE_NL(); WRITE_BOOL(*layout, tools_float); |
2362 WRITE_BOOL(*layout, tools_hidden); | 2362 WRITE_NL(); WRITE_BOOL(*layout, tools_hidden); |
2363 WRITE_SEPARATOR(); | 2363 WRITE_SEPARATOR(); |
2364 | 2364 |
2365 WRITE_BOOL(*layout, toolbar_hidden); | 2365 WRITE_NL(); WRITE_BOOL(*layout, toolbar_hidden); |
2366 WRITE_BOOL(*layout, info_pixel_hidden); | 2366 WRITE_NL(); WRITE_BOOL(*layout, info_pixel_hidden); |
2367 | 2367 |
2368 WRITE_UINT(*layout, image_overlay.state); | 2368 WRITE_NL(); WRITE_UINT(*layout, image_overlay.state); |
2369 WRITE_INT(*layout, image_overlay.histogram_channel); | 2369 WRITE_NL(); WRITE_INT(*layout, image_overlay.histogram_channel); |
2370 WRITE_INT(*layout, image_overlay.histogram_mode); | 2370 WRITE_NL(); WRITE_INT(*layout, image_overlay.histogram_mode); |
2371 } | 2371 } |
2372 | 2372 |
2373 | 2373 |
2374 void layout_write_config(LayoutWindow *lw, GString *outstr, gint indent) | 2374 void layout_write_config(LayoutWindow *lw, GString *outstr, gint indent) |
2375 { | 2375 { |
2376 layout_sync_options_with_current_state(lw); | 2376 layout_sync_options_with_current_state(lw); |
2377 WRITE_STRING("<layout\n"); | 2377 WRITE_NL(); WRITE_STRING("<layout"); |
2378 layout_write_attributes(&lw->options, outstr, indent + 1); | 2378 layout_write_attributes(&lw->options, outstr, indent + 1); |
2379 WRITE_STRING(">\n"); | 2379 WRITE_STRING(">"); |
2380 | 2380 |
2381 bar_sort_write_config(lw->bar_sort, outstr, indent + 1); | 2381 bar_sort_write_config(lw->bar_sort, outstr, indent + 1); |
2382 bar_write_config(lw->bar, outstr, indent + 1); | 2382 bar_write_config(lw->bar, outstr, indent + 1); |
2383 | 2383 |
2384 layout_toolbar_write_config(lw, outstr, indent + 1); | 2384 layout_toolbar_write_config(lw, outstr, indent + 1); |
2385 | 2385 |
2386 WRITE_STRING("</layout>\n"); | 2386 WRITE_NL(); WRITE_STRING("</layout>"); |
2387 } | 2387 } |
2388 | 2388 |
2389 void layout_load_attributes(LayoutOptions *layout, const gchar **attribute_names, const gchar **attribute_values) | 2389 void layout_load_attributes(LayoutOptions *layout, const gchar **attribute_names, const gchar **attribute_values) |
2390 { | 2390 { |
2391 | 2391 |