forked from enlightenment/efl
Add me to authors, and make selection work a bit better.
SVN revision: 49792
This commit is contained in:
parent
799bf08131
commit
eade64e9c2
|
@ -13,3 +13,4 @@ Brian Wang <brian.wang.0721@gmail.com>
|
||||||
Mike Blumenkrantz (zmike) <mike@zentific.com>
|
Mike Blumenkrantz (zmike) <mike@zentific.com>
|
||||||
Saumsung Electronics <tbd>
|
Saumsung Electronics <tbd>
|
||||||
Samsung SAIT <tbd>
|
Samsung SAIT <tbd>
|
||||||
|
Brett Nash <nash@nash.id.au>
|
||||||
|
|
|
@ -138,7 +138,7 @@ elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
|
||||||
sel->active = 1;
|
sel->active = 1;
|
||||||
sel->widget = widget;
|
sel->widget = widget;
|
||||||
sel->set(elm_win_xwindow_get(elm_widget_top_get(widget)),
|
sel->set(elm_win_xwindow_get(elm_widget_top_get(widget)),
|
||||||
&selection, sizeof(void *));
|
&selection, sizeof(int));
|
||||||
sel->format = format;
|
sel->format = format;
|
||||||
sel->selbuf = strdup(selbuf);
|
sel->selbuf = strdup(selbuf);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -925,23 +925,17 @@ _signal_selection_start(void *data, Evas_Object *obj __UNUSED__, const char *emi
|
||||||
}
|
}
|
||||||
wd->have_selection = EINA_TRUE;
|
wd->have_selection = EINA_TRUE;
|
||||||
evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL);
|
evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL);
|
||||||
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
if (wd->sel_notify_handler)
|
if (wd->sel_notify_handler)
|
||||||
{
|
{
|
||||||
char *txt = _mkup_to_text(elm_entry_selection_get(data));
|
char *txt = elm_entry_selection_get(data);
|
||||||
|
Evas_Object *top;
|
||||||
|
|
||||||
if (txt)
|
top = elm_widget_top_get(data);
|
||||||
{
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP, txt);
|
||||||
Evas_Object *top;
|
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
|
||||||
ecore_x_selection_primary_set(elm_win_xwindow_get(top), txt,
|
|
||||||
strlen(txt));
|
|
||||||
#endif
|
|
||||||
free(txt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -972,17 +966,8 @@ _signal_selection_cleared(void *data, Evas_Object *obj __UNUSED__, const char *e
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
{
|
elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP,
|
||||||
char *t;
|
wd->cut_sel);
|
||||||
|
|
||||||
t = _mkup_to_text(wd->cut_sel);
|
|
||||||
if (t)
|
|
||||||
{
|
|
||||||
ecore_x_selection_primary_set(elm_win_xwindow_get(top),
|
|
||||||
t, strlen(t));
|
|
||||||
free(t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
eina_stringshare_del(wd->cut_sel);
|
eina_stringshare_del(wd->cut_sel);
|
||||||
wd->cut_sel = NULL;
|
wd->cut_sel = NULL;
|
||||||
|
|
Loading…
Reference in New Issue