forked from enlightenment/enlightenment
'everything' module: calc: put result in primary selection AND clipboard
SVN revision: 41245
This commit is contained in:
parent
f385d9032c
commit
5a50d049f9
|
@ -305,7 +305,7 @@ evry_plugin_async_update(Evry_Plugin *p, int action)
|
|||
|
||||
s = cur_state;
|
||||
|
||||
if (action == 1)
|
||||
if (action == EVRY_ASYNC_UPDATE_ADD)
|
||||
{
|
||||
if (!eina_list_data_find(s->cur_plugins, p))
|
||||
{
|
||||
|
@ -332,7 +332,7 @@ evry_plugin_async_update(Evry_Plugin *p, int action)
|
|||
_evry_show_items(s->cur_plugins->data);
|
||||
}
|
||||
}
|
||||
else if ((action == 0) && (s->cur_plugin == p))
|
||||
else if ((action == EVRY_ASYNC_UPDATE_CLEAR) && (s->cur_plugin == p))
|
||||
{
|
||||
_evry_list_clear();
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ typedef struct _Evry_App Evry_App;
|
|||
#define EVRY_ACTION_FINISHED 1
|
||||
#define EVRY_ACTION_CONTINUE 2
|
||||
|
||||
#define EVRY_ASYNC_UPDATE_ADD 0
|
||||
#define EVRY_ASYNC_UPDATE_CLEAR 1
|
||||
|
||||
#else
|
||||
#ifndef EVRY_H
|
||||
|
|
|
@ -119,7 +119,7 @@ _action(Evry_Item *it, const char *input)
|
|||
Evry_Item *it2 = p->items->data;
|
||||
|
||||
_item_add((char *) it2->label, 1);
|
||||
evry_plugin_async_update(p, 1);
|
||||
evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD);
|
||||
}
|
||||
|
||||
return EVRY_ACTION_CONTINUE;
|
||||
|
@ -129,6 +129,9 @@ _action(Evry_Item *it, const char *input)
|
|||
/* XXX on which windows must the selection be set? */
|
||||
ecore_x_selection_primary_set(e_manager_current_get()->win,
|
||||
it->label, strlen(it->label));
|
||||
ecore_x_selection_clipboard_set(e_manager_current_get()->win,
|
||||
it->label, strlen(it->label));
|
||||
|
||||
if (p->items->data == it)
|
||||
{
|
||||
Evry_Item *it2 = p->items->data;
|
||||
|
@ -180,7 +183,7 @@ _cb_data(void *data, int type, void *event)
|
|||
|
||||
if (data != p) return 1;
|
||||
|
||||
evry_plugin_async_update(p, 0);
|
||||
evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_CLEAR);
|
||||
|
||||
for (l = ev->lines; l && l->line; l++)
|
||||
{
|
||||
|
@ -195,7 +198,7 @@ _cb_data(void *data, int type, void *event)
|
|||
_item_add(l->line, 1);
|
||||
}
|
||||
|
||||
evry_plugin_async_update(p, 1);
|
||||
evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -202,6 +202,6 @@ _dbus_cb_reply(void *data, DBusMessage *msg, DBusError *error)
|
|||
}
|
||||
}
|
||||
|
||||
if (p->items) evry_plugin_async_update(p, 1);
|
||||
if (p->items) evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue