Enlightenment CVS committal
Author : sebastid
Project : e17
Module : apps/e
Dir : e17/apps/e/src/modules/ibar
Modified Files:
e_mod_main.c
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/modules/ibar/e_mod_main.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- e_mod_main.c 3 May 2005 19:51:54 -0000 1.41
+++ e_mod_main.c 4 May 2005 11:04:08 -0000 1.42
@@ -69,10 +69,12 @@
static void _ibar_bar_cb_mouse_move(void *data, Evas *e, Evas_Object *obj,
void *event_info);
static int _ibar_bar_cb_timer(void *data);
static int _ibar_bar_cb_animator(void *data);
+
static void _ibar_bar_cb_enter(void *data, const char *type, void *event);
static void _ibar_bar_cb_move(void *data, const char *type, void *event);
static void _ibar_bar_cb_leave(void *data, const char *type, void *event);
static void _ibar_bar_cb_drop(void *data, const char *type, void *event);
+static void _ibar_bar_cb_finished(void *data, const char *type, int
dropped);
static void _ibar_icon_cb_intercept_move(void *data, Evas_Object *o,
Evas_Coord x, Evas_Coord y);
static void _ibar_icon_cb_intercept_resize(void *data, Evas_Object *o,
Evas_Coord w, Evas_Coord h);
@@ -1235,7 +1237,6 @@
ev = event_info;
ic = data;
-#if 0
if (drag_start)
{
double dist;
@@ -1245,12 +1246,13 @@
{
drag = 1;
drag_start = 0;
- e_drag_start(ic->ibb->con, "enlightenment/eapp", ic->app,
ic->app->path, "icon");
+ e_drag_start(ic->ibb->con,
+ "enlightenment/eapp", ic->app, _ibar_bar_cb_finished,
+ ic->app->path, "icon");
evas_event_feed_mouse_up(ic->ibb->evas, 1, EVAS_BUTTON_NONE, NULL);
e_app_remove(ic->app);
}
}
-#endif
}
static void
@@ -1516,18 +1518,26 @@
if (ic)
{
/* Add new eapp before this icon */
- printf("add before: %s %s\n", app->path, ic->app->path);
e_app_prepend_relative(app, ic->app);
}
else
{
/* Add at the end */
- printf("add at end: %s %s\n", app->path, ibb->ibar->apps->path);
e_app_append(app, ibb->ibar->apps);
}
}
static void
+_ibar_bar_cb_finished(void *data, const char *type, int dropped)
+{
+ /* Someone took over the eapp. */
+ if (dropped) return;
+
+ /* Unref the object so it will be deleted. */
+ e_object_unref(E_OBJECT(data));
+}
+
+static void
_ibar_bar_cb_gmc_change(void *data, E_Gadman_Client *gmc, E_Gadman_Change
change)
{
IBar_Bar *ibb;
-------------------------------------------------------
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