comparison src/layout.c @ 1320:055ed09d5a03

improved bar_sort configuration
author nadvornik
date Tue, 24 Feb 2009 22:21:28 +0000
parents cd7204a18f14
children 4370b90fa774
comparison
equal deleted inserted replaced
1319:358685fb9dc9 1320:055ed09d5a03
33 #include "ui_tabcomp.h" 33 #include "ui_tabcomp.h"
34 #include "window.h" 34 #include "window.h"
35 #include "metadata.h" 35 #include "metadata.h"
36 #include "rcfile.h" 36 #include "rcfile.h"
37 #include "bar.h" 37 #include "bar.h"
38 #include "bar_sort.h"
38 39
39 #ifdef HAVE_LIRC 40 #ifdef HAVE_LIRC
40 #include "lirc.h" 41 #include "lirc.h"
41 #endif 42 #endif
42 43
2155 WRITE_BOOL(*layout, tools_hidden); 2156 WRITE_BOOL(*layout, tools_hidden);
2156 WRITE_BOOL(*layout, tools_restore_state); 2157 WRITE_BOOL(*layout, tools_restore_state);
2157 WRITE_SEPARATOR(); 2158 WRITE_SEPARATOR();
2158 2159
2159 WRITE_BOOL(*layout, toolbar_hidden); 2160 WRITE_BOOL(*layout, toolbar_hidden);
2160
2161 WRITE_BOOL(*layout, panels.sort.enabled);
2162 WRITE_INT(*layout, panels.sort.action_state);
2163 WRITE_INT(*layout, panels.sort.mode_state);
2164 WRITE_INT(*layout, panels.sort.selection_state);
2165 WRITE_CHAR(*layout, panels.sort.action_filter);
2166 } 2161 }
2167 2162
2168 2163
2169 void layout_write_config(LayoutWindow *lw, GString *outstr, gint indent) 2164 void layout_write_config(LayoutWindow *lw, GString *outstr, gint indent)
2170 { 2165 {
2171 layout_sync_options_with_current_state(lw); 2166 layout_sync_options_with_current_state(lw);
2172 WRITE_STRING("<layout\n"); 2167 WRITE_STRING("<layout\n");
2173 layout_write_attributes(&lw->options, outstr, indent + 1); 2168 layout_write_attributes(&lw->options, outstr, indent + 1);
2174 WRITE_STRING(">\n"); 2169 WRITE_STRING(">\n");
2175 2170
2171 bar_sort_write_config(lw->bar_sort, outstr, indent + 1);
2176 bar_write_config(lw->bar, outstr, indent + 1); 2172 bar_write_config(lw->bar, outstr, indent + 1);
2177 2173
2178 WRITE_STRING("</layout>\n"); 2174 WRITE_STRING("</layout>\n");
2179 } 2175 }
2180 2176
2222 if (READ_BOOL(*layout, tools_float)) continue; 2218 if (READ_BOOL(*layout, tools_float)) continue;
2223 if (READ_BOOL(*layout, tools_hidden)) continue; 2219 if (READ_BOOL(*layout, tools_hidden)) continue;
2224 if (READ_BOOL(*layout, tools_restore_state)) continue; 2220 if (READ_BOOL(*layout, tools_restore_state)) continue;
2225 if (READ_BOOL(*layout, toolbar_hidden)) continue; 2221 if (READ_BOOL(*layout, toolbar_hidden)) continue;
2226 2222
2227 /* panels */
2228 if (READ_BOOL(*layout, panels.sort.enabled)) continue;
2229 if (READ_INT(*layout, panels.sort.action_state)) continue;
2230 if (READ_INT(*layout, panels.sort.mode_state)) continue;
2231 if (READ_INT(*layout, panels.sort.selection_state)) continue;
2232 if (READ_CHAR(*layout, panels.sort.action_filter)) continue;
2233
2234
2235 DEBUG_1("unknown attribute %s = %s", option, value); 2223 DEBUG_1("unknown attribute %s = %s", option, value);
2236 } 2224 }
2237 2225
2238 } 2226 }
2239 2227