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:
parent
df3346704f
commit
39bb11a264
|
@ -275,7 +275,7 @@ _e_desktop_edit_create_data(E_Config_Dialog *cfd)
|
||||||
|
|
||||||
snprintf(dir, sizeof(dir), "%s/applications", efreet_data_home_get());
|
snprintf(dir, sizeof(dir), "%s/applications", efreet_data_home_get());
|
||||||
if (!strncmp(dir, cfdata->editor->desktop->orig_path, strlen(dir)))
|
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
|
else
|
||||||
{
|
{
|
||||||
/* file not in user's dir, so create new desktop that points there */
|
/* 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
|
* provide a means to edit a file in a system dir when one
|
||||||
* exists in the user's
|
* exists in the user's
|
||||||
*/
|
*/
|
||||||
cfdata->desktop = efreet_desktop_get(path);
|
cfdata->desktop = efreet_desktop_uncached_new(path);
|
||||||
}
|
}
|
||||||
desktop = cfdata->editor->desktop;
|
desktop = cfdata->editor->desktop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cfdata->desktop)
|
if (!cfdata->desktop)
|
||||||
{
|
|
||||||
cfdata->desktop = efreet_desktop_empty_new(path);
|
cfdata->desktop = efreet_desktop_empty_new(path);
|
||||||
cfdata->editor->new_desktop = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!desktop) desktop = cfdata->desktop;
|
if (!desktop) desktop = cfdata->desktop;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ struct _E_Desktop_Edit
|
||||||
//int img_set;
|
//int img_set;
|
||||||
|
|
||||||
char *tmp_image_path;
|
char *tmp_image_path;
|
||||||
int new_desktop;
|
|
||||||
int saved; /* whether desktop has been saved or not */
|
int saved; /* whether desktop has been saved or not */
|
||||||
|
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
|
|
Loading…
Reference in New Issue