patches for imlib2 and e.

SVN revision: 30157
This commit is contained in:
Carsten Haitzler 2007-05-30 14:35:26 +00:00
parent 2984c9da36
commit cad2457e10
3 changed files with 19 additions and 18 deletions

View File

@ -2797,6 +2797,10 @@ _e_fm2_icon_fill(E_Fm2_Icon *ic, E_Fm2_Finfo *finf)
/* FIXME: end go away chunk */
}
if(S_ISDIR(ic->info.statinfo.st_mode))
{
ic->info.mime = evas_stringshare_add("x-directory/normal");
}
if (!ic->info.mime)
{
mime = e_fm_mime_filename_get(ic->info.file);

View File

@ -726,8 +726,7 @@ static E_Fwin_Exec_Type
_e_fwin_file_is_exec(E_Fm2_Icon_Info *ici)
{
/* special file or dir - can't exec anyway */
if ((S_ISDIR(ici->statinfo.st_mode)) ||
(S_ISCHR(ici->statinfo.st_mode)) ||
if ((S_ISCHR(ici->statinfo.st_mode)) ||
(S_ISBLK(ici->statinfo.st_mode)) ||
(S_ISFIFO(ici->statinfo.st_mode)) ||
(S_ISSOCK(ici->statinfo.st_mode)))
@ -936,22 +935,16 @@ _e_fwin_file_open_dialog(E_Fwin *fwin, Evas_List *files, int always)
{
if (ici->link)
{
if (!S_ISDIR(ici->statinfo.st_mode))
{
f = e_fm_mime_filename_get(ici->link);
mimes = evas_hash_del(mimes, f, (void *)1);
mimes = evas_hash_direct_add(mimes, f, (void *)1);
}
f = e_fm_mime_filename_get(ici->link);
mimes = evas_hash_del(mimes, f, (void *)1);
mimes = evas_hash_direct_add(mimes, f, (void *)1);
}
else
{
snprintf(buf, sizeof(buf), "%s/%s",
e_fm2_real_path_get(fwin->fm_obj), ici->file);
if (!S_ISDIR(ici->statinfo.st_mode))
{
mimes = evas_hash_del(mimes, ici->mime, (void *)1);
mimes = evas_hash_direct_add(mimes, ici->mime, (void *)1);
}
snprintf(buf, sizeof(buf), "%s/%s",
e_fm2_real_path_get(fwin->fm_obj), ici->file);
mimes = evas_hash_del(mimes, ici->mime, (void *)1);
mimes = evas_hash_direct_add(mimes, ici->mime, (void *)1);
}
}
}

View File

@ -888,11 +888,14 @@ e_util_desktop_menu_item_icon_add(Efreet_Desktop *desktop, const char *size, E_M
EAPI int
e_util_dir_check(const char *dir)
{
char msg[PATH_MAX];
if (!ecore_file_exists(dir))
{
if (!ecore_file_mkdir(dir))
if (!ecore_file_mkpath(dir))
{
e_util_dialog_show("Error creating the directory: %s. Check that you have correct permissions set.", dir);
snprintf (msg, sizeof (msg), "Failed to create directory: %s .<br>Check that you have correct permissions set.", dir);
e_util_dialog_show("Error creating directory", msg);
return 0;
}
}
@ -900,7 +903,8 @@ e_util_dir_check(const char *dir)
{
if (!ecore_file_is_dir(dir))
{
e_util_dialog_show("Error creating the directory: %s. A file of that name already exists.", dir);
snprintf (msg, sizeof (msg), "Failed to create directory: %s .<br>A file of that name already exists.", dir);
e_util_dialog_show("Error creating directory", msg);
return 0;
}
}