]> git.pld-linux.org Git - packages/desktop-file-utils.git/commitdiff
- support for NoShowIn in .directory files
authorgrzegol <grzegol@pld-linux.org>
Wed, 28 Jul 2004 20:28:38 +0000 (20:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    desktop-file-utils-directory_noshowin.patch -> 1.1

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

diff --git a/desktop-file-utils-directory_noshowin.patch b/desktop-file-utils-directory_noshowin.patch
new file mode 100644 (file)
index 0000000..aa6b255
--- /dev/null
@@ -0,0 +1,51 @@
+diff -urN aa/desktop-file-utils-0.7/src/menu-entries.c desktop-file-utils-0.7/src/menu-entries.c
+--- aa/desktop-file-utils-0.7/src/menu-entries.c       2004-07-28 22:11:07.960290344 +0200
++++ desktop-file-utils-0.7/src/menu-entries.c  2004-07-28 22:13:30.869564832 +0200
+@@ -1980,6 +1980,47 @@
+               g_free (onlyshowin);          
+       }
+       /* End checking for OnlyShowIn */
++
++      if (!show)
++      {
++              e = entry_new (ENTRY_DIRECTORY, basename, filename, show);
++              g_free (str);
++              return e;
++      }
++      
++      /* Check for NoShowIn */
++      char *noshowin;
++
++      show = TRUE;
++
++      noshowin = find_value (str, "NoShowIn");
++
++      if (noshowin != NULL)
++      {
++              char **split;
++              int i;
++
++              split = string_list_from_desktop_value (noshowin);
++              i = 0;
++              while (split[i] != NULL)
++              {
++                      if (strcmp (split[i], "GNOME") == 0)
++                      {
++                              show = FALSE;
++                              break;
++                      }
++
++                      ++i;
++              }
++
++              if (!show)
++                      menu_verbose ("Not showing \"%s\" due to NoShowIn=%s\n",
++                              filename, noshowin);
++
++              g_strfreev (split);
++              g_free (noshowin);          
++      }
++      /* End checking for NoShowIn */
+       
+       if (!show)
+       {
This page took 0.062945 seconds and 4 git commands to generate.