Formatting fixes.

SVN revision: 32023
This commit is contained in:
Christopher Michael 2007-10-09 01:30:25 +00:00
parent d4b558c61c
commit 3fc626dc40
1 changed files with 61 additions and 55 deletions

View File

@ -2653,18 +2653,22 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
#define CMP(x) ((dev) && (e_util_glob_case_match(dev, x))) #define CMP(x) ((dev) && (e_util_glob_case_match(dev, x)))
#define PRT(args...) snprintf(buf, sizeof(buf), ##args) #define PRT(args...) snprintf(buf, sizeof(buf), ##args)
if (CMP("/")) { if (CMP("/"))
{
PRT("%s", path); PRT("%s", path);
} }
else if (CMP("~/")) { else if (CMP("~/"))
{
s = (char *)e_user_homedir_get(); s = (char *)e_user_homedir_get();
PRT("%s%s", s, path); PRT("%s%s", s, path);
} }
else if (dev[0] == '/') { else if (dev[0] == '/')
{
/* dev is a full path - consider it a mountpoint device on its own */ /* dev is a full path - consider it a mountpoint device on its own */
PRT("%s%s", dev, path); PRT("%s%s", dev, path);
} }
else if (CMP("favorites")) { else if (CMP("favorites"))
{
/* this is a virtual device - it's where your favorites list is /* this is a virtual device - it's where your favorites list is
* stored - a dir with * stored - a dir with
.desktop files or symlinks (in fact anything .desktop files or symlinks (in fact anything
@ -2673,7 +2677,8 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
s = (char *)e_user_homedir_get(); s = (char *)e_user_homedir_get();
PRT("%s/.e/e/fileman/favorites", s); PRT("%s/.e/e/fileman/favorites", s);
} }
else if (CMP("desktop")) { else if (CMP("desktop"))
{
/* this is a virtual device - it's where your favorites list is /* this is a virtual device - it's where your favorites list is
* stored - a dir with * stored - a dir with
.desktop files or symlinks (in fact anything .desktop files or symlinks (in fact anything
@ -2691,21 +2696,22 @@ _e_fm2_dev_path_map(const char *dev, const char *path)
ecore_file_mkpath(buf); ecore_file_mkpath(buf);
} }
} }
else if (CMP("removable:*")) { else if (CMP("removable:*"))
{
E_Volume *v; E_Volume *v;
v = e_volume_find(dev + strlen("removable:")); v = e_volume_find(dev + strlen("removable:"));
if (v) if (v)
{
snprintf(buf, sizeof(buf), "/media/%s", v->mount_point); snprintf(buf, sizeof(buf), "/media/%s", v->mount_point);
} }
} else if (CMP("dvd") || CMP("dvd-*"))
else if (CMP("dvd") || CMP("dvd-*")) { {
/* FIXME: find dvd mountpoint optionally for dvd no. X */ /* FIXME: find dvd mountpoint optionally for dvd no. X */
/* maybe make part of the device mappings config? */ /* maybe make part of the device mappings config? */
} }
else if (CMP("cd") || CMP("cd-*") || CMP("cdrom") || CMP("cdrom-*") || else if (CMP("cd") || CMP("cd-*") || CMP("cdrom") || CMP("cdrom-*") ||
CMP("dvd") || CMP("dvd-*")) { CMP("dvd") || CMP("dvd-*"))
{
/* FIXME: find cdrom or dvd mountpoint optionally for cd/dvd no. X */ /* FIXME: find cdrom or dvd mountpoint optionally for cd/dvd no. X */
/* maybe make part of the device mappings config? */ /* maybe make part of the device mappings config? */
} }