]> git.pld-linux.org Git - packages/desktop-file-utils.git/commitdiff
- moved from desktop-file-utils-notshowin.patch
authorgrzegol <grzegol@pld-linux.org>
Tue, 7 Sep 2004 16:52:08 +0000 (16:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    desktop-file-utils-notshowin.patch -> 1.1

desktop-file-utils-notshowin.patch [new file with mode: 0644]

diff --git a/desktop-file-utils-notshowin.patch b/desktop-file-utils-notshowin.patch
new file mode 100644 (file)
index 0000000..e78458c
--- /dev/null
@@ -0,0 +1,54 @@
+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-03 00:05:27.000000000 +0200
++++ desktop-file-utils-0.8/src/menu-entries.c  2004-09-07 17:56:17.089324768 +0200
+@@ -1966,6 +1966,50 @@
+           return NULL;
+         }
+     }
++      
++  if (cache->only_show_in_name)
++    {
++      char *notshowin;
++      gboolean show;
++
++      show = TRUE;
++      
++      notshowin = find_value (str, "NotShowIn");
++  
++      if (notshowin != NULL)
++        {
++          char **split;
++          int i;
++
++          show = TRUE;
++          
++          split = string_list_from_desktop_value (notshowin);
++          i = 0;
++          while (split[i] != NULL)
++            {
++              if (strcmp (split[i], cache->only_show_in_name) == 0)
++                {
++                  show = FALSE;
++                  break;
++                }
++                  
++              ++i;
++            }
++
++          if (!show)
++            menu_verbose ("Not showing \"%s\" due to NotShowIn=%s\n",
++                          filename, notshowin);
++          
++          g_strfreev (split);
++          g_free (notshowin);          
++        }
++
++      if (!show)
++        {
++          g_free (str);
++          return NULL;
++        }
++    }
+   e = entry_new (ENTRY_DESKTOP, basename, filename, FALSE);
+   
This page took 0.070882 seconds and 4 git commands to generate.