Use .desktop saving.

SVN revision: 25245
This commit is contained in:
David Walter Seikel 2006-08-31 12:11:20 +00:00
parent 40aa3ecdce
commit 52bdc649e9
1 changed files with 137 additions and 95 deletions

View File

@ -1321,12 +1321,52 @@ _e_app_localized_val_get(Eet_File *ef, const char *lang, const char *field, int
EAPI void
e_app_fields_save(E_App *a)
{
Eet_File *ef;
char buf[PATH_MAX];
const char *lang;
const char *lang, *ext;
/* FIXME: if there is no path, put it in applications/all/a->name.desktop. */
ext = strrchr(a->path, '.');
if ((ext) && (strcmp(ext, ".desktop") == 0))
{ /* It's a .desktop file. */
Ecore_Desktop *desktop;
int created = 0;
desktop = ecore_desktop_get(a->path, NULL);
if (!desktop)
{
desktop = E_NEW(Ecore_Desktop, 1);
created = 1;
}
if (desktop)
{
desktop->eap_name = (char *) a->path;
desktop->name = (char *) a->name;
desktop->generic = (char *) a->generic;
desktop->comment = (char *) a->comment;
desktop->exec = (char *) a->exe;
desktop->icon_class = (char *) a->icon_class;
desktop->icon_path = (char *) a->icon_path;
desktop->window_class = (char *) a->win_class;
if (a->startup_notify)
desktop->startup = "1";
else
desktop->startup = "0";
desktop->type = "Application";
// desktop.categories = a->categories;
ecore_desktop_save(desktop);
if (created)
E_FREE(desktop);
}
}
else
{ /* Must be an .eap file. */
Eet_File *ef;
unsigned char tmp[1];
// int img;
// if ((!a->path) || (!ecore_file_exists(a->path)))
// {
_e_app_new_save(a);
@ -1427,6 +1467,8 @@ e_app_fields_save(E_App *a)
}
*/
eet_close(ef);
}
if (a->parent)
{
Evas_List *l;