# --------------------------- # Subroutine build_view_row() # --------------------------- subroutine(build_view_row(string option_path, string display_type), ( # option_path defines the preferences subnode and the option name # i.e. miscellaneous.charset if (display_type eq "string") then ( string option_value; ) else ( bool option_value; ); string option_label; option_label = node_value("lang_options.preferences." . option_path . ".label"); option_value = node_value("preferences." . option_path); if (node_exists("lang_options.preferences." . option_path . ".unit")) then ( option_value .= " " . node_value("lang_options.preferences." . option_path . ".unit"); ); if (option_path eq "miscellaneous.language") then ( option_value = capitalize(option_value); ); if (option_value eq "") then ( option_value = "-"; ); ''; if (display_type eq "string") then ( '' . option_label . ':'; '' . option_value . ''; ) else ( # boolean ' '; ''; ' '; option_label; ''; ); '\n'; ));