Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_fm.c
Log Message:
handle multiple opens of the same mount
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -3 -r1.182 -r1.183
--- e_fm.c 17 Jun 2007 04:00:04 -0000 1.182
+++ e_fm.c 17 Jun 2007 04:16:50 -0000 1.183
@@ -186,6 +186,7 @@
void (*unmount_fail) (void *data);
void *data;
+ unsigned char mounted : 1;
unsigned char delete_me : 1;
};
@@ -495,6 +496,11 @@
if (dev) sd->dev = evas_stringshare_add(dev);
sd->path = evas_stringshare_add(path);
sd->realpath = _e_fm2_dev_path_map(sd->dev, sd->path);
+ _e_fm2_queue_free(obj);
+ _e_fm2_regions_free(obj);
+ _e_fm2_icons_free(obj);
+ edje_object_part_text_set(sd->overlay, "e.text.busy_label", "");
+
if ((sd->dev) && (!strncmp(sd->dev, "removable:", 10)))
{
E_Volume *v;
@@ -512,12 +518,7 @@
}
}
- _e_fm2_queue_free(obj);
- _e_fm2_regions_free(obj);
- _e_fm2_icons_free(obj);
- edje_object_part_text_set(sd->overlay, "e.text.busy_label", "");
-
- if (!sd->mount)
+ if ((!sd->mount) || (sd->mount->mounted))
{
_e_fm2_client_monitor_add(sd->id, sd->realpath);
sd->listing = 1;
@@ -1378,11 +1379,14 @@
{
m = l->data;
if ((!m->delete_me) && (!strcmp(m->udi, udi)) && (m->mount_ok))
- m->mount_ok(m->data);
- if (m->timeout)
{
- ecore_timer_del(m->timeout);
- m->timeout = NULL;
+ m->mounted = 1;
+ m->mount_ok(m->data);
+ if (m->timeout)
+ {
+ ecore_timer_del(m->timeout);
+ m->timeout = NULL;
+ }
}
}
_e_fm2_mount_flush();
@@ -1400,11 +1404,13 @@
{
m = l->data;
if ((!m->delete_me) && (!strcmp(m->udi, udi)) && (m->mount_fail))
- m->mount_fail(m->data);
- if (m->timeout)
{
- ecore_timer_del(m->timeout);
- m->timeout = NULL;
+ m->mount_fail(m->data);
+ if (m->timeout)
+ {
+ ecore_timer_del(m->timeout);
+ m->timeout = NULL;
+ }
}
}
_e_fm2_mount_flush();
@@ -1422,11 +1428,14 @@
{
m = l->data;
if ((!m->delete_me) && (!strcmp(m->udi, udi)) && (m->unmount_ok))
- m->unmount_ok(m->data);
- if (m->timeout)
{
- ecore_timer_del(m->timeout);
- m->timeout = NULL;
+ m->mounted = 0;
+ m->unmount_ok(m->data);
+ if (m->timeout)
+ {
+ ecore_timer_del(m->timeout);
+ m->timeout = NULL;
+ }
}
}
_e_fm2_mount_flush();
@@ -1444,11 +1453,13 @@
{
m = l->data;
if ((!m->delete_me) && (!strcmp(m->udi, udi)) && (m->unmount_fail))
- m->unmount_fail(m->data);
- if (m->timeout)
{
- ecore_timer_del(m->timeout);
- m->timeout = NULL;
+ m->unmount_fail(m->data);
+ if (m->timeout)
+ {
+ ecore_timer_del(m->timeout);
+ m->timeout = NULL;
+ }
}
}
_e_fm2_mount_flush();
@@ -1472,6 +1483,7 @@
E_Fm2_Mount *m, *m2;
Evas_List *l;
int exists = 0;
+ int mounted = 0;
m = calloc(1, sizeof(E_Fm2_Mount));
if (!m) return NULL;
@@ -1481,14 +1493,18 @@
if (!strcmp(v->udi, m2->udi))
{
exists = 1;
+ mounted = m2->mounted;
break;
}
}
- m->udi = evas_stringshare_add(v->udi);
- m->mount_point = evas_stringshare_add(v->mount_point);
+ m->udi = evas_stringshare_add(v->udi);
+ m->mount_point = evas_stringshare_add(v->mount_point);
m->mount_ok = mount_ok;
m->mount_fail = mount_fail;
- m->data = data;
+ m->unmount_ok = unmount_ok;
+ m->unmount_fail = unmount_fail;
+ m->data = data;
+ m->mounted = mounted;
if (!exists)
{
m->timeout = ecore_timer_add(10.0, _e_fm2_cb_mount_timeout, m);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs