Commit Graph

518 Commits

Author SHA1 Message Date
shilpa.singh cfaf18f967 Elm: Add context,open signal in elm_entry.
Summary:
When context,open signal is sent from elm_entry before showing context
menu, dynamic addition of context menu items to entry becomes easier.

@feature

Test Plan:
Run elementary_test
Launch Entry Scrolled test
Right Click on Multiline Markup entry

Reviewers: tasn

Reviewed By: tasn

Subscribers: subodh6129, poornima.srinivasan

Differential Revision: https://phab.enlightenment.org/D2580
2015-06-03 10:41:13 +01:00
Tom Hacohen 27b72840c8 Adjust usage of eo_constructor() according to recent changes. 2015-05-20 13:03:28 +01:00
Thiep Ha 8506c99f26 entry: update selection handlers when entry is resized
Summary:
When entry is resized, selection handlers are not updated,
it causes selection handlers to be placed in wrong position.
This patch fixes it.

@fix

Reviewers: woohyun, seoz, herdsman, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D2487
2015-05-19 21:13:55 +09:00
Amitesh Singh ea8838eb46 entry: No need to free ptr returned by _elm_util_mkup_to_text
Summary:
This is revision over D2459

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>

Reviewers: raster, Hermet, JackDanielZ

Subscribers: seoz, sachin.dev

Differential Revision: https://phab.enlightenment.org/D2461
2015-05-18 13:31:41 +03:00
Lukasz Stanislawski c306271bc3 atspi: handle state change notifications in on_focus function 2015-05-13 15:39:24 +02:00
Amitesh Singh f2be5189c9 entry: Fix memory leak.
Summary:
This fixes memory leak in case of txt is NULL

@Fix

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>

Reviewers: seoz, raster, Hermet

Subscribers: seoz, sachin.dev

Differential Revision: https://phab.enlightenment.org/D2459
2015-05-01 14:32:34 +09:00
Lukasz Stanislawski d6ca04a1b5 atspi: add 'editable' to elm_entry atspi states 2015-04-06 10:25:00 +02:00
Tom Hacohen 82a43998cb Revert "Revert "Elm helper: add the posix regex validator.""
Reapply the patch. Next commit will fix the break.

This reverts commit 6f8be78ca04125f220c339145d700fc2e1a1f9c1.
2015-04-02 10:37:37 +01:00
Carsten Haitzler 71dc4b5392 Revert "Elm helper: add the posix regex validator."
NO! this breaks compiling anything against elementary UNLESS you
enable eo beta api support. NO NO NO NO.

This reverts commit cad6de2a8ef93d994f9dedb8e980efe5fbf6d77e.
2015-04-02 09:48:29 +09:00
Vyacheslav Reutskiy 4c041aee9a Elm helper: add the posix regex validator.
Summary:
Added to Entry new signal "validate", this signal called from entry every
time when the text inputed to entry.
The regex validation add as elm_helper.
The styles of Entries scrollers are changed to allow highlightion that
is needed by regex processing.

For use regex with entry need register the regex helper as callback
to event: ELM_ENTRY_EVENT_VALIDATE

@feature

Test Plan:
See elementary_test "Entry Regex" test.
Note: when the string matches to regex the highlighting (green) is reset on unfocusing.

Reviewers: herdsman, raster, cedric, tasn

Reviewed By: cedric, tasn

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D2043
2015-04-01 16:11:18 +01:00
Andrii Kroitor 3857bf83ea elm_entry: fix focus on text selection
Summary:
Setting focus to entry object when text is being selected

@fix

Test Plan:
1. open "elementary_test entry3"
2. click on the big entry
3. mouse down on singleline entry to start selection
4. move mouse out of window
5. mouse up. text in that entry seems to be selected
6. press del or type any text

expected result: selected text in singleline entry is deleted/replaced
result without this patch: singleline entry is not focused and all edit actions are affecting the big one

Reviewers: cedric, Hermet, seoz

Subscribers: poornima.srinivasan, subodh6129, raster, reutskiy.v.v, herdsman

Differential Revision: https://phab.enlightenment.org/D1476
2015-03-19 17:43:04 +09:00
Amitesh Singh a56457ac76 entry: use ea_isa() for object types comparison
Reviewers: seoz, raster, Hermet

Reviewed By: Hermet

Subscribers: kimcinoo, seoz, sachin.dev

Differential Revision: https://phab.enlightenment.org/D2132
2015-03-12 15:44:09 +09:00
Andy Williams 3e78cbb1a6 entry: Don't unlink empty files when saving @fix T2122.
Simmple fix where we now only unlink if the object we are saving is NULL.
A null terminated string being null is not an error case.
2015-02-18 08:46:05 +00:00
kabeer khan d87b5c0e41 Elm_Entry: Removed empty line and added error message
Summary:
Resolved FIXME in utf8_markup_save by adding error messages
for fopen and fputs command

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns, seoz

Reviewed By: seoz

Differential Revision: https://phab.enlightenment.org/D1888
2015-01-30 08:02:21 +09:00
Jaeun Choi b817a5ca26 Elm_Entry: set handler style according to current widget style
Previously, entry set handlers' style as default when they are created
and changed style on theme_apply function. But in usual scenario, users create
entry and set style before handlers are created, so when they are created
the style is set as default regardless of the style users already set.
This patch fixes it.

@fix
2015-01-20 10:32:06 +09:00
Mike Blumenkrantz 7bebf6b3f8 entry now finds its window object more effectively for cnp init 2015-01-10 00:48:33 -05:00
Daniel Hirt e3baf4d3c1 Elm_Entry: Fix dropped text data insertion
Fixes bad drag&drop into entry widgets, since the drop callback
assumed that the dropped text ends with a NULL character.

How to reproduce:
1. Open 'elementary_test -to Entry'
2. Open some application (e.g. Firefox)
3. Select some (preferably short) text, and drag&drop it to the entry
widget. This sometimes pastes additional corrupted text (better try
with a 1-3 characters text).

@fix
2015-01-04 14:14:54 +02:00
Lukasz Stanislawski 2ca1f8a75a atspi: properly include at-spi headers.
Summary:
Change requested by TAsn. Previuosly AT-SPI headers were kept private
and included directly into elementary source code. From now on,
AT-SPI headers can be included from Elementary.h public header, however
will be marked as beta APIs.

Commit includes following changes:
* include all atspi headers into new elm_interfaces.h header.
* marking all at-spi interfaces methods/properties as @protected.
* wrap all common headers with EFL_BETA_API_SUPPORT.
* make some common APIs visible in lib, by adding EAPI attribute
  (if someone decides to use beta APIs).

Test Plan: out-off tree build with gcc, g++

Reviewers: tasn

Reviewed By: tasn

Subscribers: seoz, q66, kuuko

Maniphest Tasks: T1721

Differential Revision: https://phab.enlightenment.org/D1528
2014-10-17 16:57:26 +01:00
Tom Hacohen 7629c147eb Eo related: Change according to recent changes in eo_add().
For more info check out a7560dbc61 in
the EFL tree.
2014-09-25 17:39:34 +01:00
Jihoon Kim cdec9a9e85 Add elm_entry_input_hint_set/get API
Sets or get the input hint which allows input methods to fine-tune their behavior.
2014-09-01 19:04:05 +09:00
Jérémy Zurcher 33338c53aa fix wrong usage of EINA_FALSE as NULL 2014-08-22 10:20:57 +02:00
ChunEon Park c81683ba5a entry: fix clearing selection region problem while it's already selected.
if entry has selection, it would be cleared if selection region set is requested again.
because entry cancel the selection area after it reset the selection area.
unfortunately, the selection area is new selection so selection area is gone.

this patch prevent clearing selection and keep the new selection.

@fix
2014-08-15 17:44:13 +09:00
Carsten Haitzler f712ac567b elm entry - fix CID 1194480 in coverity
if sd->append_text_left was still set, free it - in case it was and
idler was not set.
2014-08-08 16:16:42 +09:00
yinsc 004bbb2dfc Fix T1289 issue: Elm entry text selection glitch
Summary: Fixes T123

Reviewers: zmike, seoz

CC: yinkair

Maniphest Tasks: T123, T1289

Differential Revision: https://phab.enlightenment.org/D1124
2014-07-07 12:42:43 +09:00
Daniel Kolesa 20525deb55 update according to latest efl changes: _CLASS -> _CLASS/INTERFACE/MIXIN 2014-06-30 21:37:04 +01:00
Daniel Juyung Seo b26413cf32 entry: fixed shadow variable build warnings. 2014-06-19 18:30:21 +09:00
Lukasz Stanislawski 1c350bbfad atspi: typo fix, avoid returning w/o va_end call
Summary:
CID: 1222462
CID: 1222461
CID: 1222465

Reviewers: raster, seoz, z.kosinski

Differential Revision: https://phab.enlightenment.org/D995
2014-06-11 16:05:54 +09:00
Zbigniew Kosinski 9ce23f0004 atspi:Set roles for widgets
Reviewers: stanluk, m.jagiello, raster

Differential Revision: https://phab.enlightenment.org/D930
2014-06-11 11:07:16 +09:00
Lukasz Stanislawski 139c871a72 atspi: add AtspiText and AtspiEditableText interface support.
Summary:
Added reference interface implementation for elm_entry widget. Tests added.
Updated at-spi-constants.h header to version 2.12.0.

Reviewers: raster, seoz

CC: raster

Differential Revision: https://phab.enlightenment.org/D806
2014-06-10 16:18:17 +09:00
Tom Hacohen efa41c7d75 Elm: Update code to use the new class names generated by eolian. 2014-06-03 11:54:44 +01:00
Thiep Ha 283140a639 entry: update selection handlers' visibility when entry is hidden or shown
Summary:
Selection handlers' visibility should be updated when entry is hidden or shown
When entry has selection and hidden, the selection handlers should be hidden also.
This fix T1175.

@fix

Reviewers: seoz, woohyun, raster

Reviewed By: raster

Maniphest Tasks: T1175

Differential Revision: https://phab.enlightenment.org/D877
2014-05-26 11:28:12 +09:00
Andy Williams ccc06de678 Correctly emit the scroll signal when scrolling an entry @fix T1274.
As the Elm_Entry has replaced the _scroll_cb we need to emit the same signal
(that was the only function of elm_scroller's _scroll_cb)
2014-05-22 22:35:06 +01:00
Youngbok Shin 8730b8d990 entry: Enable context menu with mosue down even if the entry is not editable in some case.
Summary:
Even if a entry is not editable, user can select text in the entry.
When the entry has selection, we have to support "copy" option.
@fix

Test Plan:
Precondition: Apply D852 patch for fixing a bug in elementary_test
1. elementary_test -to entry7
2. Select some text in the non-editable entry.
3. Press mouse right button.

Note: You can test it in Desktop profile.

Reviewers: tasn, woohyun, seoz

Differential Revision: https://phab.enlightenment.org/D848
2014-05-14 13:26:48 +01:00
Daniel Juyung Seo 8ffbf246f4 elm: fixed trivial formattings.
Just found them while reading codes.
2014-05-10 23:44:27 +09:00
Daniel Juyung Seo 44a67054de elm: fixed wrong internal variable name.
Unified the local variable name to ret if the ret is a return value of
another content_unset calls.
- Evas_Object *int_ret --> Evas_Object *ret
- Evas_Object *int_content --> Evas_Object *ret
- Evas_Object *content --> Evas_Object *ret
2014-05-10 14:13:57 +09:00
zmike 07c2da9e2c entry no longer completely breaks focus by focusing itself on selection signal
I don't know why this was added, but it breaks the ability to set focus on any widgets at all under some circumstances. it also is nonsensical since you should never need to set focus while selecting because:

* you are selecting with the mouse button, thereby having previously triggered focus from the mouse click

* you are selecting using api, in which case there's a config option to allow retaining selection which is also conceptually broken by this behavior

@fix
2014-04-26 01:41:15 -04:00
Ryuan Choi 4e4c7e8658 entry: Create selection handles as lazily as possible
Summary:
Moved the construction of selection handles to _update_selection_handler in order to
reduce the cost of construction of elm_entry little bit.

Reviewers: thiepha, Hermet, seoz, raster

CC: seoz, raster

Differential Revision: https://phab.enlightenment.org/D756
2014-04-24 17:52:23 +09:00
Carsten Haitzler 9d55fab418 entry: wrong viewport value calculation issue fix
Summary:
Issue: As entire scroller edje co-ordinates was being taken instead of the actual viewport value,
if in scroller edje more parts are added apart from just "elm.swallow.content", then the viewport value
set will be wrong. hence the selection handlers will not hide when they have to hide.

solution: Instead of taking scroller edje's geometry, get the actual viewport values.
To get viewport x,y a new scrollable interface is also added.

signed-off by: Shilpa Singh <shilpa.singh@samsung.com>

@fix

Test Plan: Selection handlers have to hide correctly when the text is scrolled in a scrolled entry, if the scroller edc of entry has more parts added other than elm.swallow.content, then when we scroll the selection handlers are not hidden correctly.

Reviewers: jaehwan, woohyun, seoz, Hermet, raster

CC: govi, rajeshps, thiepha

Differential Revision: https://phab.enlightenment.org/D674
2014-04-21 12:31:49 +09:00
Tom Hacohen 3a6e755963 entry: Adjusted to Eo2. 2014-04-10 09:35:00 +01:00
Daniel Zaoui f660fc7456 Eolian: Integration of Entry 2014-03-23 10:56:44 +02:00
Thiep Ha 197458d0f6 [Elm_Entry] Update selection handlers position and its visibility when scrolling
Summary:
Selection handlers' position are not updated when entry is scrolled.
You can check on elementary_test -> Entry 3 (or Entry 4 which is scrollable) -> Select some text -> Scroll entry and see.
This patch is submitted to fix this bug. It update selection handlers' position when entry is scrolled and hide them if needed.
@fix

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D640
2014-03-20 19:33:42 +09:00
Daniel Zaoui 7460467419 Eolian: Integration of Scrollable Interface 2014-03-18 08:14:44 +02:00
Daniel Zaoui e2206a1a22 Eolian: Integration of Elm Widget 2014-03-17 09:03:56 +02:00
Daniel Juyung Seo 2c0c0c335a entry: Use ELM_SAFE_FREE and fixed indentation. 2014-03-16 03:08:19 +09:00
ChunEon Park 549fb6019e entry - fixed calc issue of the wrap none mode.
This deferred recalc job is considered for wrap mode.
if the wrap mode is disabled, this job should be discarded.

since the wrap mode is enabled in default.
the job would be performed even the wrap mode was changed later.

@fix.
2014-03-15 15:40:12 +09:00
ChunEon Park 55827d034d entry - send selection,cleared signal if a selection is dismissed.
when the selection none was requested, the selection won't be cleared without the signal callback.

@fix
2014-03-08 03:54:13 +09:00
Carsten Haitzler 0871e2d2fe entry - fix menu to not popup after every time mobile sel handles are clicked
this fixes a behavior bug in entry @fix cherry-pick-me
2014-03-06 20:14:20 +09:00
Thiep Ha fcd164b4b0 Fix bug of moving cursor handler
Summary:
In elm entry, cursor handlers are placed and moved incorrectly if we do selection from bottom to top.
Ex: In elementary_test -> Entry -> Right click -> choose Select -> do selection from bottom to top (or press Shift + <- keys to do selection).
Look at selection handlers: they are incorrectly placed.
Try to move selection handlers: They suddenly move to near each other.

Minor: Remove unused variable.

@fix

Reviewers: seoz

Differential Revision: https://phab.enlightenment.org/D583
2014-03-06 20:14:11 +09:00
Thiep Ha 8f92069a63 [Elm_Entry] Fix bug: magnifier position is incorrect when mouse down on selection handler
Summary:
Magnifier is displayed incorrectly when mouse down on selection handler

Reproduce way: Right click on entry (eg Entry), choose Select, select some text, press left mouse
on selection handler (do not move the mouse), take a look at magnifier position.
Reason: Magnifier position is set to mouse down position in entry.
Fix: Check mouse down status and place correct position for magnifier.

Reviewers: seoz, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D573
2014-02-22 12:06:31 +09:00
Thiep Ha 771887df2b [Dnd] Fix double text insert issue in elm_entry, drop at disable, non-editable entry
Summary:
Issue 1: If you drop text to elm_entry, text is inserted twice.
Reason: Drop callbacks are registered multiple times in elm_entry.
Resolve: Register only one drop callback at entry side.

Issue 2: Even thought entry is disabled, non-editable, you still can drop text, image file. (Example, run Entry Scrolled and drop text, image file to disabled or non-editable entries).
Reason: Drop callback are registered but not remove when entry is set to disabled, non-editable mode.
Resolve: Correct registering and removing drop callbacks in entry.

Reviewers: JackDanielZ, raster

Reviewed By: raster

CC: woohyun

Differential Revision: https://phab.enlightenment.org/D565
2014-02-19 12:25:08 +09:00