drag->x = x;
drag->y = y;
drag->xy_update = 1;
-// printf("DND MOVE %i %i\n", x, y);
}
EAPI void
drag->dx = x - drag->x;
drag->dy = y - drag->y;
-
+
ecore_x_dnd_aware_set(_drag_win, 1);
ecore_x_dnd_types_set(_drag_win, drag->types, drag->num_types);
ecore_x_dnd_actions_set(_drag_win, actions, 5);
}
if (drag->xy_update)
{
-// printf("DND REAL MOVE\n");
ecore_evas_move(drag->ecore_evas, drag->x, drag->y);
e_container_shape_move(drag->shape, drag->x, drag->y);
drag->xy_update = 0;
drag->x = x - drag->dx;
drag->y = y - drag->dy;
drag->xy_update = 1;
-// printf("DND MOVE 2 %i %i\n", x, y);
}
static void
py = ((E_Win *)(h->obj))->y;
break;
case E_ZONE_TYPE:
- px = ((E_Zone *)(h->obj))->x;
- py = ((E_Zone *)(h->obj))->y;
+// px = ((E_Zone *)(h->obj))->x;
+// py = ((E_Zone *)(h->obj))->y;
break;
case E_BORDER_TYPE:
px = ((E_Border *)(h->obj))->x + ((E_Border *)(h->obj))->fx.x;
}
*dx += px;
*dy += py;
+ printf("T: %x | dx = %i dy = %i\n", h->obj->type, *dx, *dy);
}
static Ecore_X_Window
if (_drag_current)
{
+ printf("--\n");
for (l = _drop_handlers; l; l = l->next)
{
E_Drop_Handler *h;
move_ev.action = action;
leave_ev.x = x - dx;
leave_ev.y = y - dy;
- if (E_INSIDE(x, y, dx, dy, dw, dh) && _e_drag_win_matches(h, win, 0))
+
+ int inside, matches;
+
+ inside = E_INSIDE(x, y, dx, dy, dw, dh);
+ matches = _e_drag_win_matches(h, win, 0);
+ printf(" inside = %i, matches = %i\n", inside, matches);
+ if (E_INSIDE(x, y, dx, dy, dw, dh) &&
+ _e_drag_win_matches(h, win, 0))
{
- if(e_drop_handler_responsive_get(h)) responsive = 1;
+ if (e_drop_handler_responsive_get(h)) responsive = 1;
if (!h->entered)
{
}
else
enter_ev.data = _drag_current->data;
+ printf("ENTER!\n");
h->cb.enter(h->cb.data, h->active_type, &enter_ev);
}
h->entered = 1;
id = e_util_winid_str_get(ev->win);
if (!evas_hash_find(_drop_win_hash, id)) return 1;
- printf("Xdnd leave\n");
leave_ev.x = 0;
leave_ev.y = 0;
Ecore_X_Event_Xdnd_Finished *ev;
ev = event;
- printf("Xdnd finished\n");
if (!ev->completed)
return 1;
ev = event;
id = e_util_winid_str_get(ev->win);
if (!evas_hash_find(_drop_win_hash, id)) return 1;
- printf("Xdnd drop %x %s\n", ev->win, _xdnd->type);
ecore_x_selection_xdnd_request(ev->win, _xdnd->type);
id = e_util_winid_str_get(ev->win);
if (!evas_hash_find(_drop_win_hash, id)) return 1;
if (ev->selection != ECORE_X_SELECTION_XDND) return 1;
- printf("Xdnd selection\n");
if (!strcmp("text/uri-list", _xdnd->type))
{
files = ev->data;
for (i = 0; i < files->num_files; i++)
- l = evas_list_append(l, files->files[i]), printf("file: %s\n", files->files[i]);
+ l = evas_list_append(l, files->files[i]);
_xdnd->data = l;
_e_drag_xdnd_end(ev->win, _xdnd->x, _xdnd->y);
evas_list_free(l);
}
*/
}
- printf("\n");
+// printf("\n");
file[i] = '\0';
- printf("file: %d \"%s\"\n", i, file);
+// printf("file: %d \"%s\"\n", i, file);
l = evas_list_append(l, file);
_xdnd->data = l;
/* FIXME; some dialog */
if (sd->mount)
{
- printf("UM1\n");
e_fm2_hal_unmount(sd->mount);
sd->mount = NULL;
evas_object_smart_callback_call(data, "dir_deleted", NULL);
&& strncmp(sd->mount->mount_point, sd->realpath,
strlen(sd->mount->mount_point)))
{
- printf("UM2\n");
e_fm2_hal_unmount(sd->mount);
sd->mount = NULL;
}
_e_fm2_cb_dnd_move,
_e_fm2_cb_dnd_leave,
_e_fm2_cb_dnd_drop,
- drop, 3, sd->x, sd->y, sd->w, sd->h);
+ drop, 3,
+ sd->x, sd->y, sd->w, sd->h);
e_drop_handler_responsive_set(sd->drop_handler);
}
d = alloca(l);
strcpy(d, udi);
strcpy(d + l1 + 1, mountpoint);
- printf("SEND %s %s\n", udi, mountpoint);
return _e_fm_client_send_new(E_FM_OP_MOUNT, (void *)d, l);
}
strcpy(d, udi);
cl = _e_fm2_client_get();
- printf("send UM %s\n", udi);
return _e_fm_client_send_new(E_FM_OP_UNMOUNT, (void *)d, l);
}
l = l->next;
if ((ic2 != ic) && (ic2->saved_pos))
{
-// printf("REMOVE %p [%s]\n",
-// pl->data, ((E_Fm2_Icon *)pl->data)->info.file);
// ic->sd->icons_place = evas_list_remove_list(ic->sd->icons_place, pl);
}
}
* fileman/list_odd/variable
*
*/
-// printf("CALC ICON\n");
if ((!ic->sd->config->icon.fixed.w) || (!ic->sd->config->icon.fixed.h))
{
obj = ic->sd->tmp.obj;
"base/theme/fileman",
"icon/variable");
ic->sd->tmp.obj = obj;
-// printf("CALC OBJ %p\n", ic->sd->tmp.obj);
}
_e_fm2_icon_label_set(ic, obj);
obj2 = ic->sd->tmp.obj2;
edje_extern_object_max_size_set(obj2, ic->sd->config->icon.icon.w, ic->sd->config->icon.icon.h);
edje_object_part_swallow(obj, "e.swallow.icon", obj2);
edje_object_size_min_calc(obj, &mw, &mh);
-// printf("CALC %ix%i\n", mw, mh);
}
ic->w = mw;
ic->h = mh;
if ((selectraise) && (!strcmp(selectraise, "on")))
evas_object_stack_below(ic->obj, ic->sd->drop);
}
-// printf("realize %s full = %i\n", ic->info.file, (int)ic->info.removable_full);
if (ic->info.removable_full)
edje_object_signal_emit(ic->obj_icon, "e,state,removable,full", "e");
// else
if (!desktop) goto error;
// if (desktop->type != EFREET_DESKTOP_TYPE_LINK) goto error;
-// printf(" mod time %lli\n", desktop->load_time);
ic->info.removable = 0;
ic->info.removable_full = 0;
if (desktop->name) ic->info.label = evas_stringshare_add(desktop->name);
else if (!strcmp(type, "Removable"))
{
ic->info.removable = 1;
-// printf("REMOVABLE %s\n", ic->info.link);
if ((!e_fm2_hal_storage_find(ic->info.link)) &&
(!e_fm2_hal_volume_find(ic->info.link)))
{
-// printf("REMOVE IT %s\n", ic->info.file);
_e_fm2_live_file_del(ic->sd->obj, ic->info.file);
efreet_desktop_free(desktop);
goto error;
}
}
type = ecore_hash_get(desktop->x, "X-Enlightenment-Removable-State");
-// printf(" rem state type = %s\n", type);
if (type)
{
if (!strcmp(type, "Full"))
}
if (!sd->drop_all)
{
- printf("DISP DROP ALL SHOW\n");
edje_object_signal_emit(sd->overlay, "e,state,drop,start", "e");
sd->drop_all = 1;
}
if (!sd) return;
if (sd->drop_all)
{
- printf("DISP DROP ALL HIDE\n");
edje_object_signal_emit(sd->overlay, "e,state,drop,stop", "e");
sd->drop_all = 0;
}
{
if (ic->sd->drop_after != -1)
{
- printf("DISP DROP ON drop\n");
edje_object_signal_emit(ic->sd->drop_in, "e,state,unselected", "e");
edje_object_signal_emit(ic->sd->drop, "e,state,selected", "e");
ic->sd->drop_in_show = 0;
}
else
{
- printf("DISP DROP ON drop_in\n");
edje_object_signal_emit(ic->sd->drop, "e,state,unselected", "e");
edje_object_signal_emit(ic->sd->drop_in, "e,state,selected", "e");
ic->sd->drop_in_show = 1;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
- printf("DISP DROP OFF BOTH\n");
if (sd->drop_show)
{
edje_object_signal_emit(sd->drop, "e,state,unselected", "e");
if (!type) return;
if (strcmp(type, "text/uri-list")) return;
ev = (E_Event_Dnd_Enter *)event;
- printf("DND IN %i %i\n", ev->x, ev->y);
e_drop_handler_action_set(ev->action);
}
if (!type) return;
if (strcmp(type, "text/uri-list")) return;
ev = (E_Event_Dnd_Move *)event;
- printf("DND MOVE %i %i\n", ev->x, ev->y);
e_drop_handler_action_set(ev->action);
for (l = sd->icons; l; l = l->next) /* FIXME: should only walk regions and skip non-visible ones */
{
ic = l->data;
if (E_INSIDE(ev->x, ev->y, ic->x - ic->sd->pos.x, ic->y - ic->sd->pos.y, ic->w, ic->h))
{
- printf("OVER %s\n", ic->info.file);
if (ic->drag.dnd) continue;
/* if list view */
if (ic->sd->config->view.mode == E_FM2_VIEW_MODE_LIST)
if (ev->y <= (ic->y - ic->sd->pos.y + (ic->h / 4)))
{
_e_fm2_dnd_drop_show(ic, 0);
- printf("DDD 0\n");
}
else if (ev->y > (ic->y - ic->sd->pos.y + ((ic->h * 3) / 4)))
{
_e_fm2_dnd_drop_show(ic, 1);
- printf("DDD 1\n");
}
else
{
_e_fm2_dnd_drop_show(ic, -1);
- printf("DDD -1\n");
}
}
else
if (!type) return;
if (strcmp(type, "text/uri-list")) return;
ev = (E_Event_Dnd_Leave *)event;
- printf("DND LEAVE %i %i\n", ev->x, ev->y);
_e_fm2_dnd_drop_hide(sd->obj);
_e_fm2_dnd_drop_all_hide(sd->obj);
}
if (strcmp(type, "text/uri-list")) return;
ev = (E_Event_Dnd_Drop *)event;
- printf("DROP: %i %i\n", ev->x, ev->y);
fsel = _e_fm2_uri_path_list_get(ev->data);
isel = _e_fm2_uri_icon_list_get(fsel);
if (!isel) return;
- for (l = fsel; l; l = l->next)
- {
- fl = l->data;
- printf(" %s\n", fl);
- }
dx = 0; dy = 0;
ox = 0; oy = 0;
for (l = isel; l; l = l->next)
oy = ic->y;
dx = (ic->drag.x + ic->x - ic->sd->pos.x);
dy = (ic->drag.y + ic->y - ic->sd->pos.y);
- printf("DND offset %i %i | %i %i | %i %i | %i %i\n",
- dx, dy,
- ic->drag.x, ic->drag.y,
- ic->x, ic->y,
- ic->sd->pos.x, ic->sd->pos.y);
break;
}
}
*/
if (sd->drop_all) /* drop arbitarily into the dir */
{
- printf("drop all\n");
/* move file into this fm dir */
for (ll = fsel, il = isel; ll && il; ll = ll->next, il = il->next)
{
}
else if (sd->drop_icon) /* inot or before/after an icon */
{
- printf("drop on/before/after icon\n");
if (sd->drop_after == -1) /* put into subdir in icon */
{
/* move file into dir that this icon is for */
/* move the file into the subdir */
snprintf(buf, sizeof(buf), "%s/%s/%s",
sd->realpath, sd->drop_icon->info.file, ecore_file_file_get(fp));
- printf("mv %s %s\n", (char *)fp, buf);
args = _e_fm_string_append_quoted(args, &size, &length, fp);
args = _e_fm_string_append_char(args, &size, &length, ' ');
sd->realpath, ecore_file_file_get(fp));
if (sd->config->view.link_drop)
{
- printf("ln -s %s %s\n", (char *)fp, buf);
_e_fm2_client_file_symlink(buf, fp, sd->drop_icon->info.file, sd->drop_after, -9999, -9999, sd->h, sd->h);
}
else
else if (evas_key_modifier_is_set(modifiers, "Shift"))
multi_sel = 1;
}
-// printf("MOUSE 1 range=%i multi=%i\n", range_sel, multi_sel);
if (ic->sd->config->selection.single)
{
multi_sel = 0;
{
ic->drag.x = ev->output.x - ic->x - ic->sd->x + ic->sd->pos.x;
ic->drag.y = ev->output.y - ic->y - ic->sd->y + ic->sd->pos.y;
-// printf("DX: %i %i\n", ic->drag.x, ic->drag.y);
ic->drag.start = 1;
ic->drag.dnd = 0;
ic->drag.src = 1;
_e_fm2_regions_populate(sd->obj);
break;
case E_FM2_VIEW_MODE_CUSTOM_ICONS:
- printf("CUSTOM ICONRESIZE HANDLE\n");
if (sd->config->view.fit_custom_pos)
{
for (l = sd->icons; l; l = l->next)
_e_fm2_regions_populate(sd->obj);
break;
case E_FM2_VIEW_MODE_LIST:
-// printf("LIST RESIZE HANDLE\n");
if (sd->iconlist_changed)
{
for (l = sd->icons; l; l = l->next)
if (sd->path) evas_stringshare_del(sd->path);
if (sd->mount)
{
- printf("UM3\n");
e_fm2_hal_unmount(sd->mount);
sd->mount = NULL;
}
_e_fm2_cb_live_timer(data);
if ((sd->order_file) || (sd->config->view.always_order))
{
- printf("refresh from .order\n");
e_fm2_refresh(data);
}
sd->live.idler = NULL;