forked from enlightenment/enlightenment
'everythin'
- del import cb handler - fix scrolling in thumb view SVN revision: 41967
This commit is contained in:
parent
b877f2af7a
commit
bb9a787366
|
@ -42,7 +42,7 @@ struct _Item
|
||||||
|
|
||||||
static void _import_edj_gen(Import *import);
|
static void _import_edj_gen(Import *import);
|
||||||
static int _import_cb_edje_cc_exit(void *data, int type, void *event);
|
static int _import_cb_edje_cc_exit(void *data, int type, void *event);
|
||||||
|
static Import *import = NULL;
|
||||||
|
|
||||||
static Evry_Plugin *plugin;
|
static Evry_Plugin *plugin;
|
||||||
|
|
||||||
|
@ -172,7 +172,13 @@ _action(Evry_Plugin *plugin, const Evry_Item *item)
|
||||||
|
|
||||||
if (p->prev && p->prev->file)
|
if (p->prev && p->prev->file)
|
||||||
{
|
{
|
||||||
Import *import;
|
if (import)
|
||||||
|
{
|
||||||
|
if (import->exe_handler)
|
||||||
|
ecore_event_handler_del(import->exe_handler);
|
||||||
|
E_FREE(import);
|
||||||
|
}
|
||||||
|
|
||||||
Item *it = (Item*) item;
|
Item *it = (Item*) item;
|
||||||
import = E_NEW(Import, 1);
|
import = E_NEW(Import, 1);
|
||||||
import->method = it->method;
|
import->method = it->method;
|
||||||
|
@ -198,6 +204,7 @@ _init(void)
|
||||||
|
|
||||||
evry_plugin_register(plugin, 10);
|
evry_plugin_register(plugin, 10);
|
||||||
|
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,6 +212,13 @@ static void
|
||||||
_shutdown(void)
|
_shutdown(void)
|
||||||
{
|
{
|
||||||
EVRY_PLUGIN_FREE(plugin);
|
EVRY_PLUGIN_FREE(plugin);
|
||||||
|
|
||||||
|
if (import)
|
||||||
|
{
|
||||||
|
if (import->exe_handler)
|
||||||
|
ecore_event_handler_del(import->exe_handler);
|
||||||
|
E_FREE(import);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -404,6 +418,9 @@ _import_cb_edje_cc_exit(void *data, int type, void *event)
|
||||||
|
|
||||||
ev = event;
|
ev = event;
|
||||||
import = data;
|
import = data;
|
||||||
|
|
||||||
|
if (!ev->exe) return 1;
|
||||||
|
|
||||||
if (ev->exe != import->exe) return 1;
|
if (ev->exe != import->exe) return 1;
|
||||||
|
|
||||||
if (ev->exit_code != 0)
|
if (ev->exit_code != 0)
|
||||||
|
@ -423,7 +440,6 @@ _import_cb_edje_cc_exit(void *data, int type, void *event)
|
||||||
}
|
}
|
||||||
|
|
||||||
E_FREE(fdest);
|
E_FREE(fdest);
|
||||||
E_FREE(import);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,7 +233,6 @@ _e_smart_reconfigure_do(void *data)
|
||||||
oy = 0;
|
oy = 0;
|
||||||
if (sd->h > sd->ch) oy = (sd->h - sd->ch) / 2;
|
if (sd->h > sd->ch) oy = (sd->h - sd->ch) / 2;
|
||||||
|
|
||||||
|
|
||||||
if (sd->sel_item && !sd->update)
|
if (sd->sel_item && !sd->update)
|
||||||
{
|
{
|
||||||
int y, h;
|
int y, h;
|
||||||
|
@ -242,7 +241,7 @@ _e_smart_reconfigure_do(void *data)
|
||||||
e_scrollframe_child_pos_get(sd->view->sframe, NULL, &y);
|
e_scrollframe_child_pos_get(sd->view->sframe, NULL, &y);
|
||||||
e_scrollframe_child_viewport_size_get(sd->view->sframe, NULL, &h);
|
e_scrollframe_child_viewport_size_get(sd->view->sframe, NULL, &h);
|
||||||
|
|
||||||
if ((it->y + it->h) - y >= h - it->h)
|
if ((it->y + it->h) - y > h)
|
||||||
e_scrollframe_child_pos_set(sd->view->sframe, 0, it->y - (2 - sd->zoom) * it->h);
|
e_scrollframe_child_pos_set(sd->view->sframe, 0, it->y - (2 - sd->zoom) * it->h);
|
||||||
else if (it->y < y)
|
else if (it->y < y)
|
||||||
e_scrollframe_child_pos_set(sd->view->sframe, 0, it->y);
|
e_scrollframe_child_pos_set(sd->view->sframe, 0, it->y);
|
||||||
|
@ -604,7 +603,6 @@ _pan_item_add(Evas_Object *obj, Evry_Item *item)
|
||||||
if (_check_item(item))
|
if (_check_item(item))
|
||||||
it->get_thumb = EINA_TRUE;
|
it->get_thumb = EINA_TRUE;
|
||||||
|
|
||||||
|
|
||||||
evry_item_ref(item);
|
evry_item_ref(item);
|
||||||
|
|
||||||
_e_smart_reconfigure(obj);
|
_e_smart_reconfigure(obj);
|
||||||
|
@ -643,7 +641,7 @@ _pan_item_select(Evas_Object *obj, Item *it)
|
||||||
if (sd->zoom < 2)
|
if (sd->zoom < 2)
|
||||||
edje_object_signal_emit(sd->sel_item->frame, "e,state,selected", "e");
|
edje_object_signal_emit(sd->sel_item->frame, "e,state,selected", "e");
|
||||||
|
|
||||||
sd->update = EINA_FALSE;
|
/* sd->update = EINA_FALSE; */
|
||||||
|
|
||||||
if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
|
if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
|
||||||
sd->idle_enter = ecore_idle_enterer_add(_e_smart_reconfigure_do, obj);
|
sd->idle_enter = ecore_idle_enterer_add(_e_smart_reconfigure_do, obj);
|
||||||
|
|
Loading…
Reference in New Issue