]> git.pld-linux.org Git - packages/desktop-file-utils.git/blame - desktop-file-utils-notshowin.patch
- moved from desktop-file-utils-directory_notshowin.patch
[packages/desktop-file-utils.git] / desktop-file-utils-notshowin.patch
CommitLineData
becffd9c 1diff -urN aa/desktop-file-utils-0.8/src/menu-entries.c desktop-file-utils-0.8/src/menu-entries.c
2--- aa/desktop-file-utils-0.8/src/menu-entries.c 2004-09-03 00:05:27.000000000 +0200
3+++ desktop-file-utils-0.8/src/menu-entries.c 2004-09-07 17:56:17.089324768 +0200
4@@ -1966,6 +1966,50 @@
5 return NULL;
6 }
7 }
8+
9+ if (cache->only_show_in_name)
10+ {
11+ char *notshowin;
12+ gboolean show;
13+
14+ show = TRUE;
15+
16+ notshowin = find_value (str, "NotShowIn");
17+
18+ if (notshowin != NULL)
19+ {
20+ char **split;
21+ int i;
22+
23+ show = TRUE;
24+
25+ split = string_list_from_desktop_value (notshowin);
26+ i = 0;
27+ while (split[i] != NULL)
28+ {
29+ if (strcmp (split[i], cache->only_show_in_name) == 0)
30+ {
31+ show = FALSE;
32+ break;
33+ }
34+
35+ ++i;
36+ }
37+
38+ if (!show)
39+ menu_verbose ("Not showing \"%s\" due to NotShowIn=%s\n",
40+ filename, notshowin);
41+
42+ g_strfreev (split);
43+ g_free (notshowin);
44+ }
45+
46+ if (!show)
47+ {
48+ g_free (str);
49+ return NULL;
50+ }
51+ }
52
53 e = entry_new (ENTRY_DESKTOP, basename, filename, FALSE);
54
This page took 0.062321 seconds and 4 git commands to generate.