Custom filelist focus improvements, now can delete files.
This commit is contained in:
@ -2,14 +2,14 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
static void
|
||||
_widget_focus_handle(void *data, Evas_Object *o, const char *emission,
|
||||
const char *source)
|
||||
_widget_focus_handle(void *data, Evas_Object *o)
|
||||
{
|
||||
static char *old_source;
|
||||
const char *name;
|
||||
Evas_Object *eo;
|
||||
|
||||
name = data;
|
||||
printf("part name: %s\n", name);
|
||||
// Some widgets aren't named (such as when in combo), so check
|
||||
if (!name)
|
||||
return;
|
||||
@ -27,8 +27,28 @@ _widget_focus_handle(void *data, Evas_Object *o, const char *emission,
|
||||
}
|
||||
|
||||
// Send focus to the freshly clicked widget
|
||||
eo = evas_object_name_find(ecore_evas_get(em->main_win_ee), name);
|
||||
evas_object_focus_set(eo, 1);
|
||||
evas_object_focus_set(o, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
_mouse_down_edje(void *data, Evas_Object *o, const char *emission,
|
||||
const char *source)
|
||||
{
|
||||
_widget_focus_handle(data, o);
|
||||
}
|
||||
|
||||
static void
|
||||
_mouse_down_evas(void *data, Evas *e __UNUSED__, Evas_Object *eo,
|
||||
void *ev_data __UNUSED__)
|
||||
{
|
||||
_widget_focus_handle(data, eo);
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_widget_focus_callback_add(Evas_Object *o, const char *name)
|
||||
{
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_mouse_down_evas, (void *)name);
|
||||
}
|
||||
|
||||
Evas_Object *
|
||||
@ -39,7 +59,7 @@ ecdb_widget_add(Evas_Object *parent, const char *name)
|
||||
|
||||
o = edje_object_add(evas_object_evas_get(parent));
|
||||
edje_object_signal_callback_add(o, "mouse,down,*", "*",
|
||||
_widget_focus_handle,
|
||||
_mouse_down_edje,
|
||||
(void *)name);
|
||||
|
||||
if (name)
|
||||
|
Reference in New Issue
Block a user