comparison src/layout.c @ 1436:d7a6fb7a90dd

completely separated global and layout window options layout window configuration is available under separate menu entry
author nadvornik
date Sat, 14 Mar 2009 23:26:42 +0000
parents b4ad1d201279
children a3d3208b0c50
comparison
equal deleted inserted replaced
1435:8355da717c68 1436:d7a6fb7a90dd
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 #include "bar_sort.h"
39 #include "preferences.h"
39 40
40 #ifdef HAVE_LIRC 41 #ifdef HAVE_LIRC
41 #include "lirc.h" 42 #include "lirc.h"
42 #endif 43 #endif
43 44
1344 return TRUE; 1345 return TRUE;
1345 } 1346 }
1346 1347
1347 static void layout_tools_geometry_sync(LayoutWindow *lw) 1348 static void layout_tools_geometry_sync(LayoutWindow *lw)
1348 { 1349 {
1349 layout_geometry_get_tools(lw, &options->layout.float_window.x, &options->layout.float_window.x, 1350 layout_geometry_get_tools(lw, &lw->options.float_window.x, &lw->options.float_window.x,
1350 &options->layout.float_window.w, &options->layout.float_window.h, &lw->options.float_window.vdivider_pos); 1351 &lw->options.float_window.w, &lw->options.float_window.h, &lw->options.float_window.vdivider_pos);
1351 } 1352 }
1352 1353
1353 static void layout_tools_hide(LayoutWindow *lw, gboolean hide) 1354 static void layout_tools_hide(LayoutWindow *lw, gboolean hide)
1354 { 1355 {
1355 if (!lw->tools) return; 1356 if (!lw->tools) return;
1408 lw->tools = window_new(GTK_WINDOW_TOPLEVEL, "tools", PIXBUF_INLINE_ICON_TOOLS, NULL, _("Tools")); 1409 lw->tools = window_new(GTK_WINDOW_TOPLEVEL, "tools", PIXBUF_INLINE_ICON_TOOLS, NULL, _("Tools"));
1409 g_signal_connect(G_OBJECT(lw->tools), "delete_event", 1410 g_signal_connect(G_OBJECT(lw->tools), "delete_event",
1410 G_CALLBACK(layout_tools_delete_cb), lw); 1411 G_CALLBACK(layout_tools_delete_cb), lw);
1411 layout_keyboard_init(lw, lw->tools); 1412 layout_keyboard_init(lw, lw->tools);
1412 1413
1413 if (options->layout.save_window_positions) 1414 if (options->save_window_positions)
1414 { 1415 {
1415 hints = GDK_HINT_USER_POS; 1416 hints = GDK_HINT_USER_POS;
1416 } 1417 }
1417 else 1418 else
1418 { 1419 {
1464 gtk_widget_show(tools); 1465 gtk_widget_show(tools);
1465 gtk_widget_show(files); 1466 gtk_widget_show(files);
1466 1467
1467 if (new_window) 1468 if (new_window)
1468 { 1469 {
1469 if (options->layout.save_window_positions) 1470 if (options->save_window_positions)
1470 { 1471 {
1471 gtk_window_set_default_size(GTK_WINDOW(lw->tools), options->layout.float_window.w, options->layout.float_window.h); 1472 gtk_window_set_default_size(GTK_WINDOW(lw->tools), lw->options.float_window.w, lw->options.float_window.h);
1472 gtk_window_move(GTK_WINDOW(lw->tools), options->layout.float_window.x, options->layout.float_window.y); 1473 gtk_window_move(GTK_WINDOW(lw->tools), lw->options.float_window.x, lw->options.float_window.y);
1473 } 1474 }
1474 else 1475 else
1475 { 1476 {
1476 if (vertical) 1477 if (vertical)
1477 { 1478 {
1484 TOOLWINDOW_DEF_HEIGHT, TOOLWINDOW_DEF_WIDTH); 1485 TOOLWINDOW_DEF_HEIGHT, TOOLWINDOW_DEF_WIDTH);
1485 } 1486 }
1486 } 1487 }
1487 } 1488 }
1488 1489
1489 if (!options->layout.save_window_positions) 1490 if (!options->save_window_positions)
1490 { 1491 {
1491 if (vertical) 1492 if (vertical)
1492 { 1493 {
1493 lw->options.float_window.vdivider_pos = MAIN_WINDOW_DIV_VPOS; 1494 lw->options.float_window.vdivider_pos = MAIN_WINDOW_DIV_VPOS;
1494 } 1495 }
1785 /* clean up */ 1786 /* clean up */
1786 1787
1787 file_data_unref(dir_fd); 1788 file_data_unref(dir_fd);
1788 } 1789 }
1789 1790
1790 void layout_styles_update(void) 1791 void layout_colors_update(void)
1791 { 1792 {
1792 GList *work; 1793 GList *work;
1793 1794
1794 work = layout_window_list; 1795 work = layout_window_list;
1795 while (work) 1796 while (work)
1796 { 1797 {
1797 LayoutWindow *lw = work->data; 1798 LayoutWindow *lw = work->data;
1798 work = work->next; 1799 work = work->next;
1799 1800
1800 layout_style_set(lw, options->layout.style, options->layout.order);
1801 }
1802 }
1803
1804 void layout_colors_update(void)
1805 {
1806 GList *work;
1807
1808 work = layout_window_list;
1809 while (work)
1810 {
1811 LayoutWindow *lw = work->data;
1812 work = work->next;
1813
1814 if (!lw->image) continue; 1801 if (!lw->image) continue;
1815 image_background_set_color(lw->image, options->image.use_custom_border_color ? &options->image.border_color : NULL); 1802 image_background_set_color(lw->image, options->image.use_custom_border_color ? &options->image.border_color : NULL);
1816 } 1803 }
1817 } 1804 }
1818 1805
1919 } 1906 }
1920 else 1907 else
1921 { 1908 {
1922 if (!GTK_WIDGET_VISIBLE(frame)) gtk_widget_show(frame); 1909 if (!GTK_WIDGET_VISIBLE(frame)) gtk_widget_show(frame);
1923 } 1910 }
1911 }
1912
1913 /*
1914 *-----------------------------------------------------------------------------
1915 * configuration
1916 *-----------------------------------------------------------------------------
1917 */
1918
1919 #define CONFIG_WINDOW_DEF_WIDTH 600
1920 #define CONFIG_WINDOW_DEF_HEIGHT 400
1921
1922 typedef struct _LayoutConfig LayoutConfig;
1923 struct _LayoutConfig
1924 {
1925 LayoutWindow *lw;
1926
1927 GtkWidget *configwindow;
1928 GtkWidget *home_path_entry;
1929 GtkWidget *layout_widget;
1930
1931 LayoutOptions options;
1932 };
1933
1934 static gint layout_config_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data);
1935
1936 static void layout_config_close_cb(GtkWidget *widget, gpointer data)
1937 {
1938 LayoutConfig *lc = data;
1939
1940 gtk_widget_destroy(lc->configwindow);
1941 free_layout_options_content(&lc->options);
1942 g_free(lc);
1943 }
1944
1945 static gint layout_config_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
1946 {
1947 layout_config_close_cb(w, data);
1948 return TRUE;
1949 }
1950
1951 static void layout_config_apply_cb(GtkWidget *widget, gpointer data)
1952 {
1953 LayoutConfig *lc = data;
1954
1955 g_free(lc->options.order);
1956 lc->options.order = layout_config_get(lc->layout_widget, &lc->options.style);
1957
1958 config_entry_to_option(lc->home_path_entry, &lc->options.home_path, remove_trailing_slash);
1959
1960 layout_apply_options(lc->lw, &lc->options);
1961 }
1962
1963 static void layout_config_ok_cb(GtkWidget *widget, gpointer data)
1964 {
1965 LayoutConfig *lc = data;
1966 layout_config_apply_cb(widget, lc);
1967 layout_config_close_cb(widget, lc);
1968 }
1969
1970 static void home_path_set_current_cb(GtkWidget *widget, gpointer data)
1971 {
1972 LayoutConfig *lc = data;
1973 gtk_entry_set_text(GTK_ENTRY(lc->home_path_entry), layout_get_path(lc->lw));
1974 }
1975
1976 /*
1977 static void layout_config_save_cb(GtkWidget *widget, gpointer data)
1978 {
1979 layout_config_apply();
1980 save_options(options);
1981 }
1982 */
1983
1984 void layout_show_config_window(LayoutWindow *lw)
1985 {
1986 LayoutConfig *lc;
1987 GtkWidget *win_vbox;
1988 GtkWidget *hbox;
1989 GtkWidget *vbox;
1990 GtkWidget *button;
1991 GtkWidget *ct_button;
1992 GtkWidget *group;
1993 GtkWidget *frame;
1994 GtkWidget *tabcomp;
1995
1996 lc = g_new0(LayoutConfig, 1);
1997 lc->lw = lw;
1998 layout_sync_options_with_current_state(lw);
1999 copy_layout_options(&lc->options, &lw->options);
2000
2001 lc->configwindow = window_new(GTK_WINDOW_TOPLEVEL, "Layout", PIXBUF_INLINE_ICON_CONFIG, NULL, _("Window options and layout"));
2002 gtk_window_set_type_hint(GTK_WINDOW(lc->configwindow), GDK_WINDOW_TYPE_HINT_DIALOG);
2003
2004 g_signal_connect(G_OBJECT(lc->configwindow), "delete_event",
2005 G_CALLBACK(layout_config_delete_cb), lc);
2006
2007 gtk_window_set_default_size(GTK_WINDOW(lc->configwindow), CONFIG_WINDOW_DEF_WIDTH, CONFIG_WINDOW_DEF_HEIGHT);
2008 gtk_window_set_resizable(GTK_WINDOW(lc->configwindow), TRUE);
2009 gtk_container_set_border_width(GTK_CONTAINER(lc->configwindow), PREF_PAD_BORDER);
2010
2011 win_vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
2012 gtk_container_add(GTK_CONTAINER(lc->configwindow), win_vbox);
2013 gtk_widget_show(win_vbox);
2014
2015 hbox = gtk_hbutton_box_new();
2016 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_END);
2017 gtk_box_set_spacing(GTK_BOX(hbox), PREF_PAD_BUTTON_GAP);
2018 gtk_box_pack_end(GTK_BOX(win_vbox), hbox, FALSE, FALSE, 0);
2019 gtk_widget_show(hbox);
2020
2021 button = pref_button_new(NULL, GTK_STOCK_OK, NULL, FALSE,
2022 G_CALLBACK(layout_config_ok_cb), lc);
2023 gtk_container_add(GTK_CONTAINER(hbox), button);
2024 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
2025 gtk_widget_grab_default(button);
2026 gtk_widget_show(button);
2027
2028 ct_button = button;
2029 /*
2030 button = pref_button_new(NULL, GTK_STOCK_SAVE, NULL, FALSE,
2031 G_CALLBACK(layout_config_save_cb), NULL);
2032 gtk_container_add(GTK_CONTAINER(hbox), button);
2033 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
2034 gtk_widget_show(button);
2035 */
2036 button = pref_button_new(NULL, GTK_STOCK_APPLY, NULL, FALSE,
2037 G_CALLBACK(layout_config_apply_cb), lc);
2038 gtk_container_add(GTK_CONTAINER(hbox), button);
2039 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
2040 gtk_widget_show(button);
2041
2042 button = pref_button_new(NULL, GTK_STOCK_CANCEL, NULL, FALSE,
2043 G_CALLBACK(layout_config_close_cb), lc);
2044 gtk_container_add(GTK_CONTAINER(hbox), button);
2045 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
2046 gtk_widget_show(button);
2047
2048 if (!generic_dialog_get_alternative_button_order(lc->configwindow))
2049 {
2050 gtk_box_reorder_child(GTK_BOX(hbox), ct_button, -1);
2051 }
2052
2053 frame = pref_frame_new(win_vbox, TRUE, NULL, GTK_ORIENTATION_VERTICAL, PREF_PAD_GAP);
2054
2055 vbox = gtk_vbox_new(FALSE, PREF_PAD_SPACE);
2056 gtk_container_add(GTK_CONTAINER(frame), vbox);
2057 gtk_widget_show(vbox);
2058
2059 group = pref_group_new(vbox, FALSE, _("General options"), GTK_ORIENTATION_VERTICAL);
2060
2061 pref_label_new(group, _("Home button path (empty to use your home directory)"));
2062 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE);
2063
2064 tabcomp = tab_completion_new(&lc->home_path_entry, lc->options.home_path, NULL, NULL);
2065 tab_completion_add_select_button(lc->home_path_entry, NULL, TRUE);
2066 gtk_box_pack_start(GTK_BOX(hbox), tabcomp, TRUE, TRUE, 0);
2067 gtk_widget_show(tabcomp);
2068
2069 button = pref_button_new(hbox, NULL, _("Use current"), FALSE,
2070 G_CALLBACK(home_path_set_current_cb), lc);
2071
2072 group = pref_group_new(vbox, FALSE, _("Behavior"), GTK_ORIENTATION_VERTICAL);
2073
2074 pref_checkbox_new_int(group, _("Show date in directories list view"),
2075 lc->options.show_directory_date, &lc->options.show_directory_date);
2076
2077 group = pref_group_new(vbox, FALSE, _("Layout"), GTK_ORIENTATION_VERTICAL);
2078
2079 lc->layout_widget = layout_config_new();
2080 layout_config_set(lc->layout_widget, lw->options.style, lw->options.order);
2081 gtk_box_pack_start(GTK_BOX(group), lc->layout_widget, TRUE, TRUE, 0);
2082
2083 gtk_widget_show(lc->layout_widget);
2084 gtk_widget_show(lc->configwindow);
1924 } 2085 }
1925 2086
1926 /* 2087 /*
1927 *----------------------------------------------------------------------------- 2088 *-----------------------------------------------------------------------------
1928 * base 2089 * base
1959 // g_free(options->startup.path); 2120 // g_free(options->startup.path);
1960 // options->startup.path = g_strdup(layout_get_path(NULL)); 2121 // options->startup.path = g_strdup(layout_get_path(NULL));
1961 // } 2122 // }
1962 } 2123 }
1963 2124
2125 void layout_apply_options(LayoutWindow *lw, LayoutOptions *lop)
2126 {
2127 gint refresh_style;
2128 gint refresh_lists;
2129
2130 if (!layout_valid(&lw)) return;
2131 /* FIXME: add other options too */
2132
2133 refresh_style = (lop->style != lw->options.style || strcmp(lop->order, lw->options.order) != 0);
2134 refresh_lists = (lop->show_directory_date != lw->options.show_directory_date);
2135
2136 copy_layout_options(&lw->options, lop);
2137
2138 if (refresh_style) layout_style_set(lw, lw->options.style, lw->options.order);
2139 if (refresh_lists) layout_refresh(lw);
2140 }
2141
1964 2142
1965 void layout_close(LayoutWindow *lw) 2143 void layout_close(LayoutWindow *lw)
1966 { 2144 {
1967 if (layout_window_list && layout_window_list->next) 2145 if (layout_window_list && layout_window_list->next)
1968 { 2146 {
2025 lw = g_new0(LayoutWindow, 1); 2203 lw = g_new0(LayoutWindow, 1);
2026 2204
2027 if (lop) 2205 if (lop)
2028 copy_layout_options(&lw->options, lop); 2206 copy_layout_options(&lw->options, lop);
2029 else 2207 else
2030 copy_layout_options(&lw->options, &options->layout); 2208 init_layout_options(&lw->options);
2031 2209
2032 lw->sort_method = SORT_NAME; 2210 lw->sort_method = SORT_NAME;
2033 lw->sort_ascend = TRUE; 2211 lw->sort_ascend = TRUE;
2034 2212
2035 // lw->options.tools_float = popped; 2213 // lw->options.tools_float = popped;
2044 if (lw->options.dir_view_type >= VIEW_DIR_TYPES_COUNT) lw->options.dir_view_type = 0; 2222 if (lw->options.dir_view_type >= VIEW_DIR_TYPES_COUNT) lw->options.dir_view_type = 0;
2045 if (lw->options.file_view_type >= VIEW_FILE_TYPES_COUNT) lw->options.file_view_type = 0; 2223 if (lw->options.file_view_type >= VIEW_FILE_TYPES_COUNT) lw->options.file_view_type = 0;
2046 2224
2047 /* divider positions */ 2225 /* divider positions */
2048 2226
2049 if (!lw->options.save_window_positions) 2227 if (!options->save_window_positions)
2050 { 2228 {
2051 lw->options.main_window.hdivider_pos = MAIN_WINDOW_DIV_HPOS; 2229 lw->options.main_window.hdivider_pos = MAIN_WINDOW_DIV_HPOS;
2052 lw->options.main_window.vdivider_pos = MAIN_WINDOW_DIV_VPOS; 2230 lw->options.main_window.vdivider_pos = MAIN_WINDOW_DIV_VPOS;
2053 lw->options.float_window.vdivider_pos = MAIN_WINDOW_DIV_VPOS; 2231 lw->options.float_window.vdivider_pos = MAIN_WINDOW_DIV_VPOS;
2054 } 2232 }
2057 2235
2058 lw->window = window_new(GTK_WINDOW_TOPLEVEL, GQ_APPNAME_LC, NULL, NULL, NULL); 2236 lw->window = window_new(GTK_WINDOW_TOPLEVEL, GQ_APPNAME_LC, NULL, NULL, NULL);
2059 gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE); 2237 gtk_window_set_resizable(GTK_WINDOW(lw->window), TRUE);
2060 gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0); 2238 gtk_container_set_border_width(GTK_CONTAINER(lw->window), 0);
2061 2239
2062 if (lw->options.save_window_positions) 2240 if (options->save_window_positions)
2063 { 2241 {
2064 hint_mask = GDK_HINT_USER_POS; 2242 hint_mask = GDK_HINT_USER_POS;
2065 } 2243 }
2066 else 2244 else
2067 { 2245 {
2073 hint.base_width = 0; 2251 hint.base_width = 0;
2074 hint.base_height = 0; 2252 hint.base_height = 0;
2075 gtk_window_set_geometry_hints(GTK_WINDOW(lw->window), NULL, &hint, 2253 gtk_window_set_geometry_hints(GTK_WINDOW(lw->window), NULL, &hint,
2076 GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | hint_mask); 2254 GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE | hint_mask);
2077 2255
2078 if (lw->options.save_window_positions) 2256 if (options->save_window_positions)
2079 { 2257 {
2080 gtk_window_set_default_size(GTK_WINDOW(lw->window), lw->options.main_window.w, lw->options.main_window.h); 2258 gtk_window_set_default_size(GTK_WINDOW(lw->window), lw->options.main_window.w, lw->options.main_window.h);
2081 // if (!layout_window_list) 2259 // if (!layout_window_list)
2082 // { 2260 // {
2083 gtk_window_move(GTK_WINDOW(lw->window), lw->options.main_window.x, lw->options.main_window.y); 2261 gtk_window_move(GTK_WINDOW(lw->window), lw->options.main_window.x, lw->options.main_window.y);
2158 WRITE_BOOL(*layout, show_thumbnails); 2336 WRITE_BOOL(*layout, show_thumbnails);
2159 WRITE_BOOL(*layout, show_directory_date); 2337 WRITE_BOOL(*layout, show_directory_date);
2160 WRITE_CHAR(*layout, home_path); 2338 WRITE_CHAR(*layout, home_path);
2161 WRITE_SEPARATOR(); 2339 WRITE_SEPARATOR();
2162 2340
2163 WRITE_BOOL(*layout, save_window_positions);
2164 WRITE_INT(*layout, main_window.x); 2341 WRITE_INT(*layout, main_window.x);
2165 WRITE_INT(*layout, main_window.y); 2342 WRITE_INT(*layout, main_window.y);
2166 WRITE_INT(*layout, main_window.w); 2343 WRITE_INT(*layout, main_window.w);
2167 WRITE_INT(*layout, main_window.h); 2344 WRITE_INT(*layout, main_window.h);
2168 WRITE_BOOL(*layout, main_window.maximized); 2345 WRITE_BOOL(*layout, main_window.maximized);
2181 WRITE_INT(*layout, properties_window.h); 2358 WRITE_INT(*layout, properties_window.h);
2182 WRITE_SEPARATOR(); 2359 WRITE_SEPARATOR();
2183 2360
2184 WRITE_BOOL(*layout, tools_float); 2361 WRITE_BOOL(*layout, tools_float);
2185 WRITE_BOOL(*layout, tools_hidden); 2362 WRITE_BOOL(*layout, tools_hidden);
2186 WRITE_BOOL(*layout, tools_restore_state);
2187 WRITE_SEPARATOR(); 2363 WRITE_SEPARATOR();
2188 2364
2189 WRITE_BOOL(*layout, toolbar_hidden); 2365 WRITE_BOOL(*layout, toolbar_hidden);
2190 WRITE_BOOL(*layout, info_pixel_hidden); 2366 WRITE_BOOL(*layout, info_pixel_hidden);
2191 2367
2230 if (READ_BOOL(*layout, show_directory_date)) continue; 2406 if (READ_BOOL(*layout, show_directory_date)) continue;
2231 if (READ_CHAR(*layout, home_path)) continue; 2407 if (READ_CHAR(*layout, home_path)) continue;
2232 2408
2233 /* window positions */ 2409 /* window positions */
2234 2410
2235 if (READ_BOOL(*layout, save_window_positions)) continue;
2236
2237 if (READ_INT(*layout, main_window.x)) continue; 2411 if (READ_INT(*layout, main_window.x)) continue;
2238 if (READ_INT(*layout, main_window.y)) continue; 2412 if (READ_INT(*layout, main_window.y)) continue;
2239 if (READ_INT(*layout, main_window.w)) continue; 2413 if (READ_INT(*layout, main_window.w)) continue;
2240 if (READ_INT(*layout, main_window.h)) continue; 2414 if (READ_INT(*layout, main_window.h)) continue;
2241 if (READ_BOOL(*layout, main_window.maximized)) continue; 2415 if (READ_BOOL(*layout, main_window.maximized)) continue;
2251 if (READ_INT(*layout, properties_window.w)) continue; 2425 if (READ_INT(*layout, properties_window.w)) continue;
2252 if (READ_INT(*layout, properties_window.h)) continue; 2426 if (READ_INT(*layout, properties_window.h)) continue;
2253 2427
2254 if (READ_BOOL(*layout, tools_float)) continue; 2428 if (READ_BOOL(*layout, tools_float)) continue;
2255 if (READ_BOOL(*layout, tools_hidden)) continue; 2429 if (READ_BOOL(*layout, tools_hidden)) continue;
2256 if (READ_BOOL(*layout, tools_restore_state)) continue;
2257 if (READ_BOOL(*layout, toolbar_hidden)) continue; 2430 if (READ_BOOL(*layout, toolbar_hidden)) continue;
2258 if (READ_BOOL(*layout, info_pixel_hidden)) continue; 2431 if (READ_BOOL(*layout, info_pixel_hidden)) continue;
2259 2432
2260 if (READ_UINT(*layout, image_overlay.state)) continue; 2433 if (READ_UINT(*layout, image_overlay.state)) continue;
2261 if (READ_INT(*layout, image_overlay.histogram_channel)) continue; 2434 if (READ_INT(*layout, image_overlay.histogram_channel)) continue;
2304 { 2477 {
2305 LayoutOptions lop; 2478 LayoutOptions lop;
2306 LayoutWindow *lw; 2479 LayoutWindow *lw;
2307 gchar *path = NULL; 2480 gchar *path = NULL;
2308 2481
2309 memset(&lop, 0, sizeof(LayoutOptions)); 2482 init_layout_options(&lop);
2310 copy_layout_options(&lop, &options->layout);
2311 2483
2312 if (attribute_names) layout_load_attributes(&lop, attribute_names, attribute_values); 2484 if (attribute_names) layout_load_attributes(&lop, attribute_names, attribute_values);
2313 2485
2314 if (use_commandline) 2486 if (use_commandline)
2315 { 2487 {