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