summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-11-07 14:26:57 +0000
committerChris Michael <cp.michael@samsung.com>2013-11-07 14:31:57 +0000
commitd624fd372aef066cc15aaa98d332c7afa1b09255 (patch)
tree2bf82ab5751c5330e72f6e7b6b62c3ad5a49e309 /src/lib
parent5537557d2b5fc16b9ce1850034bde52322eb6c6c (diff)
Fix selection type when trying to get a selection. Also fix pasting
from terminology into other elm apps (selection format issue). Wayland has no concept of primary or secondary clipboards so we need to test for selection == those due to some X apps. *cough*terminology*cough* using only Primary or Secondary. Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elm_cnp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index a40f87b33..0b6ac7d13 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2276,15 +2276,14 @@ _wl_elm_cnp_selection_set(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
2276 const char *types[10] = {0, }; 2276 const char *types[10] = {0, };
2277 int i = -1; 2277 int i = -1;
2278 2278
2279 if (format & ELM_SEL_FORMAT_TEXT) 2279 if ((format & ELM_SEL_FORMAT_MARKUP) ||
2280 (format & ELM_SEL_FORMAT_TEXT))
2280 { 2281 {
2282 types[++i] = "application/x-elementary-markup";
2281 types[++i] = "text/plain"; 2283 types[++i] = "text/plain";
2282 types[++i] = "text/plain;charset=utf-8"; 2284 types[++i] = "text/plain;charset=utf-8";
2283 } 2285 }
2284 2286
2285 if (format & ELM_SEL_FORMAT_MARKUP)
2286 types[++i] = "application/x-elementary-markup";
2287
2288 if (format & ELM_SEL_FORMAT_HTML) 2287 if (format & ELM_SEL_FORMAT_HTML)
2289 { 2288 {
2290 types[++i] = "text/html"; 2289 types[++i] = "text/html";
@@ -2335,20 +2334,21 @@ _wl_elm_cnp_selection_get(Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Form
2335 EVAS_CALLBACK_DEL, _wl_sel_obj_del2, 2334 EVAS_CALLBACK_DEL, _wl_sel_obj_del2,
2336 &wl_cnp_selection); 2335 &wl_cnp_selection);
2337 2336
2338 if (selection == ELM_SEL_TYPE_CLIPBOARD) 2337 if ((selection == ELM_SEL_TYPE_CLIPBOARD) ||
2338 (selection == ELM_SEL_TYPE_PRIMARY) ||
2339 (selection == ELM_SEL_TYPE_SECONDARY))
2339 { 2340 {
2340 const char *types[10] = {0, }; 2341 const char *types[10] = {0, };
2341 int i = -1; 2342 int i = -1;
2342 2343
2343 if (format & ELM_SEL_FORMAT_TEXT) 2344 if ((format & ELM_SEL_FORMAT_MARKUP) ||
2345 (format & ELM_SEL_FORMAT_TEXT))
2344 { 2346 {
2347 types[++i] = "application/x-elementary-markup";
2345 types[++i] = "text/plain"; 2348 types[++i] = "text/plain";
2346 types[++i] = "text/plain;charset=utf-8"; 2349 types[++i] = "text/plain;charset=utf-8";
2347 } 2350 }
2348 2351
2349 if (format & ELM_SEL_FORMAT_MARKUP)
2350 types[++i] = "application/x-elementary-markup";
2351
2352 if (format & ELM_SEL_FORMAT_HTML) 2352 if (format & ELM_SEL_FORMAT_HTML)
2353 { 2353 {
2354 types[++i] = "text/html"; 2354 types[++i] = "text/html";