Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_apps.c e_border.c e_dnd.c e_dnd.h
Log Message:
Dragging icons on the ibar should work. If an icon is dropped outside the
ibar it is removed (but only from the .order file).
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- e_apps.c 4 May 2005 06:54:34 -0000 1.40
+++ e_apps.c 4 May 2005 11:04:07 -0000 1.41
@@ -279,6 +279,7 @@
{
/* FIXME:
* - fix the path for add
+ * - if eapp is in trash, move it to the right place
*/
if (!before->parent) return;
@@ -296,6 +297,7 @@
{
/* FIXME:
* - fix the path for add
+ * - if eapp is in trash, move it to the right place
*/
parent->subapps = evas_list_append(parent->subapps, add);
add->parent = parent;
@@ -309,14 +311,15 @@
{
/* FIXME:
* - check if this file exists, if it does, move it to trash
+ * - update path to eapp
*/
if (!remove->parent) return;
remove->parent->subapps = evas_list_remove(remove->parent->subapps, remove);
_e_app_save_order(remove->parent);
- remove->parent = NULL;
_e_app_change(remove, E_APP_DEL);
+ remove->parent = NULL;
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -3 -r1.175 -r1.176
--- e_border.c 3 May 2005 13:44:43 -0000 1.175
+++ e_border.c 4 May 2005 11:04:08 -0000 1.176
@@ -2454,7 +2454,8 @@
bd->client.icccm.class);
if (a)
{
- e_drag_start(bd->zone->container,
"enlightenment/border", bd,
+ e_drag_start(bd->zone->container,
+ "enlightenment/border", bd, NULL,
a->path, "icon");
evas_event_feed_mouse_up(bd->bg_evas, 1,
EVAS_BUTTON_NONE,
NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_dnd.c 3 May 2005 17:27:41 -0000 1.15
+++ e_dnd.c 4 May 2005 11:04:08 -0000 1.16
@@ -14,6 +14,7 @@
static char *drag_type;
static void *drag_data;
+static void (*drag_finished)(void *data, const char *type, int dropped);
static int _e_dnd_cb_mouse_up(void *data, int type, void *event);
static int _e_dnd_cb_mouse_move(void *data, int type, void *event);
@@ -103,6 +104,7 @@
void
e_drag_start(E_Container *con, const char *type, void *data,
+ void (*finished_cb)(void *data, const char *type, int dropped),
const char *icon_path, const char *icon)
{
Evas_List *l;
@@ -140,6 +142,7 @@
drag_type = strdup(type);
drag_data = data;
+ drag_finished = finished_cb;
for (l = drop_handlers; l; l = l->next)
{
@@ -226,6 +229,7 @@
{
Evas_List *l;
E_Drop_Event *ev;
+ int dropped;
if (drag_obj)
{
@@ -251,6 +255,7 @@
ev->x = x;
ev->y = y;
+ dropped = 0;
for (l = drop_handlers; l; l = l->next)
{
E_Drop_Handler *h;
@@ -264,14 +269,17 @@
&& E_INSIDE(x, y, h->x, h->y, h->w, h->h))
{
h->cb.drop(h->data, drag_type, ev);
+ dropped = 1;
}
}
+ (*drag_finished)(drag_data, drag_type, dropped);
free(ev);
end:
free(drag_type);
drag_type = NULL;
drag_data = NULL;
+ drag_finished = NULL;
}
E_Drop_Handler *
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_dnd.h 3 May 2005 17:27:41 -0000 1.10
+++ e_dnd.h 4 May 2005 11:04:08 -0000 1.11
@@ -56,6 +56,7 @@
EAPI int e_dnd_active(void);
EAPI void e_drag_start(E_Container *con, const char *type, void *data,
+ void (*finished_cb)(void *data, const char *type, int
dropped),
const char *icon_path, const char *icon);
EAPI void e_drag_update(int x, int y);
EAPI void e_drag_end(int x, int y);
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs