diff -urN aa/desktop-file-utils-0.8/src/menu-entries.c desktop-file-utils-0.8/src/menu-entries.c --- aa/desktop-file-utils-0.8/src/menu-entries.c 2004-09-07 18:17:31.251622656 +0200 +++ desktop-file-utils-0.8/src/menu-entries.c 2004-09-07 18:29:07.293808160 +0200 @@ -2027,12 +2027,14 @@ } static Entry* -entry_new_directory_from_file (const char *filename, +entry_new_directory_from_file (EntryCache *cache, + const char *filename, const char *basename) { char *str; GError *err; char *nodisplay_str; + char *onlyshowin; gboolean nodisplay; str = NULL; @@ -2058,6 +2060,35 @@ g_free (nodisplay_str); } + + if (cache->only_show_in_name && nodisplay == FALSE) + { + onlyshowin = find_value (str, "OnlyShowIn"); + + if (onlyshowin != NULL) + { + char **split; + int i; + + nodisplay = TRUE; + + split = string_list_from_desktop_value (onlyshowin); + i = 0; + while (split[i] != NULL) + { + if (strcmp (split[i], cache->only_show_in_name) == 0) + { + nodisplay = FALSE; + break; + } + + ++i; + } + + g_strfreev (split); + g_free (onlyshowin); + } + } return entry_new (ENTRY_DIRECTORY, basename, filename, nodisplay); } @@ -2162,7 +2193,7 @@ { Entry *e; - e = entry_new_directory_from_file (fullpath, dent->d_name); + e = entry_new_directory_from_file (dir->cache, fullpath, dent->d_name); menu_verbose ("Tried loading \"%s\": %s\n", fullpath, e ? "ok" : "failed");