2 * ROX-Filer, filer for the ROX desktop project
3 * Copyright (C) 2006, Thomas Leonard and others (see changelog for details).
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place, Suite 330, Boston, MA 02111-1307 USA
20 /* appinfo.c - querying the XMLwrapper.xml files */
22 /* Any valid application directory may contain a file called XMLwrapper.xml.
25 * <?xml version="1.0"?>
27 * <Summary>Tooltip text</Summary>
29 * <Purpose>...</Purpose>
30 * <Version>...</Version>
31 * <Authors>...</Authors>
32 * <License>...</License>
33 * <Homepage>...</Homepage>
38 * <Label xml:lang='en'>...</Label>
42 * <ROX:CanSetBackdrop/>
59 /****************************************************************
60 * EXTERNAL INTERFACE *
61 ****************************************************************/
63 /* Load the XMLwrapper file for this application.
65 * Returns a pointer to the XMLwrapper structure, or NULL if this isn't
66 * an application with a valid XMLwrapper file.
68 * g_object_unref() the result.
70 XMLwrapper
*appinfo_get(const gchar
*app_dir
, DirItem
*item
)
75 /* Is it even an application directory? */
76 if (item
->base_type
!= TYPE_DIRECTORY
||
77 !(item
->flags
& ITEM_FLAG_APPDIR
))
78 return NULL
; /* Not an application */
80 tmp
= g_strconcat(app_dir
, "/" APPINFO_FILENAME
, NULL
);
81 ai
= xml_cache_load(tmp
);