| | 1012 | | static void theme_show(THEME_SEARCH_REC *rec, const char *key, const char *value, int reset) | | | 1013 | | { | | | 1014 | | MODULE_THEME_REC *theme; | | | 1015 | | FORMAT_REC *formats; | | | 1016 | | const char *text, *last_title; | | | 1017 | | int n, first; | | | 1018 | | | | | 1019 | | formats = g_hash_table_lookup(default_formats, rec->name); | | | 1020 | | theme = g_hash_table_lookup(current_theme->modules, rec->name); | | | 1021 | | | | | 1022 | | last_title = NULL; first = TRUE;
| | | 1023 | | for (n = 1; formats[n].def != NULL; n++) {
| | | 1024 | | text = theme != NULL && theme->formats[n] != NULL ?
| | | 1025 | | theme->formats[n] : formats[n].def; | | | 1026 | | | | | 1027 | | if (formats[n].tag == NULL)
| | | 1028 | | last_title = text; | | | 1029 | | else if ((value != NULL && key != NULL && g_strcasecmp(formats[n].tag, key) == 0) ||
| | | 1030 | | (value == NULL && (key == NULL || stristr(formats[n].tag, key) != NULL))) {
| | | 1031 | | if (first) { | | | 1032 | | printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_TITLE, rec->short_name, formats[0].def);
| | | 1033 | | first = FALSE;
| | | 1034 | | } | | | 1035 | | if (last_title != NULL)
| | | 1036 | | printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_SUBTITLE, last_title);
| | | 1037 | | if (reset || value != NULL) {
|
|