From: Mark Clarkstone Date: Tue, 19 Sep 2017 08:29:21 +0000 (+0100) Subject: webui: sort (and group) many of the config settings, they were starting to look reall... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7fb78796cc980e2a0e3b130efa24de176fc77377;p=thirdparty%2Ftvheadend.git webui: sort (and group) many of the config settings, they were starting to look really messy. --- diff --git a/src/config.c b/src/config.c index 07f21f766..e932b17af 100644 --- a/src/config.c +++ b/src/config.c @@ -2035,32 +2035,45 @@ const idclass_t config_class = { .ic_save = config_class_save, .ic_groups = (const property_group_t[]) { { - .name = N_("Server"), + .name = N_("Server settings"), .number = 1, }, { - .name = N_("Language settings"), + .name = N_("Web interface settings"), .number = 2, }, { - .name = N_("Web user interface"), + .name = N_("EPG settings"), .number = 3, }, { - .name = N_("DVB scan files"), + .name = N_("Channel icon/Picon settings"), .number = 4, }, { - .name = N_("Time update"), + .name = N_("HTTP server settings"), .number = 5, }, { - .name = N_("Picon"), + .name = N_("System time update"), .number = 6, }, + { + .name = N_("Misc settings"), + .number = 7, + }, {} }, .ic_properties = (const property_t[]){ + { + .type = PT_STR, + .id = "server_name", + .name = N_("Tvheadend server name"), + .desc = N_("Set the name of the server so you can distinguish " + "multiple instances apart."), + .off = offsetof(config_t, server_name), + .group = 1 + }, { .type = PT_U32, .id = "version", @@ -2082,168 +2095,81 @@ const idclass_t config_class = { }, { .type = PT_STR, - .id = "server_name", - .name = N_("Tvheadend server name"), - .desc = N_("Set the name of the server so you can distinguish " - "multiple instances apart."), - .off = offsetof(config_t, server_name), - .group = 1 - }, - { - .type = PT_STR, - .id = "http_server_name", - .name = N_("HTTP server name"), - .desc = N_("The server name for 'Server:' HTTP headers."), - .off = offsetof(config_t, http_server_name), - .opts = PO_HIDDEN | PO_EXPERT, - .group = 1 + .id = "language_ui", + .name = N_("Default language"), + .desc = N_("The default language to use if the user " + " language isn't set (in the Access Entries tab)."), + .list = language_get_ui_list, + .off = offsetof(config_t, language_ui), + .group = 2 }, { .type = PT_STR, - .id = "http_realm_name", - .name = N_("HTTP realm name"), - .desc = N_("The realm name for HTTP authorization."), - .off = offsetof(config_t, realm), - .opts = PO_HIDDEN | PO_EXPERT, - .group = 1 + .id = "theme_ui", + .name = N_("Theme"), + .desc = N_("The default web interface theme, if a user-specific " + "one isn't set (in the Access Entries tab)."), + .doc = prop_doc_themes, + .list = theme_get_ui_list, + .off = offsetof(config_t, theme_ui), + .opts = PO_DOC_NLIST, + .group = 2 }, { .type = PT_BOOL, - .id = "hbbtv", - .name = N_("Parse HbbTV info"), - .desc = N_("Parse HbbTV information from services."), - .off = offsetof(config_t, hbbtv), - .group = 1 + .id = "ui_quicktips", + .name = N_("Tooltips"), + .desc = N_("Enable/Disable web interface mouse-over tooltips."), + .off = offsetof(config_t, ui_quicktips), + .opts = PO_ADVANCED, + .group = 2 }, { .type = PT_INT, .id = "uilevel", - .name = N_("User interface level"), - .desc = N_("Sets the default interface view level (next to the " + .name = N_("Default view level"), + .desc = N_("The default interface view level (next to the " "Help button)."), .doc = prop_doc_viewlevel_config, .off = offsetof(config_t, uilevel), .list = config_class_uilevel, .opts = PO_DOC_NLIST, - .group = 1 + .group = 2 }, { .type = PT_BOOL, .id = "uilevel_nochange", - .name = N_("Persistent user interface level"), - .desc = N_("Prevent users from overriding the user " - "interface level setting, and remove the view level " - "drop-dowm from the interface."), + .name = N_("Persistent view level"), + .desc = N_("Prevent users from overriding the view level " + "setting. This option shows or hides the View level " + "drop-down (next to the Help button)."), .off = offsetof(config_t, uilevel_nochange), .opts = PO_ADVANCED, - .group = 1 - }, - { - .type = PT_BOOL, - .id = "ui_quicktips", - .name = N_("User interface quick tips (tooltips)"), - .desc = N_("Enable/disable interface quick tips."), - .off = offsetof(config_t, ui_quicktips), - .opts = PO_ADVANCED, - .group = 1 - }, - { - .type = PT_BOOL, - .id = "digest", - .name = N_("Use HTTP digest authentication"), - .desc = N_("Digest access authentication is intended as a security trade-off. " - "It is intended to replace unencrypted HTTP basic access authentication. " - "This option should be enabled for standard usage."), - .off = offsetof(config_t, digest), - .opts = PO_EXPERT, - .group = 1 - }, - { - .type = PT_BOOL, - .id = "proxy", - .name = N_("Use PROXY protocol & X-Forwarded-For"), - .desc = N_("PROXY protocol is an extension for support incoming " - "TCP connections from a remote server (like a firewall) " - "sending the original IP address of the client. " - "The HTTP header 'X-Forwarded-For' do the same with " - "HTTP connections. Both enable tunneled connections." - "This option should be disabled for standard usage."), - .off = offsetof(config_t, proxy), - .opts = PO_EXPERT, - .group = 1 - }, - { - .type = PT_U32, - .intextra = INTEXTRA_RANGE(1, 0x7ff, 1), - .id = "cookie_expires", - .name = N_("Cookie expiration (days)"), - .desc = N_("The number of days cookies set by Tvheadend should " - "expire."), - .off = offsetof(config_t, cookie_expires), - .opts = PO_EXPERT, - .group = 1 - }, - { - .type = PT_STR, - .id = "cors_origin", - .name = N_("HTTP CORS origin"), - .desc = N_("HTTP CORS (cross-origin resource sharing) origin. This " - "option is usually set when Tvheadend is behind a " - "proxy. Enter a domain (or IP) to allow " - "cross-domain requests."), - .set = config_class_cors_origin_set, - .off = offsetof(config_t, cors_origin), - .opts = PO_EXPERT, - .group = 1 - }, - { - .type = PT_INT, - .id = "dscp", - .name = N_("DSCP/TOS for streaming"), - .desc = N_("Differentiated Services Code Point / Type of " - "Service: Set the service class Tvheadend sends " - "with each packet. Depending on the option selected " - "this tells your router the prority in which to " - "give packets sent from Tvheadend, this option does " - "not usually need changing. See " - "https://en.wikipedia.org/wiki/" - "Differentiated_services for more information. "), - .off = offsetof(config_t, dscp), - .list = config_class_dscp_list, - .opts = PO_EXPERT | PO_DOC_NLIST, - .group = 1 + .group = 2 }, { .type = PT_BOOL, .id = "caclient_ui", - .name = N_("Conditional Access"), - .desc = N_("Enable the CAs (conditional accesses) tab in web user interface " - "for the advanced level. By default, this tab is visible only " - "in the expert level."), + .name = N_("Conditional Access (for advanced view level)"), + .desc = N_("Enable/Disable the CAs (conditional accesses) tab " + "for the advanced view level. By default, it's " + "visible only to the Expert level."), .off = offsetof(config_t, caclient_ui), .opts = PO_ADVANCED, - .group = 1 - }, - { - .type = PT_U32, - .id = "descrambler_buffer", - .name = N_("Descrambler buffer (TS packets)"), - .desc = N_("The number of MPEG-TS packets Tvheadend buffers in case " - "there is a delay receiving CA keys. "), - .off = offsetof(config_t, descrambler_buffer), - .opts = PO_EXPERT, - .group = 1 + .group = 2 }, { - .type = PT_BOOL, - .id = "parser_backlog", - .name = N_("Use packet backlog"), - .desc = N_("Send previous stream frames to upper layers " - "(before frame start is signalled in the stream). " - "It may cause issues with some clients / players."), - .off = offsetof(config_t, parser_backlog), - .opts = PO_EXPERT, - .group = 1 + .type = PT_STR, + .islist = 1, + .id = "info_area", + .name = N_("Information area"), + .desc = N_("Show, hide and sort the various details that " + "appear on the interface next to the About tab."), + .set = config_class_info_area_set, + .get = config_class_info_area_get, + .list = config_class_info_area_list, + .opts = PO_LORDER | PO_ADVANCED | PO_DOC_NLIST, + .group = 2 }, { .type = PT_STR, @@ -2258,7 +2184,7 @@ const idclass_t config_class = { .get = config_class_language_get, .list = config_class_language_list, .opts = PO_LORDER, - .group = 2 + .group = 3 }, #if ENABLE_ZLIB { @@ -2270,7 +2196,7 @@ const idclass_t config_class = { .off = offsetof(config_t, epg_compress), .opts = PO_EXPERT, .def.i = 1, - .group = 2 + .group = 3 }, #endif { @@ -2280,7 +2206,7 @@ const idclass_t config_class = { .desc = N_("The time window to cut the stop time from the overlapped event in seconds."), .off = offsetof(config_t, epg_cut_window), .opts = PO_EXPERT, - .group = 2 + .group = 3 }, { .type = PT_U32, @@ -2290,55 +2216,133 @@ const idclass_t config_class = { "the EPG event is changed (in seconds)."), .off = offsetof(config_t, epg_update_window), .opts = PO_EXPERT, - .group = 2 + .group = 3 + }, + { + .type = PT_BOOL, + .id = "prefer_picon", + .name = N_("Prefer picons over channel icons"), + .desc = N_("If both a picon and a channel-specific " + "(e.g. channelname.jpg) icon are defined, prefer the picon."), + .off = offsetof(config_t, prefer_picon), + .opts = PO_ADVANCED, + .group = 4, }, { .type = PT_STR, - .islist = 1, - .id = "info_area", - .name = N_("Information area"), - .desc = N_("Show, hide and sort the various details that " - "appear on the interface next to the About tab."), - .set = config_class_info_area_set, - .get = config_class_info_area_get, - .list = config_class_info_area_list, - .opts = PO_LORDER | PO_ADVANCED | PO_DOC_NLIST, - .group = 3 + .id = "chiconpath", + .name = N_("Channel icon path"), + .desc = N_("Path to an icon for this channel. This can be " + "named however you wish, as either a local " + "(file://) or remote (http://) image. " + "See Help for more infomation."), + .off = offsetof(config_t, chicon_path), + .doc = prop_doc_config_channelicon_path, + .opts = PO_ADVANCED, + .group = 4, + }, + { + .type = PT_INT, + .id = "chiconscheme", + .name = N_("Channel icon name scheme"), + .desc = N_("Scheme to generate the channel icon names " + "(all lower-case, service name picons etc.)."), + .list = config_class_chiconscheme_list, + .doc = prop_doc_config_channelname_scheme, + .off = offsetof(config_t, chicon_scheme), + .opts = PO_ADVANCED | PO_DOC_NLIST, + .group = 4, }, { .type = PT_STR, - .id = "language_ui", - .name = N_("User language"), - .desc = N_("The default language to use if the user " - " language isn't set in the Access Entries tab."), - .list = language_get_ui_list, - .off = offsetof(config_t, language_ui), - .group = 3 + .id = "piconpath", + .name = N_("Picon path"), + .desc = N_("Path to a directory (folder) containing your picon " + "collection. See Help for more detailed " + "information."), + .doc = prop_doc_config_picon_path, + .off = offsetof(config_t, picon_path), + .opts = PO_ADVANCED, + .group = 4, + }, + { + .type = PT_INT, + .id = "piconscheme", + .name = N_("Picon name scheme"), + .desc = N_("Select scheme to generate the picon names " + "(standard, force service type to 1)"), + .list = config_class_piconscheme_list, + .doc = prop_doc_config_picon_servicetype, + .off = offsetof(config_t, picon_scheme), + .opts = PO_ADVANCED | PO_DOC_NLIST, + .group = 4, }, { .type = PT_STR, - .id = "theme_ui", - .name = N_("Theme"), - .desc = N_("The default web interface to use if the user " - " theme isn't set in the Access Entries tab."), - .doc = prop_doc_themes, - .list = theme_get_ui_list, - .off = offsetof(config_t, theme_ui), - .opts = PO_DOC_NLIST, - .group = 3 + .id = "http_server_name", + .name = N_("Server name"), + .desc = N_("The server name for 'Server:' HTTP headers."), + .off = offsetof(config_t, http_server_name), + .opts = PO_HIDDEN | PO_EXPERT, + .group = 5 }, { .type = PT_STR, - .id = "muxconfpath", - .name = N_("DVB scan files path"), - .desc = N_("Select the path to use for DVB scan configuration " - "files. Typically dvb-apps stores these in " - "/usr/share/dvb/. Leave blank to use the " - "internal file set."), - .off = offsetof(config_t, muxconf_path), - .notify = config_muxconfpath_notify, - .opts = PO_ADVANCED, - .group = 4 + .id = "http_realm_name", + .name = N_("Realm name"), + .desc = N_("The realm name for HTTP authorization."), + .off = offsetof(config_t, realm), + .opts = PO_HIDDEN | PO_EXPERT, + .group = 5 + }, + { + .type = PT_BOOL, + .id = "digest", + .name = N_("Digest authentication"), + .desc = N_("Digest access authentication is intended as a security trade-off. " + "It is intended to replace unencrypted HTTP basic access authentication. " + "This option should be enabled for standard usage."), + .off = offsetof(config_t, digest), + .opts = PO_EXPERT, + .group = 5 + }, + { + .type = PT_U32, + .intextra = INTEXTRA_RANGE(1, 0x7ff, 1), + .id = "cookie_expires", + .name = N_("Cookie expiration (days)"), + .desc = N_("The number of days cookies set by Tvheadend should " + "expire."), + .off = offsetof(config_t, cookie_expires), + .opts = PO_EXPERT, + .group = 5 + }, + { + .type = PT_BOOL, + .id = "proxy", + .name = N_("PROXY protocol & X-Forwarded-For"), + .desc = N_("PROXY protocol is an extension for support incoming " + "TCP connections from a remote server (like a firewall) " + "sending the original IP address of the client. " + "The HTTP header 'X-Forwarded-For' do the same with " + "HTTP connections. Both enable tunneled connections." + "This option should be disabled for standard usage."), + .off = offsetof(config_t, proxy), + .opts = PO_EXPERT, + .group = 5 + }, + { + .type = PT_STR, + .id = "cors_origin", + .name = N_("CORS origin"), + .desc = N_("HTTP CORS (cross-origin resource sharing) origin. This " + "option is usually set when Tvheadend is behind a " + "proxy. Enter a domain (or IP) to allow " + "cross-domain requests."), + .set = config_class_cors_origin_set, + .off = offsetof(config_t, cors_origin), + .opts = PO_EXPERT, + .group = 5 }, { .type = PT_BOOL, @@ -2349,7 +2353,7 @@ const idclass_t config_class = { "the system clock (normally only root)."), .off = offsetof(config_t, tvhtime_update_enabled), .opts = PO_EXPERT, - .group = 5, + .group = 6, }, { .type = PT_BOOL, @@ -2361,7 +2365,7 @@ const idclass_t config_class = { "performance is not that great."), .off = offsetof(config_t, tvhtime_ntp_enabled), .opts = PO_EXPERT, - .group = 5, + .group = 6, }, { .type = PT_U32, @@ -2373,66 +2377,66 @@ const idclass_t config_class = { "excessive oscillations on the system clock."), .off = offsetof(config_t, tvhtime_tolerance), .opts = PO_EXPERT, - .group = 5, + .group = 6, }, { - .type = PT_BOOL, - .id = "prefer_picon", - .name = N_("Prefer picons over channel name"), - .desc = N_("If both a picon and a channel-specific " - "(e.g. channelname.jpg) icon are defined, prefer the picon."), - .off = offsetof(config_t, prefer_picon), - .opts = PO_ADVANCED, - .group = 6, + .type = PT_INT, + .id = "dscp", + .name = N_("DSCP/TOS for streaming"), + .desc = N_("Differentiated Services Code Point / Type of " + "Service: Set the service class Tvheadend sends " + "with each packet. Depending on the option selected " + "this tells your router the prority in which to " + "give packets sent from Tvheadend, this option does " + "not usually need changing. See " + "https://en.wikipedia.org/wiki/" + "Differentiated_services for more information. "), + .off = offsetof(config_t, dscp), + .list = config_class_dscp_list, + .opts = PO_EXPERT | PO_DOC_NLIST, + .group = 7 }, { - .type = PT_STR, - .id = "chiconpath", - .name = N_("Channel icon path"), - .desc = N_("Path to an icon for this channel. This can be " - "named however you wish, as either a local " - "(file://) or remote (http://) image. " - "See Help for more infomation."), - .off = offsetof(config_t, chicon_path), - .doc = prop_doc_config_channelicon_path, - .opts = PO_ADVANCED, - .group = 6, + .type = PT_U32, + .id = "descrambler_buffer", + .name = N_("Descrambler buffer (TS packets)"), + .desc = N_("The number of MPEG-TS packets Tvheadend buffers in case " + "there is a delay receiving CA keys. "), + .off = offsetof(config_t, descrambler_buffer), + .opts = PO_EXPERT, + .group = 7 }, { - .type = PT_INT, - .id = "chiconscheme", - .name = N_("Channel icon name scheme"), - .desc = N_("Scheme to generate the channel icon names " - "(all lower-case, service name picons etc.)."), - .list = config_class_chiconscheme_list, - .doc = prop_doc_config_channelname_scheme, - .off = offsetof(config_t, chicon_scheme), - .opts = PO_ADVANCED | PO_DOC_NLIST, - .group = 6, + .type = PT_BOOL, + .id = "parser_backlog", + .name = N_("Packet backlog"), + .desc = N_("Send previous stream frames to upper layers " + "(before frame start is signalled in the stream). " + "It may cause issues with some clients / players."), + .off = offsetof(config_t, parser_backlog), + .opts = PO_EXPERT, + .group = 7 }, { .type = PT_STR, - .id = "piconpath", - .name = N_("Picon path"), - .desc = N_("Path to a directory (folder) containing your picon " - "collection. See Help for more detailed " - "information."), - .doc = prop_doc_config_picon_path, - .off = offsetof(config_t, picon_path), + .id = "muxconfpath", + .name = N_("DVB scan files path"), + .desc = N_("Select the path to use for DVB scan configuration " + "files. Typically dvb-apps stores these in " + "/usr/share/dvb/. Leave blank to use the " + "internal file set."), + .off = offsetof(config_t, muxconf_path), + .notify = config_muxconfpath_notify, .opts = PO_ADVANCED, - .group = 6, + .group = 7 }, { - .type = PT_INT, - .id = "piconscheme", - .name = N_("Picon name scheme"), - .desc = N_("Select scheme to generate the picon names " - "(standard, force service type to 1)"), - .list = config_class_piconscheme_list, - .doc = prop_doc_config_picon_servicetype, - .off = offsetof(config_t, picon_scheme), - .opts = PO_ADVANCED | PO_DOC_NLIST, - .group = 6, + .type = PT_BOOL, + .id = "hbbtv", + .name = N_("Parse HbbTV info"), + .desc = N_("Parse HbbTV information from services."), + .off = offsetof(config_t, hbbtv), + .group = 7 }, { .type = PT_STR,