The Efreet_Desktop to edit should be unique

Use efreet_desktop_uncached_new to get a unique copy of a Efreet_Desktop
read from disk. This way the editor wont interfere with the running
system. Any changes to .desktop files must then be caught by file
monitoring.

SVN revision: 47251
This commit is contained in:
Sebastian Dransfeld 2010-03-15 19:58:12 +00:00
parent df3346704f
commit 39bb11a264
2 changed files with 2 additions and 6 deletions

View File

@ -275,7 +275,7 @@ _e_desktop_edit_create_data(E_Config_Dialog *cfd)
snprintf(dir, sizeof(dir), "%s/applications", efreet_data_home_get());
if (!strncmp(dir, cfdata->editor->desktop->orig_path, strlen(dir)))
cfdata->desktop = cfdata->editor->desktop;
cfdata->desktop = efreet_desktop_uncached_new(cfdata->editor->desktop->orig_path);
else
{
/* file not in user's dir, so create new desktop that points there */
@ -289,16 +289,13 @@ _e_desktop_edit_create_data(E_Config_Dialog *cfd)
* provide a means to edit a file in a system dir when one
* exists in the user's
*/
cfdata->desktop = efreet_desktop_get(path);
cfdata->desktop = efreet_desktop_uncached_new(path);
}
desktop = cfdata->editor->desktop;
}
if (!cfdata->desktop)
{
cfdata->desktop = efreet_desktop_empty_new(path);
cfdata->editor->new_desktop = 1;
}
if (!desktop) desktop = cfdata->desktop;

View File

@ -29,7 +29,6 @@ struct _E_Desktop_Edit
//int img_set;
char *tmp_image_path;
int new_desktop;
int saved; /* whether desktop has been saved or not */
E_Config_Dialog *cfd;