Commit Graph

1131 Commits

Author SHA1 Message Date
Mykyta Biliavskyi fb59a491ba Indent: check last '\n' in file before convert edc source to the markup text.
This solve issue when the additional empty line was added
to the bottom of formatted text.

@fix T3128
2016-03-03 13:38:47 +09:00
Hermet Park ead1fdd6b1 edc_navigator: improve finding logic.
cursor jumps properly according to a selected item.
2016-02-29 21:32:30 +09:00
Hermet Park ff8458925e edc_navigator: 4th patch for base behavior.
add a function jumping editor cursor onto selected item.
2016-02-29 20:19:10 +09:00
Hermet Park 839b481e3c edc_navigator: fix a case that programs were not listed.
previously, program list were removed frequently.
but it should be kept for resusing.
2016-02-29 19:02:17 +09:00
Jaehyun Cho c86aa0dac6 Revert "edc_editor: optimize bracket logic."
This reverts commit 7250db0b10.

This commit causes unexpected cursor movement.
2016-02-29 18:14:26 +09:00
Mykyta Biliavskyi 01431db641 Parser: recognize keyword with context.
Uses the autocomplete context parser for recognizing keywords
with the same names in different contexts. For example:
the attributes "min" and "max" for a description context
should be integer values in range from 0 to 1000; but for a
"text" context those attributes should be boolean.

Curently add recognition for a "min" and "max" attributes in the "text" content.

@fix T2712
2016-02-29 18:12:19 +09:00
Jaehyun Cho 5ec2cb8599 template: Fix to set edc changed in template_insert().
Set edc changed in template_insert() to save template insertion.

Test Plan:
1. write a part. (e.g. rect { "rect2";)
2. insert desc template (ctrl + t)
2. close edc

When edc is closed without saving after inserting template, warning
popup should appear.
2016-02-29 17:38:53 +09:00
Jaehyun Cho b2286162a9 edc_editor: Fix to set edc changed in edit_text_insert().
Set edc changed in edit_text_insert() to save text insertion.

Test Plan:
1. open find/replace (ctrl + f)
2. write strings in "Find:" and "Replace with:"
3. push "Replace all"
4. close edc

When edc is closed without saving after replacing a string, warning
popup should appear.
2016-02-29 17:38:51 +09:00
Jaehyun Cho 5b00c94969 Revert "Show the save warning dialog on close unsaved file."
This reverts commit a2e8ea3028.

When a part is inserted by LiveEdit or modified by candidate popup, edc
file is saved automatically.

Conflicts:
	src/bin/file_mgr.c
2016-02-29 17:38:50 +09:00
Hermet Park d226cf54c2 edc_navigator: remove program list when other item types are selected. 2016-02-29 17:36:45 +09:00
Hermet Park d09c073fb0 edc_navigator: support program list 2016-02-29 17:28:25 +09:00
Hermet Park 647dbde8ca edc_navigator: 3rd patchset.
optimizing + stablizing functions.
2016-02-29 00:05:44 +09:00
Hermet Park bb09392d12 edc_navigator: 3rd patch for base navigation behavior. 2016-02-27 17:31:12 +09:00
Hermet Park 50a7b468ef edc_navigator: 2nd patch for base navigation behavior.
not completed.
2016-02-26 22:23:25 +09:00
Jaehyun Cho 69029879d8 ctxpopup: Reset candidate values by backspace key.
toggle, slider and colorselector values of candidate ctxpopup are reset
by backspace key.
2016-02-26 20:07:04 +09:00
Jaehyun Cho f96c2a92a6 ctxpopup: Refactoring to get sliders easily. 2016-02-26 19:34:07 +09:00
Jaehyun Cho 61a0effa33 ctxpopup: Refactoring to get toggles easily. 2016-02-26 19:32:00 +09:00
Hermet Park ac26094e08 ctxpopup: remove a warning.
casting 64bits data void * type correctly.
2016-02-26 16:55:26 +09:00
taehyub 27f62fc10b add color modification feature to change color easier
Summary:
To make it easier for user to modify color,
I added color modification feature such as colorselector,
color view, color inputs and priority color lists into the ctxpopup.

Test Plan:
1. click the 'color' keyword
2. see the color components of ctxpopup
3. change the color using the components

Reviewers: Jaehyun_Cho, NikaWhite, Hermet

Differential Revision: https://phab.enlightenment.org/D3726
2016-02-26 16:54:21 +09:00
Jaehyun Cho 3eb9a70024 edj_viewer: Show selected part state for newly created group.
Part state of new group is set before new group is loaded into layout.
So default part state of new group is displayed instead of selected part
state.
To fix this issue, part state of new group is set after new group is
loaded into layout.
2016-02-24 19:54:00 +09:00
Jaehyun Cho 5a9de80061 edj_viewer: Fix to highlight part for newly created group.
Part of new group is highlighted before new group is loaded into layout.
So after loading new group, part of new group is not highlighted.
To fix this issue, part of new group is highlighted after new group is
loaded into layout.
2016-02-24 19:38:40 +09:00
Jaehyun Cho 84a165c5d6 edj_viewer: Fix to call "part,clicked" callback for newly created group.
Part name list of new group is set before new group is loaded into
layout. So part name list of new group is not set and "part,clicked"
signal callback for each part is not called.
To fix this issue, part name list of new group is set after new group is
loaded into layout.
2016-02-24 19:11:25 +09:00
Jaehyun Cho 4d72aee9dd edj_viewer: Fix to show dummy swallow for newly created group.
Dummy swallow of new group is created before new group is loaded into
layout. So dummy swallow of new group is not displayed.
To fix this issue, dummy swallow is created after new group is loaded
into layout.
2016-02-24 19:11:23 +09:00
Jaehyun Cho af1591100c text_setting: Select current font name and style. 2016-02-23 22:38:13 +09:00
Hermet Park df7b31d544 fix a crash issue.
part won't be have any names.

@fix T3201
2016-02-23 21:33:11 +09:00
Hermet Park 7e7a1f02b7 rearrange a minimum size of window. 2016-02-23 20:07:05 +09:00
Jaehyun Cho 650c017df9 Revert "text_setting: Show monospaced fonts."
This feature is useful for small number of developers.
From the point of maintenance view, reverting this feature is better.

This reverts commit f391c03be0.
2016-02-23 18:59:07 +09:00
Jaehyun Cho e81fa2f350 Revert "text_setting: Change "Monospaced" to "Fixed-width"."
To revert commit f391c03be0, revert this
commit.

This reverts commit c3a8e7d03f.
2016-02-23 18:58:02 +09:00
Jaehyun Cho 1af1cca8f6 config: Set default monospaced font on Ubuntu. 2016-02-23 16:51:57 +09:00
Jaehyun Cho c3a8e7d03f text_setting: Change "Monospaced" to "Fixed-width".
Change "Monospaced" to "Fixed-width" for better understanding.
2016-02-23 14:45:32 +09:00
Mykyta Biliavskyi 2005ee095c Indent: clean code. Delete unused variables. 2016-02-23 14:30:05 +09:00
Mykyta Biliavskyi 843f6cc195 Indent: add logic to paste formatted text above or below current line.
Checking the string from start till cursor position is empty.
And in case if this range is empty - formatted text will be
inserted above the current line.
2016-02-23 14:05:33 +09:00
Jaehyun Cho f391c03be0 text_setting: Show monospaced fonts.
Monospaced fonts are identified by fontconfig APIs.
(i.e. Monospaced fonts have a spacing value with 100.)
Therefore, showing monospaced fonts are available only if fontconfig is
installed.
2016-02-23 12:19:12 +09:00
Jaehyun Cho 9a4c1c667c config: Set default monospaced font on Windows and OSX. 2016-02-22 22:59:05 +09:00
Hermet Park b891b071be edc_navigator: not completed. but first patch set for base layout & infra 2016-02-22 20:44:41 +09:00
Jaehyun Cho 28a622d04e config: Set monospaced font as a default font. 2016-02-22 20:27:34 +09:00
Hermet Park 313274df6e fix broken view size reset.
implementing was missing. :(
2016-02-22 19:37:38 +09:00
Mykyta Biliavskyi 02b45c0719 Redoundo: Support the real-time preview when we undo/redo the code.
When user undo or redo change, the edc file will be recompiled and the
live view will be updated. There are two flow: in case if the change is buildable
(i.e. the edc file was builded sucessfuly, when this change happened)
edc file will be recompiled. In case when change marked as unbilduable -
nothing will happen.

@T3051
2016-02-22 18:49:46 +09:00
taehyub 92fe342039 apply ELM_CNP_MODE_PLAINTEXT mode to enventor entry
Summary:
When copy & paste in markup text mode, elm_entry does not support to close markup text.
In enventor the feature cause the color changes about the pasted text.
so I applied the plain text mode to prevent color changes when some text are pasted.

Test Plan
1. copy some text
2. paste anywhere
3. see the color of the text whether there are color changes or not

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3717
2016-02-19 18:36:26 +09:00
Mykyta Biliavskyi 57c78d0993 Edj viewer: clean the list of the part names when module terminate. 2016-02-19 17:34:17 +09:00
Yongheon, Shin dac33a48f6 Set the cursor region of part, when selecting in live editor
Summary: Set the cusor region of part, when selecting in live editor

Test Plan:
1. Open the enventor and load a sample
           2. Select a part in live editor

Reviewers: Jaehyun_Cho, Hermet

Subscribers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3690
2016-02-19 17:02:28 +09:00
taehyub 5fceb29b5b fix the error word select function
Summary:
removed the animator creation when mouse double click in console box.
If use animator, there can be unexpected behavior like selection region is deleted when long script is loaded.
@fix

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3714
2016-02-19 16:10:23 +09:00
Jaehyun Cho f2bae6cc6b indent: Refactoring indent_text_create().
Utilize indent_code_lines_create() function.
2016-02-19 14:58:42 +09:00
Jaehyun Cho 3871364b10 indent: Refactoring indent_text_auto_format().
Move the module parsing codes and creating code line list to
indent_code_lines_create() function.
2016-02-19 14:34:03 +09:00
Jaehyun Cho 02a4549906 indent: Apply indentation to newly loaded edc text
When an edc text is newly loaded, the edc text is indendted if its
indentation is not correct.
The indented text creation function, indent_text_create(), utilizes
the logic of indent_text_auto_format().
2016-02-19 14:19:41 +09:00
Jaehyun Cho 26b84340fe indent: Fix not to insert a new line between '{' and block state
<Test Case>
1. Copy "description { "default";" in basic.edc.
2. Paste

<Test Result>
Previously, a new line is inserted between "description {" and
""default";".
Now, the copied text is pasted.
2016-02-19 10:42:13 +09:00
Jaehyun Cho 63bff24817 indent: Fix indentation calculation in line comment 2016-02-19 10:36:52 +09:00
Jaehyun Cho d1674c0ef0 indent: Fix indentation calculation in macro 2016-02-19 10:36:25 +09:00
Mykyta Biliavskyi 726cd500a6 Edc parser: fix memory leak.
Function elm_entry_markup_to_utf8 returned malloc'ed buffer and
it should be freed.
2016-02-19 10:09:27 +09:00
Jaehyun Cho e0daa7936a indent: Fix to paste markup symbols
Previously, utf8 is set into textblock in copy&paste.
Now, markup is set into textblock in copy&paste.

<Test Case>
1. Copy "if (A && B) set_int(num, 1);"
2. Paste

<Test Result>
Previously, "if (A " is pasted.
Now, the copied text is pasted.
2016-02-19 09:30:47 +09:00
Hermet Park 30af154860 revise previous patch code.
d929258e57.

scalable.
icon.
etc...
2016-02-19 02:52:49 +09:00
taehyub d929258e57 add back button in menu and about screen
Summary:
Summary
There is no back button in menu and about screens.
So user cannot close the screens without 'escape key'.
To make more efficient I added back button on the screens.

Test Plan:
1. press 'esc' key
2. see the back button on the screen
3. prees 'F2' key
4. see the back button on the screen

Reviewers: Jaehyun_Cho, NikaWhite, Hermet

Differential Revision: https://phab.enlightenment.org/D3705
2016-02-19 02:26:15 +09:00
Hermet Park 811875fd04 fix build break. 2016-02-19 02:16:47 +09:00
Mykyta Biliavskyi 269bf8b393 Edc editor: improve search the cursor position for the selected part.
In parsing the part blocks added additional check for a block type name.
This make possible to differ names of the part block and names,
that uses inside attributes, style blocks, programs and etc.

fix T2977
2016-02-18 15:37:20 +09:00
Jaehyun Cho b2282f628b indent: Fix not to process complex logic for single markup symbols 2016-02-18 02:12:41 +09:00
Hermet Park 958900962e editor: remove an unnecessary comment. 2016-02-17 21:57:49 +09:00
taehyub 44935bd484 remove unnecessary selection recover logic
Summary:
selection region recovery is applied twice in entry recover.
there are selection region recovery logic before elm_entry_selection_region_set,
but we also recover using elm_entry_selection_region_set.
it is unncessary code.

@fix

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3709
2016-02-17 21:54:36 +09:00
Jaehyun Cho 503afcc4c5 indent: Fix not to insert a new line within macro
Do not insert a new line after '{', '}', ';' if it is within macro.

<Test Case>
1. Copy the following in edc.
"#define FN_COL_DEFAULT 255 255 255 255; color3: 0 0 0 128"
2. Paste

<Test Result>
Previously, a new line is inserted after ';' within the macro.
Now, the same text with the copied text is pasted.
2016-02-17 21:34:48 +09:00
Jaehyun Cho dffb6ead04 indent: Keep coding convensions in indent_text_auto_format() 2016-02-17 21:34:44 +09:00
Jaehyun Cho e5aa15a1df indent: Fix to insert a new line after comment line
<Test Case>
1. Copy the following in basic.edc.
"/* TODO: Please replace embedded image files to your application image files. */
images {"
2. Paste

<Test Result>
Previously, the new line between line comment and code disappears.
Now, the new line between line comment and code is preserved.
2016-02-17 21:34:40 +09:00
Jaehyun Cho f98127a485 indent: Fix to preserve separate code lines
If copied code lines are in the separate lines, then paste those code
lines in the separate lines.

<Test Case>
1. Copy the following in edc.
"TILED_HORIZ(120)
visible: 0;"
2. Paste

<Test Result>
Previously, those code lines are pasted in the same line.
Now, those code lines are pasted in the separate lines like original
code lines.
2016-02-17 21:34:37 +09:00
Jaehyun Cho f2d889dbf7 indent: Fix not to insert a new line between '{' and block name
<Test Case>
1. Copy "group { "main";" in basic.edc.
2. Paste

<Test Result>
Previously, a new line is inserted between "group {" and ""main";".
Now, the copied text is pasted.
2016-02-17 21:34:33 +09:00
Jaehyun Cho 91ae4f1c47 indent: Fix to paste copied text not ending with '{', '}', ';'
<Test Case>
1. Copy "group { "main"; parts" in basic.edc.
2. Paste

<Test Result>
Previously, "parts" is not pasted. But now it is pasted.
2016-02-17 21:34:28 +09:00
Jaehyun Cho 0b8734f14d indent: Fix to compare string before '\0' 2016-02-17 21:34:24 +09:00
taehyub cf417f8fa4 fix the unexpected selection problem
Summary:
There is a delay for getting selection start position.
It cause the wrong selection recovery.
so I modified the selection recover logic
using the selection region of entry.

@fix

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3680
2016-02-17 20:37:22 +09:00
Hermet Park 28e9bebcc5 console: code refactoring
make it clean.
2016-02-17 19:16:39 +09:00
taehyub 83e66e43bd focus error notification when error is occured
Summary: select error word when error is occured

Test Plan:
1. make some error in edc script
2. press ctrl + s
3. see the selection region of error word

Reviewers: Hermet, Jaehyun_Cho, NikaWhite

Differential Revision: https://phab.enlightenment.org/D3681
2016-02-17 19:07:34 +09:00
Hermet Park d388f581e5 setting: fix broken view scale entries.
this seems caused by elementary change,
92d905ffa0e9c5b2f5b01885856349a010b49ee4
2016-02-16 21:58:58 +09:00
Hermet Park d84e1b11b6 text_setting: remove redundant code.
That code is totally useless at the moment.
I belive color palette will be introduced in enventor soon.
2016-02-16 21:46:51 +09:00
Hermet Park 86d07222f6 Revert "indent: Apply indentation for newly loaded edc file"
This reverts commit 66328e75f3.

This patch broke enventor :-(
please test with games/etypers/data/themes/etyers.edc
2016-02-13 03:32:29 +09:00
Hermet Park 4f9b9807cb Revert "indent: Cover comment line and block name for insert indentation"
This reverts commit ccee4e868d.
2016-02-13 03:32:02 +09:00
Jaehyun Cho ccee4e868d indent: Cover comment line and block name for insert indentation
Lexeme for insert indentation ends with comment line as well.
So a new line is inserted after comment line.
Lexeme for insert indentation does not end with '{' if block name is
written after the bracket.
So a new line is not inserted between '{' and block name.
2016-02-12 21:39:57 +09:00
Jaehyun Cho 66328e75f3 indent: Apply indentation for newly loaded edc file
Auto indentation is applied when an edc file is newly loaded.
2016-02-12 21:39:51 +09:00
taehyub e5bbb91914 console.c: error log redirecting when double click in console box
Summary:
When there are some errors in the edc, console box shows the error logs.
I added error log redirecting feature to find error word in the edc script.
Now, We just double click the console box to find error logs.

Test Plan:
  1. make some errors
  2. press ctrl + s
  3. do mouse double click in console box
  4. see the selection region of error word in edc script

Reviewers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3652
2016-02-12 19:13:43 +09:00
Hermet Park 4710a53a94 main: remove unnecessary call
ELM_MAIN() calls elm_shutdown().
2016-02-11 22:07:10 +09:00
Hermet Park 7250db0b10 edc_editor: optimize bracket logic.
we don't need to apply bracket everytime.
Previously brackets didn't applied and current brackets are no valid either
then skip to apply bracket highlighting function.
2016-02-11 14:57:50 +09:00
taehyub 7811da09b0 Add bracket highlight function in thread function
Summary:
Add bracket highlight function in thread function.
It cause the entry scroller moving when scroller bar is unpressed.

@T3145

Reviewers: Hermet, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3671
2016-02-11 14:50:13 +09:00
Hermet Park fe41adaa28 support a guide text for editor ctxpopup.
introduce a new smart callback "ctxpopup,activated"

@feature
2016-02-09 17:51:11 +09:00
Hermet Park ab0dab409c stats: add a function to resize a live view.
previously, editor ctxpopup had inc/dec buttons to control values elaboratly.
I removed them because user could control them using mouse wheel.

I believe it's cleaner and nicer ui for enventor.

@feature
2016-02-09 17:19:23 +09:00
Hermet Park c5c352c917 ui: improve editor ctxpopup function.
allow +/- buttons' autorepeat functions.
2016-02-09 15:41:30 +09:00
Hermet Park ab8dc5f3ed ui: improve editor ctxpopup.
remove a entry in the editor ctxpopup.
we don't need to display entry anymore
since the changes is simulteniously applied into the editor text.
2016-02-09 15:32:42 +09:00
Hermet Park 9fda7d3407 improve ux: change editor ctxpopup direction order.
Come to think of it, up/down direction of ctxpopup is more comfortable
to watch the values updation while modifying the values in ctxpopup.
2016-02-09 02:07:44 +09:00
Hermet Park df3d1f9e4d status: improve button style. 2016-02-06 03:04:22 +09:00
Hermet Park 0a52422284 align the setting's view scale slider label.
This is a tricky method,
but can't control the slider label without it.
2016-02-05 20:16:11 +09:00
Hermet Park 3bb0eb04e7 remove the concept of resizable view size.
As far as I reviewed, this function is useless.
We remove it because now people can control the exact size of view.
2016-02-05 20:11:24 +09:00
Hermet Park 5ede4deb93 fix build break.
TRANSIT_TIME define was just missed.
2016-02-05 18:40:49 +09:00
Hermet Park c499de4e88 stats: inverting view size with transition. 2016-02-05 18:14:16 +09:00
Hermet Park bb81be9901 status: code refactoring.
we don't need a disabled function but just unfocusable buttons.
2016-02-05 17:58:01 +09:00
taehyub 4b82e2b945 fix the problem of selection cursor moving
Summary:
The selection cursor is moved at the frist
When clicking and moving the bracket using the mouse.
In entry_recover(), there is no selection cursor recover machanism.
So I added the selection recover logic in the function.
Now, it is fixed.

@fix
@T3099

Test Plan:
  1. click the bracket
  2. moving the cursor keeping the mouse clicking
  3. see the fixed result

Reviewers: Jaehyun_Cho, Hermet

Differential Revision: https://phab.enlightenment.org/D3641
2016-02-05 17:47:53 +09:00
Hermet Park 75345770ce add a function to invert view size. 2016-02-05 17:42:26 +09:00
Hermet Park 10c40a182c change the guide text of the fixed live view size. 2016-02-05 16:16:30 +09:00
Hermet Park 4f4fd2c792 Improve the guide text (more kindly) for the live edit. 2016-02-05 16:04:32 +09:00
Hermet Park e90df35c2c Improve a behavior of mouse wheel for live view.
Before this change, live view won't be scaled up/down with mouse wheel
unless the live view size was fixed.

Now, it automatically fixes the size of view then change the scale of view.
2016-02-05 15:57:00 +09:00
Hermet Park 924cf47060 tools - rearrange tool buttons position. 2016-02-04 21:15:29 +09:00
Hermet Park c8aa003ec3 update live edit tools 2016-02-04 21:04:33 +09:00
Hermet Park 9974c8bcb6 status: disable status when menus were enabled. 2016-02-04 15:35:38 +09:00
Hermet Park 8aac906c82 Revert "fix the problem of selection cusor moving"
This reverts commit e8ade4e64b.

This patch was not intended :(
2016-02-03 14:06:52 +09:00
Hermet Park c610bebb8d Set focus to the editor when zooming popup is dismissed.
This fixed the after focus image of the zooming popup.
2016-02-03 14:04:41 +09:00
taehyub e8ade4e64b fix the problem of selection cusor moving
Summary:
The selection cursor is moved at the frist
When clicking and moving the bracket using the mouse.
In entry_recover(), there is no selection cursor recover machanism.
So I added the selection recover logic in the function.
Now, it is fixed.

@fix
@T3099

Test Plan:
  1. click the bracket
  2. moving the cursor keeping the mouse clicking
  3. see the fixed result

Reviewers: Hermet, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3641
2016-02-03 10:36:12 +09:00
Yongheon, Shin 22579bec50 Add keyword feature for base_scale
Summary: When selecting with double-click on base_scale variable, add keyword

Reviewers: Jaehyun_Cho

Subscribers: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D3633
2016-02-02 18:09:44 +09:00