]> git.pld-linux.org Git - packages/gnome-vfs2.git/commitdiff
- support for OnlyInShow entry in .desktop files
authorMarcin Krzyżanowski <marcin.krzyzanowski@hakore.com>
Sun, 14 Dec 2003 17:48:52 +0000 (17:48 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    gnome-vfs2-onlyshowin.patch -> 1.1

gnome-vfs2-onlyshowin.patch [new file with mode: 0644]

diff --git a/gnome-vfs2-onlyshowin.patch b/gnome-vfs2-onlyshowin.patch
new file mode 100644 (file)
index 0000000..942a1a7
--- /dev/null
@@ -0,0 +1,38 @@
+diff -Nuard gnome-vfs-2.4.1.orig/modules/vfolder/vfolder-common.c gnome-vfs-2.4.1/modules/vfolder/vfolder-common.c
+--- gnome-vfs-2.4.1.orig/modules/vfolder/vfolder-common.c      2003-09-27 17:42:52.000000000 +0200
++++ gnome-vfs-2.4.1/modules/vfolder/vfolder-common.c   2003-12-14 18:44:16.918460112 +0100
+@@ -201,7 +201,7 @@
+ entry_reload_if_needed (Entry *entry)
+ {
+       gboolean changed = FALSE;
+-      gchar *keywords, *deprecates;
++      gchar *keywords, *deprecates, *onlyshowin;
+       int i;
+       if (!entry->dirty)
+@@ -213,6 +213,25 @@
+                              "Deprecates",
+                              &deprecates);
++      entry_quick_read_keys (entry, 
++                             "OnlyShowIn",
++                             &onlyshowin,
++                             NULL,
++                             NULL);
++
++
++      if (onlyshowin) {
++              char **parsed = g_strsplit (onlyshowin, ";", -1);
++              gboolean show = FALSE;
++              
++              for (i = 0; parsed[i] != NULL; i++) {
++                      if (!g_ascii_strcasecmp(parsed[i],"GNOME"))
++                              show=TRUE;
++              }
++              
++              g_free (onlyshowin);
++              if (!show) return;
++      }
+       /* 
+        * Clear keywords from file, leaving only ones added from 
+        * the directory.
This page took 0.068309 seconds and 4 git commands to generate.