[Goodies-dev] How to initialize XfceDesktopEntry?
Hakan Erduman
hakan at erduman.de
Mon Oct 27 23:45:32 CET 2008
Please have a look at this code:
static const char *dotDesktopCategories [] =
{
N_("All"),
N_("Core"),
N_("Development"),
N_("Office"),
N_("Graphics"),
N_("Network"),
N_("AudioVideo"),
N_("Game"),
N_("Education"),
N_("System"),
N_("Filemanager"),
N_("Utility"),
NULL
};
void mpdPopulateClient(GList *list, const gchar *name) {
XfceDesktopEntry *info = xfce_desktop_entry_new(
name, dotDesktopCategories, 7);
if(info) {
LOG("Found MPD Client: ");
LOG(xfce_desktop_entry_get_file (info));
LOG("\n");
g_object_unref (info);
}
else {
LOG("Not found: ");
LOG(name);
LOG("\n");
}
}
void mpdPopulateClientList()
{
GList *list = g_list_alloc ();
mpdPopulateClient(list,
"/usr/share/applications/gmpc.desktop");
mpdPopulateClient(list,
"/usr/share/applications/sonata.desktop");
}
both files I call from mpdPopulateClientList exist on my system, yet
the output is always Not found. What am I doing wrong?
wkr,
herd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/goodies-dev/attachments/20081027/674d028e/attachment.pgp>
More information about the Goodies-dev
mailing list