Commit Graph

100 Commits

Author SHA1 Message Date
Thiep Ha ae8c65f968 [DnD] Fix bug of hard-coded type when drag
Summary:
When we start dragging, the type is always set to "text/uri-list" no matter the format type set by application.
This patch fixs this hard-coded type issue. It will set types corresponding to the format type set by application.
For example, if application set format as ELM_SEL_FORMAT_TEXT, it will set types UTF8_STRING, STRING, COMPOUND_TEXT, TEXT,
text/plain, text/plain;charset=utf-8.

Reviewers: JackDanielZ, raster

Reviewed By: raster

CC: woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D546
2014-02-18 15:47:08 +09:00
Daniel Hirt 41b6a932fe elm cnp: fix freeing selection buf
Moved a misplaced ELM_SAFE_FREE of the selection buffer,
 as valgrind still showed lost bytes with selection.
2014-02-09 13:22:24 +02:00
Ryuan Choi a3c5ee407f elm_cnp: Fix that calls _x11_elm_widget_xwin_get two times at elm_cnp_selection_{set|get}
small refactoring.
2014-01-23 22:22:33 +09:00
Daniel Juyung Seo 5353aa863c elm: Removed unnecessary null check for free. 2014-01-22 11:13:11 +09:00
Daniel Juyung Seo a4f3074f9c elm: Removed unnecessary null check for ecore_timer_del,
ecore_animator_del, and ecore_job_del.

As all efl public free apis get null as valid parameter, we do not need
to check null. I also removed some null check for other free apis which
were right next to timer/animator/job del. After this job code got
cleaner.
2014-01-21 23:18:16 +09:00
Carsten Haitzler 066b206a12 cnp - dont access null parent obj in getting xwin 2014-01-15 09:59:37 +09:00
Daniel Juyung Seo 5c0eccddd5 cnp: Fixed indentation while reading the code. 2014-01-13 23:01:34 +09:00
Carsten Haitzler 17083663ac elm cnp (dnd) - file:/ is the minimum, not file:// so work with other apps 2014-01-13 14:00:09 +09:00
Carsten Haitzler f165f26f28 fix mingw build for setuid fix/checks 2014-01-08 22:08:44 +09:00
Carsten Haitzler 430f98a628 setuid safeness - ensure if an app that is setuid doesn't do bad things
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
2014-01-08 20:33:09 +09:00
Daniel Juyung Seo fd5c046dfe elm: Changed __UNUSED__ to EINA_UNUSED. 2014-01-06 23:33:57 +09:00
Daniel Juyung Seo 6d71a23c3a elm lib: removed all the unnecessary empty lines.
being pedantic.
2013-12-15 06:18:35 +09:00
Daniel Zaoui e67db2c832 DnD: cancel feature during drag
This can be tested by running "Features DnD" test. Enable the 5s cancel
timeout, drag an item and wait for the cancellation.
2013-12-09 09:32:43 +02:00
Daniel Zaoui 75914e85d6 DnD: Valgrind fixes 2013-12-09 09:31:55 +02:00
Daniel Juyung Seo 8a0159df4f elm: long waited seasonal trailing whitespaces removal!
This is a ceremony of elementary 1.8 release!
2013-12-02 19:43:46 +09:00
Daniel Zaoui cfdb3eec4d Add callback when drag start in item containers 2013-11-28 16:24:01 +02:00
Daniel Zaoui bd79c328f3 DnD: safe inlist elements removal 2013-11-24 08:54:57 +02:00
Carsten Haitzler aff098868b wayland - fix cnp segv
this ACTUALLY fixes T471
2013-11-23 22:45:15 +09:00
Jihoon Kim 9e99a7f579 fix typos in doxygen and comments 2013-11-22 11:06:37 +09:00
Chris Michael b3b728acb7 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>
2013-11-07 14:31:57 +00:00
Chris Michael b4925b0db0 Fix elementary copy/paste for wayland. Rework copy/paste code in elm.
This is part of a larger copy/paste fix for efl/elm wayland.
Previously, copy/paste would not work via keyboard shortcuts. This
series of changes fixes that issue (wrt elm_entry anyway).

This also adds addtional copy/paste support (wrt efl wayland),
including support for various mime types (text/plain, elm-markup, and
html).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-11-07 14:31:57 +00:00
Daniel Zaoui c4f8c9d5b7 DnD: Fix compilation errors by adapting the multi-callbacks to Wayland. 2013-11-05 13:41:57 -02:00
Daniel Zaoui b66233d128 DnD: multi-callbacks support
This features permits execution of more than one set of functions during
DnD.
Delete function API has been modified to give the developer the
possibility to remove a specific set of functions.
2013-11-05 08:28:54 +02:00
Daniel Zaoui 579d309cc5 DnD: Code improvement + variables renaming
Little code improvement
Rename cbdata with dropdata
2013-11-05 08:28:54 +02:00
Carsten Haitzler aae829f260 wayland support - unbreak build since structs are now private 2013-11-02 11:38:57 +09:00
Daniel Juyung Seo 0439d6eb62 elm_cnp.c: Disable cnp debug mode by default. 2013-11-02 04:28:06 +09:00
Daniel Zaoui 883ed0d646 Drag & Drop: add overlapping feature.
This feature is essential if two overlapping widgets can receive drop
information.
Until now, if two widgets (e.g background and button) were added as drop
targets, pointing to common coordinates would have given priority to the
first inserted as drop target.
Now, it will determine which widget is supposed to receive this drop
target by using the same mechanism as used for mouse move, i.e by
walking on the objects tree whose pointer passes through.

A test has been added (Overlapping DnD) to show how this feature can be
used. You can drop in bg, box and button.
2013-10-21 19:04:42 +03:00
Daniel Juyung Seo 1eb4b8d9e1 elm_cnp.c: Did a subtle code cleanup.
savedtypes.imgfile should not be null logically or this function should have been returned in advance.
2013-10-08 00:08:21 +09:00
Daniel Juyung Seo e9f6a91ff8 elm_cnp.c: removed unused pointer value and initialized some local variables.
This fixes coverity CID 1102548, 1102553, and 1102554.
2013-10-08 00:03:05 +09:00
Daniel Juyung Seo e756f97dae elm: Longwaited trailing white space removal. Clean elm up! 2013-09-30 22:15:01 +09:00
Daniel Juyung Seo 1707641142 elm_cnp.c: initialize local variable.
This fixes coverity CID 1039988 Uninitialized scalar variable (UNINIT).
2013-08-11 17:04:21 +09:00
Daniel Juyung Seo a4d654896b elm_cnp.c: fixed uninitialized variable warning spotted by coverity.
CID 1039986, 1039987.
2013-07-05 19:05:29 +09:00
Daniel Juyung Seo 74682ebb4e elm_cnp.c: fixed use after free spotted by coverity CID 1039969. 2013-07-05 17:35:29 +09:00
Daniel Zaoui db3db8ba59 DnD: rotate the dragwin of the user icon according to the rotation of
the main win.
2013-06-28 11:15:59 +03:00
Alex Wu d9414a6d5d elm_cnp: Fix building issue when not defined HAVE_ELEMENTARY_X
Put the static function that will be used both by wayland
and x11 at the common place.
2013-06-27 10:30:36 +09:00
Daniel Zaoui 50218ec1ba DnD: move NULL check to a better place 2013-06-26 15:02:09 +03:00
Stefan Schmidt 125938e968 elm_cnp: Fix memory leak in error path.
We allocate info->filename in all cases but missed a free in the error path.
2013-06-10 14:53:11 +01:00
Chris Michael dd2e663651 Initialize 'win' to NULL and only return a window id if we have a
valid 'win'

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-06-05 18:21:55 +01:00
Chris Michael 04ff986be5 Check for valid savedtypes imgfile before trying to use it.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-05 12:57:10 +01:00
Daniel Zaoui b59ce96e86 Elementary/DnD: fix creation of dragwin.
It seems that the order of show and move for a window is important.
2013-06-03 09:56:18 +03:00
Daniel Juyung Seo 652ad1417f elm_cnp.c: ELM_SAFE_FREE adoption.
I splited ELM_SAFE_FREE refactoring patches. One commit per each file as recommended.
For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
2013-05-29 20:47:08 +09:00
Chris Michael e78ddf7a40 Add code to make Wayland Drag-n-Drop work in elementary client apps now.
NB: Handle with care ... code is still a bit experimental

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 12:01:24 +01:00
Chris Michael 6f82959191 Add elm_drag_action_set support for wayland and start on
elm_drag_start support.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 12:01:24 +01:00
Chris Michael 91a9693c79 Add elm drag item container support for wayland
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 12:01:24 +01:00
Chris Michael f69ec73e4b Add elm drop target support for wayland.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-28 11:50:51 +01:00
Daniel Juyung Seo ef8701a173 elm: more ELM_FREE_FUNC cleanups. 2013-05-24 00:58:38 +09:00
Daniel Juyung Seo ac25946a19 elm: introduce ELM_FREE_FUNC for code quality enhancement.
There are pros and cons but this
1. reduces human mistakes.
2. enhances readability.
3. enhances code quality.
4. removes future bug.
5. was adopted from enlightenment.

This is not all. I will work on enhancing elementary more and more.
2013-05-22 02:24:02 +09:00
Stefan Schmidt b9252891a7 elm_cnp: One semicolon is enough. 2013-05-14 15:52:49 +01:00
Chris Michael 3638d83a8c Add more missing guards for building elm without X support
(wayland-only).
Fix some utterly Horrible formatting too while I was here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-14 07:05:56 +01:00
Chris Michael 76eb5c8a1b Add missing HAVE_ELEMENTARY_X guards.
NB: Fixes ticket T107: Building elementary with only wayland support.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-13 12:20:13 +01:00