Enlightenment CVS committal Author : englebass Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_order.c Log Message: .order file saving. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_order.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_order.c 24 Mar 2007 23:33:59 -0000 1.4 +++ e_order.c 24 Mar 2007 23:41:24 -0000 1.5 @@ -10,6 +10,7 @@ static void _e_order_free (E_Order *eo); static void _e_order_cb_monitor (void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path); +static void _e_order_save (E_Order *eo); EAPI E_Order * e_order_new(const char *path) @@ -68,4 +69,33 @@ _e_order_cb_monitor(void *data, Ecore_File_Monitor *em, Ecore_File_Event event, const char *path) { /* TODO */ +} + +static void +_e_order_save(E_Order *eo) +{ + FILE *f; + Evas_List *l; + + f = fopen(eo->path, "wb"); + if (!f) return; + + for (l = eo->desktops; l; l = l->next) + { + Efreet_Desktop *desktop; + char *id, *path; + + /* TODO: This only allows us to save .desktop files which are in + * the default paths. If it isn't, we should copy it to the users + * application directory */ + desktop = l->data; + path = efreet_util_path_in_default("applications", desktop->orig_path); + if (!path) continue; + id = efreet_util_path_to_file_id(path, desktop->orig_path); + fprintf(f, "%s\n", id); + free(id); + free(path); + } + + fclose(f); } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs