X-Git-Url: http://pileus.org/git/?p=site;a=blobdiff_plain;f=src%2Fmain.c;h=7887528ca44066a75ef68ad37866f33f806e23b7;hp=71f8b40254e9dfc4845772d90e5bf30a9a81a62d;hb=de368235a985ac538bd3dcad2401e3ec545da38c;hpb=9d8c8e797c0d5d82dffa63686806c513d5699d1b diff --git a/src/main.c b/src/main.c index 71f8b40..7887528 100644 --- a/src/main.c +++ b/src/main.c @@ -140,6 +140,8 @@ menu_t *get_menu_rec(char *prefix, char **parts) if (nameval) next->name = nameval; if (!next->path) next->path = g_strdup(entries[i]); if (!next->name) next->name = g_strdup(entries[i]); + if (!parts[0] && !strcmp(next->base, "index")) + next->show = SHOW_ACTIVE; cur = cur->next = next; } g_strfreev(entries); @@ -153,6 +155,8 @@ menu_t *get_menu_rec(char *prefix, char **parts) continue; if ((next = get_menu_entry(prefix, entries[i]))) cur = cur->next = next; + if (!strcmp(cur->base, "index")) + cur->show = SHOW_HIDDEN; } g_strfreev(entries); g_key_file_free(conf); @@ -165,8 +169,6 @@ menu_t *get_menu_rec(char *prefix, char **parts) cur->kids = get_menu_rec(cur->path, parts+1); cur->show = SHOW_ACTIVE; } - if (!strcmp(cur->base, "index")) - cur->show = SHOW_HIDDEN; } error: