static E_Config_DD *collection_conf_edd = NULL;
Evry_Config *evry_conf = NULL;
-int _evry_events[4];
+int _evry_events[NUM_EVRY_EVENTS];
int _e_module_evry_log_dom = -1;
_evry_events[EVRY_EVENT_ITEM_SELECTED] = ecore_event_type_new();
_evry_events[EVRY_EVENT_ITEM_CHANGED] = ecore_event_type_new();
_evry_events[EVRY_EVENT_ACTION_PERFORMED] = ecore_event_type_new();
+ _evry_events[EVRY_EVENT_PLUGIN_SELECTED] = ecore_event_type_new();
e_module_delayed_set(m, 0);
#ifdef CHECK_REFS
Evry_Item *it;
- printf("___________________________________________\n");
-
EINA_LIST_FREE(_refd, it)
printf("%d %s\n", it->ref, it->label);
-
#endif
return 1;
evry_conf->view_zoom = 0;
evry_conf->cycle_mode = 0;
evry_conf->history_sort_mode = 0;
- evry_conf->edge_width = 370;
- evry_conf->edge_height = 435;
+ evry_conf->edge_width = 340;
+ evry_conf->edge_height = 385;
evry_conf->first_run = EINA_TRUE;
pcc = E_NEW(Plugin_Config, 1);
int evry_gadget_init(void);
void evry_gadget_shutdown(void);
-
Ecore_Event_Handler *evry_event_handler_add(int type, int (*func) (void *data, int type, void *event), const void *data);
extern Evry_History *evry_hist;
extern Evry_Config *evry_conf;
-extern int _evry_events[4];
+extern int _evry_events[NUM_EVRY_EVENTS];
#define EVRY_ITEM_NEW(_base, _plugin, _label, _icon_get, _free) \
(_base *) evry_item_new(EVRY_ITEM(E_NEW(_base, 1)), EVRY_PLUGIN(_plugin), \
if ((it = s->cur_item))
{
if (!s->plugin || !eina_list_data_find_list(s->plugin->items, it))
- _evry_item_desel(s);
-
- item_changed = EINA_TRUE;
+ {
+ _evry_item_desel(s);
+ item_changed = EINA_TRUE;
+ }
}
/* get first item */
{
it = eina_list_data_get(s->plugin->items);
s->item_auto_selected = EINA_TRUE;
+ if (!s->cur_plugins || (it != s->cur_item))
+ item_changed = EINA_TRUE;
+
_evry_item_sel(s, it);
-
- item_changed = EINA_TRUE;
}
_evry_selector_item_update(sel);
Eina_List *l, *plugins = NULL;
Evry_Plugin *p, *pp;
Evry_Selector *sel = OBJ_SEL;
- Evry_Item *it;
while (sel->state)
_evry_state_pop(sel, 1);
- it = (ACTN_SEL)->state->cur_item;
-
EINA_LIST_FOREACH(sel->plugins, l, p)
{
+ /* plugin provides items matching object for action*/
if (!CHECK_SUBTYPE(p, act->it2.type))
continue;
- if (p->begin && (pp = p->begin(p, it)))
+ if (p->begin && (pp = p->begin(p, EVRY_ITEM(act))))
plugins = eina_list_append(plugins, pp);
if (!p->begin)
s->plugin = p;
}
+static void
+_evry_cb_free_plugin_selected(void *data, void *event)
+{
+ Evry_Event_Item_Selected *ev = event;
+
+ evry_item_free(ev->item);
+ E_FREE(ev);
+}
+
void
evry_plugin_select(Evry_Plugin *p)
{
+ Evry_Event_Item_Selected *ev;
+
if (!p) return;
if (!p->state)
}
_evry_plugin_select(p->state, p);
-
_evry_selector_update(p->state->selector);
+
+ ev = E_NEW(Evry_Event_Item_Selected, 1);
+ ev->item = EVRY_ITEM(p);
+ EVRY_ITEM_REF(p);
+ ecore_event_add(_evry_events[EVRY_EVENT_PLUGIN_SELECTED], ev,
+ _evry_cb_free_plugin_selected, NULL);
}
static void
#define EVRY_EVENT_ITEM_CHANGED 1
#define EVRY_EVENT_ITEMS_UPDATE 2
#define EVRY_EVENT_ACTION_PERFORMED 3
+#define EVRY_EVENT_PLUGIN_SELECTED 4
+#define NUM_EVRY_EVENTS 5
typedef struct _Evry_API Evry_API;
typedef struct _Evry_Module Evry_Module;
typedef struct _Evry_Event_Item_Changed Evry_Event_Item_Changed;
+typedef struct _Evry_Event_Item_Selected Evry_Event_Item_Selected;
typedef struct _Evry_Event_Action_Performed Evry_Event_Action_Performed;
int changed_icon;
};
+struct _Evry_Event_Item_Selected
+{
+ Evry_Item *item;
+};
+
struct _Evry_Event_Action_Performed
{
const char *action;
&cx, &cy, NULL, NULL);
x += cx;
y += cy;
+ /* evas_object_resize(win->o_main,
+ * evry_conf->edge_width,
+ * evry_conf->edge_height);
+ *
+ * e_popup_resize(win->popup,
+ * evry_conf->edge_width,
+ * evry_conf->edge_height); */
+
pw = win->popup->w;
ph = win->popup->h;
col = 2;
aspect_w = width * 2;
}
- else if ((cnt < 9) && (sd->w < (double)sd->h * 1.5))
+ else if ((cnt < 9) && (sd->w < (double)sd->h * 1.2))
{
col = 2;
aspect_w = width * 3;