diff --git a/AUTHORS b/AUTHORS index eb4fcee..98731f0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -28,3 +28,6 @@ Yongheon Shin Vyacheslav Reutskiy Bowon Ryu Jean Guyomarc'h +Thiep Ha +YeongJong Lee +Massimo Maiurana diff --git a/Makefile_Eolian_Helper.am b/Makefile_Eolian_Helper.am index 377f173..3b4bf7a 100644 --- a/Makefile_Eolian_Helper.am +++ b/Makefile_Eolian_Helper.am @@ -13,12 +13,12 @@ am__v_EOL_0 = @echo " EOLIAN " $@; SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h %.eo.c: %.eo ${_EOLIAN_GEN_DEP} - $(AM_V_EOL)$(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gc -o $@ $< + $(AM_V_EOL) $(EOLIAN_GEN) $(EOLIAN_FLAGS) -gc -o c:$@ $< %.eo.h: %.eo ${_EOLIAN_GEN_DEP} - $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $< + $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gh -o h:$@ $< %.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP} - $(AM_V_EOL)$(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gh -o $@ $< + $(AM_V_EOL)$(EOLIAN_GEN) $(EOLIAN_FLAGS) -gl -o l:$@ $< CLEANFILES += $(BUILT_SOURCES) diff --git a/NEWS b/NEWS index d5c3249..beafc4c 100644 --- a/NEWS +++ b/NEWS @@ -96,7 +96,7 @@ Fixes: * EDC Editor: Compare name elaborately to search the clicked part correctly. * Live Edit: Fix malfunction of key input on Windows. * Live Edit: Fix center guide text positioning problem. - * Live View: Update dummpy part when removing all source code. + * Live View: Update dummy part when removing all source code. * RedoUndo: Correct work with unicode symbols. * Template: Fix the error of line position when inserting group template. * Template: Fix line count of textblock part inserted in live edit mode. @@ -108,7 +108,7 @@ Fixes: * Ctxpopup: Don't display image previews if the selected image string is in comments. * Auto Completion: Fix its list moved to selected part name position. * Fix a crash issue when removing all code in edc editor. - * Fix a complation issue when new empty file is opened. + * Fix a compilation issue when new empty file is opened. * Fix a color selector to scalable. Changes since Enventor 0.7.0: diff --git a/README b/README index d1e1952..f71570d 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Enventor, which is also known as EDC (Edje Data Collections) Editor, is a EDC script editor tool that supports text editing and previewing functions for the EDC source code. -When your application requires real-time changeable layouts like animated ones, then you can write the layout design using EDC script, compile it into EDJ format file, and import it into your application using a UI layout component. You can also write design layouts from simple to complex ones using the EDC script with Enventor. Enventor helps you write EDC script code eaiser and finish your work faster. If you are not familiar with EDC programming, see Edje Programming Guide - https://www.enlightenment.org/program_guide/edje_pg for more information. +When your application requires real-time changeable layouts like animated ones, then you can write the layout design using EDC script, compile it into EDJ format file, and import it into your application using a UI layout component. You can also write design layouts from simple to complex ones using the EDC script with Enventor. Enventor helps you write EDC script code easier and finish your work faster. If you are not familiar with EDC programming, see Edje Programming Guide - https://www.enlightenment.org/program_guide/edje_pg for more information. [Requirements] @@ -46,7 +46,7 @@ Ctrl+U - Toggle Dummy Parts Ctrl+H - Toggle Part Highlighting Ctrl+M - Toggle Mirror Mode Ctrl+W - Toggle Wireframes -Ctrl+T - Insert Defaut Template Code +Ctrl+T - Insert Default Template Code Ctrl+Mouse Wheel Up - View Zoom In / Font Size Up Ctrl+Mouse Wheel Down - View Zoom Out / Font Size Down @@ -56,7 +56,7 @@ Alt+Up - Toggle Full Console View Alt+Down - Toggle Full Editors View Ctrl+A - Select Text All -Ctrl+Double Click - Select a word +Ctrl+Double Click - Select a word without openning candidate popup Ctrl+Z - Undo Text Ctrl+R - Redo Text Ctrl+C - Copy Selected Text diff --git a/configure.ac b/configure.ac index 41cc761..39da4f5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_define([v_maj], [1]) m4_define([v_min], [0]) -m4_define([v_mic], [0]) +m4_define([v_mic], [99]) #m4_define([v_rev], m4_esyscmd([(git rev-list --count HEAD 2>/dev/null || echo 0) | tr -d '\n']))dnl ##-- When released, remove the dnl on the below line dnl m4_undefine([v_rev]) diff --git a/data/color/edc.src b/data/color/edc.src index a7e5b73..a618e51 100644 --- a/data/color/edc.src +++ b/data/color/edc.src @@ -40,6 +40,8 @@ group "syntax_color_group" struct { value "key" string: "externals"; value "key" string: "external"; value "key" string: "fill"; + value "key" string: "filters"; + value "key" string: "filter"; value "key" string: "fonts"; value "key" string: "gradient"; value "key" string: "group"; @@ -98,6 +100,7 @@ group "syntax_color_group" struct { value "key" string: "border"; value "key" string: "center"; value "key" string: "clip_to"; + value "key" string: "code"; value "key" string: "color2"; value "key" string: "color3"; value "key" string: "color_class:"; @@ -107,9 +110,11 @@ group "syntax_color_group" struct { value "key" string: "effect"; value "key" string: "ellipsis"; value "key" string: "entry_mode"; + value "key" string: "file"; value "key" string: "fixed"; value "key" string: "focal"; value "key" string: "font"; + value "key" string: "hid"; value "key" string: "ignore_flags"; value "key" string: "image"; value "key" string: "inherit"; diff --git a/data/help/HISTORY b/data/help/HISTORY index d982be3..3b61230 100644 --- a/data/help/HISTORY +++ b/data/help/HISTORY @@ -41,7 +41,7 @@ * EDC Editor: Compare name elaborately to search the clicked part correctly.
* Live Edit: Fix malfunction of key input on Windows.
* Live Edit: Fix center guide text positioning problem.
- * Live View: Update dummpy part when removing all source code.
+ * Live View: Update dummy part when removing all source code.
* RedoUndo: Correct work with unicode symbols.
* Template: Fix the error of line position when inserting group template.
* Template: Fix line count of textblock part inserted in live edit mode.
@@ -53,7 +53,7 @@ * Ctxpopup: Don't display image previews if the selected image string is in comments.
* Auto Completion: Fix its list moved to selected part name position.
* Fix a crash issue when removing all code in edc editor.
- * Fix a complation issue when new empty file is opened.
+ * Fix a compilation issue when new empty file is opened.
* Fix a color selector to scalable.

Please see NEWS for more information. diff --git a/data/help/INTRO b/data/help/INTRO index 333c061..f11de2e 100644 --- a/data/help/INTRO +++ b/data/help/INTRO @@ -2,7 +2,7 @@
Enventor, which is also known as EDC (Edje Data Collections) Editor, is a EDC script editor tool that supports text editing and previewing functions for the EDC source code.

-When your application requires real-time changeable layouts like animated ones, then you can write the layout design using EDC script, compile it into EDJ format file, and import it into your application using a UI layout component. You can also write design layouts from simple to complex ones using the EDC script with Enventor. Enventor helps you write EDC script code eaiser and finish your work faster. If you are not familiar with EDC programming, see Edje Programming Guide - https://www.enlightenment.org/program_guide/edje_pg for more information.
+When your application requires real-time changeable layouts like animated ones, then you can write the layout design using EDC script, compile it into EDJ format file, and import it into your application using a UI layout component. You can also write design layouts from simple to complex ones using the EDC script with Enventor. Enventor helps you write EDC script code easier and finish your work faster. If you are not familiar with EDC programming, see Edje Programming Guide - https://www.enlightenment.org/program_guide/edje_pg for more information.

Please see the following sites for more information.

diff --git a/data/help/SHORTCUT b/data/help/SHORTCUT index a67b634..9b8a37e 100644 --- a/data/help/SHORTCUT +++ b/data/help/SHORTCUT @@ -17,7 +17,7 @@ Ctrl+H - Toggle Part Highlighting
Ctrl+M - Toggle Mirror Mode
Ctrl+W - Toggle Wireframes
- Ctrl+T - Insert Defaut Template Code
+ Ctrl+T - Insert Default Template Code
Ctrl+Mouse Wheel Up - View Zoom In / Font Size Up
Ctrl+Mouse Wheel Down - View Zoom Out / Font Size Down

@@ -29,7 +29,7 @@
Text Editor:
Ctrl+A - Select Text All
- Ctrl+Double Click - Select a word
+ Ctrl+Double Click - Select a word without openning candidate popup
Ctrl+Z - Undo Text
Ctrl+R - Redo Text
Ctrl+C - Copy Selected Text
diff --git a/data/images/ENVENTOR_EMBEDDED_BAT2.svg b/data/images/ENVENTOR_EMBEDDED_BAT2.svg index 852764b..333bb08 100644 --- a/data/images/ENVENTOR_EMBEDDED_BAT2.svg +++ b/data/images/ENVENTOR_EMBEDDED_BAT2.svg @@ -1,3 +1,3 @@ - + diff --git a/data/reference/reference.src b/data/reference/reference.src index ad263de..a3be737 100644 --- a/data/reference/reference.src +++ b/data/reference/reference.src @@ -256,6 +256,8 @@ collections { "The collections represents a theme.
The text block is used to define text properties."; align { "Moves the text relatively along both axis inside the part.
For horizontal alignment, 0.0 moves the text to touch the left edge of the part and 1.0 moves the text to touch the right edge of the part.
For vertical alignment, 0.0 moves the text to touch the top edge of the part and 1.0 moves the text to touch the bottom edge of the part.
The default value is 0.5 0.5."; } + domain { "Sets the domain name of the .mo file which has to be checked for translation."; + } ellipsis { "Balances the text in a relative point from 0.0 to 1.0, this point is the last section of the string to be cut out in case of a resize that is smaller than the text itself.
The default value is 0.0."; } fit { "Specifies whether resizing the text to fit in the part or not.
The default value is 0 0 (disabled)."; @@ -274,7 +276,7 @@ collections { "The collections represents a theme.
The styleblock with the specified name."; + style { "Uses the default style and tags defined in the style block with the specified name."; } text { "Sets the default text string."; } @@ -323,7 +325,7 @@ collections { "The collections represents a theme.
The The available modes are DEFAULT and EXPLICIT."; } - source { "Sets the given group to the group/textblock parts."; + source { "Sets the given group to the group/textblock parts.
Sets the given elementary widget to the external part. (e.g. elm/button)"; } table { "On a box part, the table block is used to set other groups as elements of the box.
These can be mixed with external objects set by the application through the edje_object_part_box*() functions."; items { "The items block contains a list of item blocks.
Each item item block contains other group as an element of the box."; @@ -361,7 +363,7 @@ collections { "The collections represents a theme.
The The available types are IMAGE (default), RECT, SWALLOW, TEXT, TEXTBLOCK, SPACER, GROUP, BOX, TABLE, and PROXY."; + type { "Sets the part type.
The available types are IMAGE (default), RECT, SWALLOW, TEXT, TEXTBLOCK, SPACER, GROUP, BOX, TABLE, PROXY and EXTERNAL."; } } @@ -369,6 +371,10 @@ collections { "The collections represents a theme.
The external represents an external part. The external part is used to set a widget inside of it.
The external block contains a list of descriptions that defines a state of the external part."; + #inherit "collections.group.parts.part"; + } + group { "The group represents a group part. The group part is used to include other group (widget style) inside of it.
The group block contains a list of descriptions that defines a state of the group part."; #inherit "collections.group.parts.part"; } @@ -546,4 +552,4 @@ styles { "The styles block contains a list of one or more tag defines the meaning of each tag in the style.
Style is applied to the text between the beginning tag and the ending tag ."; } } -} \ No newline at end of file +} diff --git a/data/templates/Basic.edc b/data/templates/Basic.edc index c357c45..51c62c0 100644 --- a/data/templates/Basic.edc +++ b/data/templates/Basic.edc @@ -29,7 +29,7 @@ collections { } } text { "text"; - scale: 1; + scale; effect: SOFT_OUTLINE; desc { "default"; rel1.relative: 0.0 0.5; @@ -68,4 +68,4 @@ collections { } */ } -} \ No newline at end of file +} diff --git a/data/templates/CustomButton.edc b/data/templates/CustomButton.edc index a138751..c3193c1 100644 --- a/data/templates/CustomButton.edc +++ b/data/templates/CustomButton.edc @@ -194,7 +194,7 @@ collections { } text { "sizer.content"; nomouse; - scale: 1; + scale; desc { "default"; visible: 0; text { @@ -228,7 +228,7 @@ collections { text { "elm.text"; nomouse; effect: SHADOW BOTTOM; - scale: 1; + scale; desc { "default"; rel1.offset: 0 5; rel1.relative: 1.0 0.0; diff --git a/data/templates/Group.edc b/data/templates/Group.edc index b3c8e0b..152d576 100644 --- a/data/templates/Group.edc +++ b/data/templates/Group.edc @@ -21,7 +21,7 @@ collections { group { "my_group"; parts { text { "text"; - scale: 1; + scale; effect: SOFT_OUTLINE; desc { "default"; color: 255 255 255 255; @@ -35,4 +35,4 @@ collections { } } } -} \ No newline at end of file +} diff --git a/data/templates/Listitem.edc b/data/templates/Listitem.edc index 854a40d..2da82a7 100644 --- a/data/templates/Listitem.edc +++ b/data/templates/Listitem.edc @@ -14,7 +14,7 @@ collections { } parts { rect { "bg"; - scale: 1; + scale; desc { "default"; color: 233 242 242 255; align: 0.5 0.5; @@ -26,7 +26,7 @@ collections { } } rect { "point_rect"; - scale: 1; + scale; desc { "default"; color: 0 176 137 255; align: 0.0 0.0; @@ -39,7 +39,7 @@ collections { } } spacer { "padding_left"; - scale: 1; + scale; desc { "default"; align: 0.0 0.5; rel1.to: "point_rect"; @@ -50,7 +50,7 @@ collections { } } image { "icon_status"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_ICON_ARROW.png"; @@ -65,7 +65,7 @@ collections { } } swallow { "icon_user"; - scale: 1; + scale; desc { "default"; align: 0.0 0.5; rel1.to: "icon_status"; @@ -76,7 +76,7 @@ collections { } } text { "user_name"; - scale: 1; + scale; desc { "default"; color: 130 130 130 255; text { @@ -95,7 +95,7 @@ collections { } } text { "message"; - scale: 1; + scale; desc { "default"; color: 145 145 145 255; text { @@ -116,7 +116,7 @@ collections { } } spacer { "padding_right"; - scale: 1; + scale; desc { "default"; align: 1.0 0.5; rel1.to: "bg"; @@ -127,7 +127,7 @@ collections { } } text { "date"; - scale: 1; + scale; desc { "default"; color: 135 135 135 255; text { @@ -148,7 +148,7 @@ collections { } } image { "icon_clip"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_ICON_CLIP.png"; @@ -167,7 +167,7 @@ collections { } } image { "icon_badge"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_ICON_BADGE.png"; @@ -185,7 +185,7 @@ collections { } } image { "icon_lock"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_ICON_LOCK.png"; @@ -204,7 +204,7 @@ collections { } } swallow { "icon_check"; - scale: 1; + scale; desc { "default"; align: 1.0 0.5; rel1.to: "padding_right"; @@ -217,7 +217,7 @@ collections { } } spacer { "padding_icon"; - scale: 1; + scale; desc { "default"; align: 1.0 0.5; rel1.to: "icon_check"; diff --git a/data/templates/Map.edc b/data/templates/Map.edc index 1b68dfd..198a46c 100644 --- a/data/templates/Map.edc +++ b/data/templates/Map.edc @@ -41,7 +41,7 @@ collections { } } text { "text"; - scale: 1; + scale; effect: SOFT_OUTLINE; desc { "default"; rel1.relative: 0.0 0.5; @@ -75,4 +75,4 @@ collections { } } } -} \ No newline at end of file +} diff --git a/data/templates/MobileLayout.edc b/data/templates/MobileLayout.edc index 314a878..8ff70ed 100644 --- a/data/templates/MobileLayout.edc +++ b/data/templates/MobileLayout.edc @@ -8,14 +8,14 @@ collections { } parts { rect { "base"; - scale: 1; + scale; desc { "default"; min: 200 300; } } /* Header */ rect { "header"; - scale: 1; + scale; desc { "default"; color: 200 0 0 255; align: 0.0 0.0; @@ -28,7 +28,7 @@ collections { } } spacer { "header_padding"; - scale: 1; + scale; desc { "default"; align: 0.0 0.5; rel1.to: "header"; @@ -38,7 +38,7 @@ collections { } } image { "header_button_panel_open"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_ICON_DOCK.png"; @@ -56,7 +56,7 @@ collections { } } image { "header_button_panel_close"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_ICON_DOCK_DOWN.png"; @@ -75,7 +75,7 @@ collections { } } text { "header_title"; - scale: 1; + scale; desc { "default"; text { size: 15; @@ -89,7 +89,7 @@ collections { } /* Content */ spacer { "content_padding_top"; - scale: 1; + scale; desc { "default"; align: 0.0 0.0; rel1.to: "header"; @@ -100,7 +100,7 @@ collections { } } rect { "content_main"; - scale: 1; + scale; desc { "default"; color: 30 46 93 255; align: 0.5 0.0; @@ -113,7 +113,7 @@ collections { } } text { "content_main_text"; - scale: 1; + scale; desc { "default"; text { size: 15; @@ -126,7 +126,7 @@ collections { } } spacer { "content_padding_middle"; - scale: 1; + scale; desc { "default"; align: 0.0 0.0; rel1.to: "base"; @@ -136,7 +136,7 @@ collections { } } rect { "content_sub_1"; - scale: 1; + scale; desc { "default"; color: 0 136 170 255; align: 0.0 0.0; @@ -148,7 +148,7 @@ collections { } } text { "content_sub_1_text"; - scale: 1; + scale; desc { "default"; text { size: 15; @@ -161,7 +161,7 @@ collections { } } rect { "content_sub_2"; - scale: 1; + scale; desc { "default"; color: 66 118 189 255; align: 0.0 0.5; @@ -175,7 +175,7 @@ collections { } } text { "content_sub_2_text"; - scale: 1; + scale; desc { "default"; text { size: 15; @@ -188,7 +188,7 @@ collections { } } rect { "content_sub_3"; - scale: 1; + scale; desc { "default"; color: 83 66 189 255; align: 0.0 0.5; @@ -201,7 +201,7 @@ collections { } } text { "content_sub_3_text"; - scale: 1; + scale; desc { "default"; text { size: 15; @@ -214,7 +214,7 @@ collections { } } rect { "content_bottom"; - scale: 1; + scale; desc { "default"; color: 95 95 95 255; rel1.to: "content_sub_1"; @@ -225,7 +225,7 @@ collections { } } text { "content_bottom_text"; - scale: 1; + scale; desc { "default"; text { size: 15; @@ -240,7 +240,7 @@ collections { } /* Mask */ rect { "mask"; - scale: 1; + scale; desc { "default"; color: 0 0 0 155; rel1.to: "header"; @@ -255,7 +255,7 @@ collections { } /* Panel */ rect { "panel_base"; - scale: 1; + scale; desc { "default"; align: 0.0 0.0; rel1.to: "header"; @@ -270,7 +270,7 @@ collections { } } rect { "panel_content_1"; - scale: 1; + scale; desc { "default"; color: 255 94 0 255; rel1.to: "panel_base"; @@ -286,7 +286,7 @@ collections { } } text { "panel_content_1_text"; - scale: 1; + scale; desc { "default"; color: 0 0 0 255; text { @@ -308,7 +308,7 @@ collections { } } rect { "panel_content_2"; - scale: 1; + scale; desc { "default"; color: 255 130 36 255; rel1.to: "panel_base"; @@ -325,7 +325,7 @@ collections { } } text { "panel_content_2_text"; - scale: 1; + scale; desc { "default"; color: 0 0 0 255; text { @@ -346,7 +346,7 @@ collections { } } rect { "panel_content_3"; - scale: 1; + scale; desc { "default"; color: 255 166 72 255; rel1.to: "panel_base"; @@ -363,7 +363,7 @@ collections { } } text { "panel_content_3_text"; - scale: 1; + scale; desc { "default"; color: 0 0 0 255; text { @@ -384,7 +384,7 @@ collections { } } rect { "panel_content_4"; - scale: 1; + scale; desc { "default"; color: 255 202 108 255; rel1.to: "panel_base"; @@ -401,7 +401,7 @@ collections { } } text { "panel_content_4_text"; - scale: 1; + scale; desc { "default"; color: 0 0 0 255; text { @@ -422,7 +422,7 @@ collections { } } swallow { "panel_swallow"; - scale: 1; + scale; desc { "default"; visible: 0; rel1.to: "panel_base"; diff --git a/data/templates/MouseEvent.edc b/data/templates/MouseEvent.edc index 31ddeaa..8c490ff 100644 --- a/data/templates/MouseEvent.edc +++ b/data/templates/MouseEvent.edc @@ -9,7 +9,7 @@ collections { } parts { rect { "button_shadow"; - scale: 1; + scale; desc { "default"; color: 0 0 0 155; rel1.to: "button_bg"; @@ -19,7 +19,7 @@ collections { } } image { "button_bg"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_BUTTON_BG.png"; @@ -37,7 +37,7 @@ collections { } } text { "button_text"; - scale: 1; + scale; nomouse; desc { "default"; color: 70 70 70 255; diff --git a/data/templates/Spacer.edc b/data/templates/Spacer.edc index e2a6366..469e787 100644 --- a/data/templates/Spacer.edc +++ b/data/templates/Spacer.edc @@ -3,7 +3,7 @@ collections { group { "main"; parts { spacer { "spacer1"; - scale: 1; + scale; desc { "default"; min: 50 50; fixed: 1 1; @@ -13,7 +13,7 @@ collections { } } spacer { "spacer2"; - scale: 1; + scale; desc { "default"; min: 50 50; fixed: 1 1; @@ -33,4 +33,4 @@ collections { } } } -} \ No newline at end of file +} diff --git a/data/templates/Text.edc b/data/templates/Text.edc index 4b7c917..f3cca00 100644 --- a/data/templates/Text.edc +++ b/data/templates/Text.edc @@ -3,7 +3,7 @@ collections { group { "main"; parts { text { "text"; - scale: 1; + scale; effect: SOFT_OUTLINE; desc { "default"; rel1.relative: 0.0 0.0; @@ -20,4 +20,4 @@ collections { } } } -} \ No newline at end of file +} diff --git a/data/templates/Textblock.edc b/data/templates/Textblock.edc index efd5d69..96c203b 100644 --- a/data/templates/Textblock.edc +++ b/data/templates/Textblock.edc @@ -26,7 +26,7 @@ collections { group { "main"; parts { textblock { "text_block"; - scale: 1; + scale; desc { "default"; text { style: "basic_style"; @@ -40,7 +40,7 @@ collections { } parts { textblock { "text_wrap_none"; - scale: 1; + scale; desc { "default"; rel1.to: "text_block"; rel1.relative: 0.0 1.0; @@ -54,7 +54,7 @@ collections { } parts { textblock { "text_wrap_char"; - scale: 1; + scale; desc { "default"; rel1.to: "text_wrap_none"; rel1.relative: 0.0 1.0; @@ -68,7 +68,7 @@ collections { } parts { textblock { "text_wrap_word"; - scale: 1; + scale; desc { "default"; rel1.to: "text_wrap_char"; rel1.relative: 0.0 1.0; @@ -82,7 +82,7 @@ collections { } parts { textblock { "text_wrap_mixed"; - scale: 1; + scale; desc { "default"; rel1.to: "text_wrap_word"; rel1.relative: 0.0 1.0; @@ -96,7 +96,7 @@ collections { } parts { textblock { "text_ellipsis_1"; - scale: 1; + scale; desc { "default"; rel1.to: "text_wrap_mixed"; rel1.relative: 0.0 1.0; @@ -110,7 +110,7 @@ collections { } parts { textblock { "text_ellipsis_0"; - scale: 1; + scale; desc { "default"; rel1.to: "text_ellipsis_1"; rel1.relative: 0.0 1.0; diff --git a/data/templates/Watchface.edc b/data/templates/Watchface.edc index 2ea5a6c..0ac3186 100644 --- a/data/templates/Watchface.edc +++ b/data/templates/Watchface.edc @@ -13,7 +13,7 @@ collections { } parts { image { "bg"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_WATCHFACE.png"; @@ -24,7 +24,7 @@ collections { } } image { "moonphase_moon"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_MOONPHASE_MOON.png"; @@ -40,7 +40,7 @@ collections { } } image { "moonphase_cover"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_MOONPHASE_COVER.png"; @@ -54,7 +54,7 @@ collections { } } image { "month_stroke"; - scale: 1; + scale; desc { "default"; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_MONTH_STROKE.png"; @@ -110,7 +110,7 @@ collections { } } text { "date"; - scale: 1; + scale; desc { "default"; color: 0 0 0 255; fixed: 1 1; @@ -131,7 +131,7 @@ collections { } } image { "hour"; - scale: 1; + scale; nomouse; desc { "default"; rel1.to: "bg"; @@ -151,7 +151,7 @@ collections { } } image { "minute"; - scale: 1; + scale; nomouse; desc { "default"; rel1.to: "bg"; @@ -171,7 +171,7 @@ collections { } } image { "second"; - scale: 1; + scale; nomouse; desc { "default"; rel1.to: "bg"; @@ -179,7 +179,7 @@ collections { rel1.relative: 0.5 0.0; rel2.relative: 0.5 1.0; min: 25 0; - fixed: 1 0; + fixed: 1 0; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_NEEDLE_SECOND.png"; map.on: 1; diff --git a/data/templates/Watchface2.edc b/data/templates/Watchface2.edc index 360b69f..c77c767 100644 --- a/data/templates/Watchface2.edc +++ b/data/templates/Watchface2.edc @@ -10,7 +10,7 @@ collections { } parts { image { "bg"; - scale: 1; + scale; desc { "default"; visible: 1; /* TODO: Please replace embedded image files to your application image files. */ @@ -22,7 +22,7 @@ collections { } } text { "date"; - scale: 1; + scale; desc { "default"; color: 219 219 219 255; fixed: 1 1; @@ -43,7 +43,7 @@ collections { } } text { "meridiem"; - scale: 1; + scale; desc { "default"; color: 255 120 0 255; fixed: 1 1; @@ -62,7 +62,7 @@ collections { } } text { "time"; - scale: 1; + scale; desc { "default"; color: 250 250 250 255; fixed: 1 1; @@ -81,7 +81,7 @@ collections { } } image { "hour"; - scale: 1; + scale; nomouse; desc { "default"; rel1.to: "bg"; @@ -101,7 +101,7 @@ collections { } } image { "minute"; - scale: 1; + scale; nomouse; desc { "default"; rel1.to: "bg"; @@ -121,7 +121,7 @@ collections { } } image { "second"; - scale: 1; + scale; nomouse; desc { "default"; rel1.to: "bg"; @@ -129,7 +129,7 @@ collections { rel1.relative: 0.5 0.0; rel2.relative: 0.5 1.0; min: 30 0; - fixed: 1 0; + fixed: 1 0; /* TODO: Please replace embedded image files to your application image files. */ image.normal: "ENVENTOR_EMBEDDED_NEEDLE_SECOND_RECT.png"; map.on: 1; @@ -140,59 +140,59 @@ collections { map.rotation.z: 360; } } - programs { - program { "load"; - signal: "load"; - source: ""; - action: STATE_SET "rotated"; - target: "bg"; - transition: LINEAR 30; - after: "reset"; - } - program { "reset"; - action: STATE_SET "default"; - target: "bg"; - after: "load"; - } - program { "hour_begin"; - signal: "load"; - source: ""; - action: STATE_SET "rotated"; - target: "hour"; - transition: LINEAR 216000; - after: "hour_reset"; - } - program { "hour_reset"; - action: STATE_SET "default"; - target: "hour"; - after: "hour_begin"; - } - program { "minute_begin"; - signal: "load"; - source: ""; - action: STATE_SET "rotated"; - target: "minute"; - transition: LINEAR 3600; - after: "minute_begin"; - } - program { "minute_reset"; - action: STATE_SET "default"; - target: "minute"; - after: "minute_begin"; - } - program { "second_begin"; - signal: "load"; - source: ""; - action: STATE_SET "rotated"; - target: "second"; - transition: LINEAR 60; - after: "second_reset"; - } - program { "second_reset"; - action: STATE_SET "default"; - target: "second"; - after: "second_begin"; - } + } + programs { + program { "load"; + signal: "load"; + source: ""; + action: STATE_SET "rotated"; + target: "bg"; + transition: LINEAR 30; + after: "reset"; + } + program { "reset"; + action: STATE_SET "default"; + target: "bg"; + after: "load"; + } + program { "hour_begin"; + signal: "load"; + source: ""; + action: STATE_SET "rotated"; + target: "hour"; + transition: LINEAR 216000; + after: "hour_reset"; + } + program { "hour_reset"; + action: STATE_SET "default"; + target: "hour"; + after: "hour_begin"; + } + program { "minute_begin"; + signal: "load"; + source: ""; + action: STATE_SET "rotated"; + target: "minute"; + transition: LINEAR 3600; + after: "minute_begin"; + } + program { "minute_reset"; + action: STATE_SET "default"; + target: "minute"; + after: "minute_begin"; + } + program { "second_begin"; + signal: "load"; + source: ""; + action: STATE_SET "rotated"; + target: "second"; + transition: LINEAR 60; + after: "second_reset"; + } + program { "second_reset"; + action: STATE_SET "default"; + target: "second"; + after: "second_begin"; } } } diff --git a/data/themes/default/layout_common.edc b/data/themes/default/layout_common.edc index 8e4174f..061a38d 100644 --- a/data/themes/default/layout_common.edc +++ b/data/themes/default/layout_common.edc @@ -12,6 +12,8 @@ images { image: "navi_group.png" COMP; image: "bg_demo.png" COMP; image: "help_bg.png" COMP; + image: "downlight_glow_left.png" COMP; + image: "downlight_glow_right.png" COMP; } group { "fileselector_layout"; @@ -2396,13 +2398,16 @@ group { "main_layout"; to_y: "elm.swallow.file_tab"; } align: 1 0; - min: 200 0; fixed: 1 0; visible: 0; } desc { "visible"; inherit: "default"; - align: 0 0; + rel2 { + relative: 1.0 0.0; + to_x: "elm.bar.left"; + to_y: "elm.swallow.file_tab"; + } visible: 1; } } @@ -2417,24 +2422,268 @@ group { "main_layout"; to_y: "elm.swallow.file_tab"; } align: 0 0; - min: 200 0; - max: 0 -1; fixed: 1 0; visible: 0; } desc { "visible"; inherit: "default"; - align: 1 0; rel1 { relative: 1.0 0.0; - } - rel2 { - relative: 1.0 0.0; - to_y: "elm.swallow.file_tab"; + to: "elm.bar.right"; } visible: 1; } } + spacer { "whole_left"; + desc { "default"; + rel2.relative: 0.5 1.0; + } + } + spacer { "whole_right"; + desc { "default"; + rel1.relative: 0.5 0.0; + } + } + spacer { "elm.bar.left"; + dragable { confine: "whole_left"; + x: 1 1 1; + y: 0 0 0; + } + desc { "default"; + max: 0 99999; + min: 0 14; + fixed: 1 1; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + spacer { "elm.bar.right"; + dragable { confine: "whole_right"; + x: 1 1 1; + y: 0 0 0; + } + desc { "default"; + max: 0 99999; + min: 0 14; + fixed: 1 1; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + spacer { "elm.bar.event_left"; + desc { "default"; + rel1.to_x: "elm.bar.left"; + rel2.to_x: "elm.bar.left"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + } + } + spacer { "elm.bar.event_right"; + desc { "default"; + rel1.to_x: "elm.bar.right"; + rel2.to_x: "elm.bar.right"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + } + } + swallow { "bar_left"; + dragable.events: "elm.bar.left"; + desc { "default"; + min: 10 0; + max: 99999 99999; + fixed: 1 0; + rel1.to_x: "elm.bar.event_left"; + rel1.relative: 0.0 0.25; + rel2.to: "elm.bar.event_left"; + rel2.relative: 1.0 0.75; + color: 0 0 0 0; + } + } + swallow { "bar_right"; + dragable.events: "elm.bar.right"; + desc { "default"; + min: 10 0; + max: 99999 99999; + fixed: 1 0; + rel1.to_x: "elm.bar.event_right"; + rel1.relative: 0.0 0.25; + rel2.to: "elm.bar.event_right"; + rel2.relative: 1.0 0.75; + color: 0 0 0 0; + } + } + rect { "bar_left1"; + repeat_events: 1; + desc { "default"; + fixed: 1 1; + rel1.to: "bar_left"; + rel2.to: "bar_left"; + rel2.relative: 0.5 1.0; + color: 0 0 0 0; + } + } + rect { "bar_left2"; + repeat_events: 1; + desc { "default"; + fixed: 1 1; + rel1.to: "bar_left"; + rel1.relative: 0.5 0.0; + rel2.to: "bar_left"; + color: 0 0 0 0; + } + } + rect { "bar_right1"; + repeat_events: 1; + desc { "default"; + fixed: 1 1; + rel1.to: "bar_right"; + rel2.to: "bar_right"; + rel2.relative: 0.5 1.0; + color: 0 0 0 0; + } + } + rect { "bar_right2"; + repeat_events: 1; + desc { "default"; + fixed: 1 1; + rel1.to: "bar_right"; + rel1.relative: 0.5 0.0; + rel2.to: "bar_right"; + color: 0 0 0 0; + } + } + image { "glow1a_left"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_left.png"; + image.border: 0 3 0 0; + max: 32 99999; + rel2.to_x: "elm.bar.left"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 1.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow1b_left"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_right.png"; + max: 4 99999; + rel1.to_x: "elm.bar.left"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 0.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow2a_left"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_left.png"; + max: 4 99999; + rel2.to_x: "elm.bar.left"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 1.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow2b_left"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_right.png"; + image.border: 0 3 0 0; + max: 32 99999; + rel1.to_x: "elm.bar.left"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 0.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow1a_right"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_left.png"; + image.border: 0 3 0 0; + max: 32 99999; + rel2.to_x: "elm.bar.right"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 1.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow1b_right"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_right.png"; + max: 4 99999; + rel1.to_x: "elm.bar.right"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 0.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow2a_right"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_left.png"; + max: 4 99999; + rel2.to_x: "elm.bar.right"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 1.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } + image { "glow2b_right"; + nomouse; + desc { "default"; + image.normal: "downlight_glow_right.png"; + image.border: 0 3 0 0; + max: 32 99999; + rel1.to_x: "elm.bar.right"; + rel2.to_y: "elm.swallow.file_tab"; + rel2.relative: 1.0 0.0; + color: 255 255 255 0; + align: 0.0 0.5; + } + desc { "active"; + inherit: "default"; + color: 255 255 255 255; + } + } } programs { program { "file_browser_show"; @@ -2448,6 +2697,10 @@ group { "main_layout"; action: STATE_SET "default"; target: "elm.swallow.file_browser"; transition: DECELERATE 0.25; + after: "file_browser_hide_done"; + } + program { "file_browser_hide_done"; + action: SIGNAL_EMIT "elm,state,file_browser_hide,done" ""; } program { "edc_navigator_show"; signal: "elm,state,edc_navigator,show"; @@ -2460,6 +2713,10 @@ group { "main_layout"; action: STATE_SET "default"; target: "elm.swallow.edc_navigator"; transition: DECELERATE 0.25; + after: "edc_navigator_hide_done"; + } + program { "edc_navigator_hide_done"; + action: SIGNAL_EMIT "elm,state,edc_navigator_hide,done" ""; } program { "statusbar_show"; signal: "elm,state,statusbar,show"; @@ -2496,6 +2753,62 @@ group { "main_layout"; target: "error_alert"; transition: DECELERATE 1; } + program { "left_bar_mouse_in1"; + signal: "mouse,in"; source: "bar_left1"; + action: STATE_SET "active"; + transition: BOUNCE 0.4 0.5 4; + target: "glow1a_left"; + target: "glow1b_left"; + } + program { "left_bar_mouse_out1"; + signal: "mouse,out"; source: "bar_left1"; + action: STATE_SET "default"; + transition: DECELERATE 0.5; + target: "glow1a_left"; + target: "glow1b_left"; + } + program { "left_bar_mouse_in2"; + signal: "mouse,in"; source: "bar_left2"; + action: STATE_SET "active"; + transition: BOUNCE 0.4 0.5 4; + target: "glow2a_left"; + target: "glow2b_left"; + } + program { "left_bar_mouse_out2"; + signal: "mouse,out"; source: "bar_left2"; + action: STATE_SET "default"; + transition: DECELERATE 0.5; + target: "glow2a_left"; + target: "glow2b_left"; + } + program { "right_bar_mouse_in1"; + signal: "mouse,in"; source: "bar_right1"; + action: STATE_SET "active"; + transition: BOUNCE 0.4 0.5 4; + target: "glow1a_right"; + target: "glow1b_right"; + } + program { "right_bar_mouse_out1"; + signal: "mouse,out"; source: "bar_right1"; + action: STATE_SET "default"; + transition: DECELERATE 0.5; + target: "glow1a_right"; + target: "glow1b_right"; + } + program { "right_bar_mouse_in2"; + signal: "mouse,in"; source: "bar_right2"; + action: STATE_SET "active"; + transition: BOUNCE 0.4 0.5 4; + target: "glow2a_right"; + target: "glow2b_right"; + } + program { "right_bar_mouse_out2"; + signal: "mouse,out"; source: "bar_right2"; + action: STATE_SET "default"; + transition: DECELERATE 0.5; + target: "glow2a_right"; + target: "glow2b_right"; + } } } @@ -2597,574 +2910,6 @@ group { "tools_layout"; } } -group { "live_view_tools_layout"; - parts { - spacer { "padding1"; - scale: 1; - desc { "default"; - rel2.relative: 0.0 1.0; - min: 14 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.highlight"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding1"; - relative: 1.0 0.0; - } - rel2.to_x: "padding1"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding2"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.highlight"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.highlight"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.dummy"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding2"; - relative: 1.0 0.0; - } - rel2.to_x: "padding2"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding3"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.dummy"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.dummy"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.wireframes"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding3"; - relative: 1.0 0.0; - } - rel2.to_x: "padding3"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding_outline"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.wireframes"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.wireframes"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.mirror"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding_outline"; - relative: 1.0 0.0; - } - rel2.to_x: "padding_outline"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding4"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.mirror"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.mirror"; - min: 14 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - rect { "separator"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding4"; - relative: 1.0 0.5; - } - rel2 { - to_x: "padding4"; - relative: 1.0 0.5; - } - min: 1 18; - fixed: 1 1; - align: 0.0 0.5; - color: 48 48 48 255; - } - } - spacer { "padding5"; - scale: 1; - desc { "default"; - rel1 { - to_x: "separator"; - relative: 1.0 0.0; - } - rel2.to_x: "separator"; - min: 14 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.live_edit1"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding5"; - relative: 1.0 0.0; - } - rel2.to_x: "padding5"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding6"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.live_edit1"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.live_edit1"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.live_edit2"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding6"; - relative: 1.0 0.0; - } - rel2.to_x: "padding6"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding7"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.live_edit2"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.live_edit2"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.live_edit3"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding7"; - relative: 1.0 0.0; - } - rel2.to_x: "padding7"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding8"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.live_edit3"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.live_edit3"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.live_edit4"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding8"; - relative: 1.0 0.0; - } - rel2.to_x: "padding8"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding9"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.live_edit4"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.live_edit4"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.live_edit5"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding9"; - relative: 1.0 0.0; - } - rel2.to_x: "padding9"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding10"; - scale: 1; - desc { "default"; - rel1 { - to_x: "elm.swallow.live_edit5"; - relative: 1.0 0.0; - } - rel2.to_x: "elm.swallow.live_edit5"; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.live_edit6"; - scale: 1; - desc { "default"; - rel1 { - to_x: "padding10"; - relative: 1.0 0.0; - } - rel2.to_x: "padding10"; - fixed: 1 0; - align: 0.0 0.5; - } - } - } -} - -group { "text_editor_tools_layout"; - parts { - spacer { "base"; - scale: 1; - desc { "default"; - min: 334 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding1"; - scale: 1; - desc { "default"; - rel.to: "base"; - rel2.relative: 0.0 1.0; - min: 14 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.save"; - scale: 1; - desc { "default"; - rel.to: "padding1"; - rel1.relative: 1.0 0.0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding2"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.save"; - rel1.relative: 1.0 0.0; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.undo"; - scale: 1; - desc { "default"; - rel.to: "padding2"; - rel1.relative: 1.0 0.0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding3"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.undo"; - rel1.relative: 1.0 0.0; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.redo"; - scale: 1; - desc { "default"; - rel.to: "padding3"; - rel1.relative: 1.0 0.0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding4"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.redo"; - rel1.relative: 1.0 0.0; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.find"; - scale: 1; - desc { "default"; - rel.to: "padding4"; - rel1.relative: 1.0 0.0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding5"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.find"; - rel1.relative: 1.0 0.0; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.goto"; - scale: 1; - desc { "default"; - rel.to: "padding5"; - rel1.relative: 1.0 0.0; - rel2.to_x: "padding5"; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding6"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.goto"; - rel1.relative: 1.0 0.0; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.lines"; - scale: 1; - desc { "default"; - rel.to: "padding6"; - rel1.relative: 1.0 0.0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding7"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.lines"; - rel1.relative: 1.0 0.0; - min: 8 0; - fixed: 1 0; - align: 0.0 0.5; - } - } - swallow { "elm.swallow.template"; - scale: 1; - desc { "default"; - rel.to: "padding7"; - rel1.relative: 1.0 0.0; - fixed: 1 0; - align: 0.0 0.5; - } - } - spacer { "padding8"; - scale: 1; - desc { "default"; - rel.to: "base"; - rel1.relative: 1.0 0.0; - min: 14 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - swallow { "elm.swallow.menu"; - scale: 1; - desc { "default"; - rel.to: "padding8"; - rel2.relative: 0.0 1.0; - fixed: 1 0; - align: 1.0 0.5; - } - } - spacer { "padding9"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.menu"; - rel2.relative: 0.0 1.0; - min: 14 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - rect { "separator"; - scale: 1; - desc { "default"; - rel.to: "padding9"; - rel1.relative: 0.0 0.5; - rel2.relative: 0.0 0.5; - min: 1 18; - fixed: 1 1; - align: 1.0 0.5; - color: 48 48 48 255; - } - } - spacer { "padding10"; - scale: 1; - desc { "default"; - rel.to: "separator"; - rel2.relative: 0.0 1.0; - min: 8 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - swallow { "elm.swallow.file_tab"; - scale: 1; - desc { "default"; - rel.to: "padding10"; - rel2.relative: 0.0 1.0; - fixed: 1 0; - align: 1.0 0.5; - } - } - spacer { "padding11"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.file_tab"; - rel2.relative: 0.0 1.0; - min: 8 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - swallow { "elm.swallow.edc_navigator"; - scale: 1; - desc { "default"; - rel.to: "padding11"; - rel2.relative: 0.0 1.0; - fixed: 1 0; - align: 1.0 0.5; - } - } - spacer { "padding12"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.edc_navigator"; - rel2.relative: 0.0 1.0; - min: 8 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - swallow { "elm.swallow.file_browser"; - scale: 1; - desc { "default"; - rel.to_x: "padding12"; - rel2.relative: 0.0 1.0; - fixed: 1 0; - align: 1.0 0.5; - } - } - spacer { "padding13"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.file_browser"; - rel2.relative: 0.0 1.0; - min: 8 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - swallow { "elm.swallow.console"; - scale: 1; - desc { "default"; - rel.to: "padding13"; - rel2.relative: 0.0 1.0; - fixed: 1 0; - align: 1.0 0.5; - } - } - spacer { "padding14"; - scale: 1; - desc { "default"; - rel.to: "elm.swallow.console"; - rel2.relative: 0.0 1.0; - min: 8 0; - fixed: 1 0; - align: 1.0 0.5; - } - } - rect { "separator2"; - scale: 1; - desc { "default"; - rel.to: "padding14"; - rel1.relative: 0.0 0.5; - rel2.relative: 0.0 0.5; - min: 1 18; - fixed: 1 1; - align: 1.0 0.5; - color: 48 48 48 255; - } - } - - } -} - group { "rel_to_layout"; parts { spacer { "base"; diff --git a/po/LINGUAS b/po/LINGUAS index 6409b02..cd425bd 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1 +1 @@ -en ru +en it sl ru diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..b574c9b --- /dev/null +++ b/po/it.po @@ -0,0 +1,496 @@ +# Italian translation for enventor. +# This file is distributed under the same license as the enventor package. +# Massimo Maiurana , 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: enventor 1.0.0\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2016-08-28 01:00+0900\n" +"PO-Revision-Date: 2016-09-25 15:50+0200\n" +"Last-Translator: Massimo Maiurana \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: src/bin/base_gui.c:70 +#, c-format +msgid "%s - Enventor" +msgstr "%s - Enventor" + +#: src/bin/config_data.c:76 +msgid "Failed to generate tmp folder!" +msgstr "Non ho potuto creare la directory temporanea!" + +#: src/bin/config_data.c:97 +#, c-format +msgid "Cannot create a config folder \"%s\"" +msgstr "Non ho potuto creare una directory di configurazione \"%s\"" + +#: src/bin/config_data.c:111 +#, c-format +msgid "Cannot create a enventor config folder \"%s\"" +msgstr "Non ho potuto creare una directory di configurazione di enventor \"%s\"" + +#: src/bin/config_data.c:122 +#, c-format +msgid "Cannot save a config file \"%s\"" +msgstr "Non ho potuto salvare un file di configurazione \"%s\"" + +#: src/bin/config_data.c:161 +#, c-format +msgid "Cannot load a config file \"%s\"" +msgstr "Non ho potuto caricare un file di configurazione \"%s\"" + +#: src/bin/config_data.c:169 +msgid "Failed to allocate Memory!" +msgstr "Non ho potuto allocare memoria!" + +#: src/bin/file_mgr.c:89 +msgid "EDC has been changed on the file system." +msgstr "Il file EDC è cambiato sul file system." + +#: src/bin/file_mgr.c:91 +msgid "Do you want to replace the contents?" +msgstr "Vuoi sostituire il contenuto?" + +#: src/bin/file_mgr.c:102 +msgid "Save As" +msgstr "Salva con nome" + +#: src/bin/file_mgr.c:110 src/bin/search.c:421 +msgid "Replace" +msgstr "Sostituisci" + +#: src/bin/file_mgr.c:116 +msgid "Ignore" +msgstr "Ignora" + +#: src/bin/file_mgr.c:197 +#, c-format +msgid "File saved. \"%s\"" +msgstr "File salvato. \"%s\"" + +#: src/bin/file_mgr.c:199 +#, c-format +msgid "Already saved. \"%s\"" +msgstr "Già salvato. \"%s\"" + +#: src/bin/goto.c:78 +msgid "Invalid line number" +msgstr "Numero di riga non valido" + +#: src/bin/goto.c:133 +msgid "Enventor Goto Line" +msgstr "Enventor va alla riga" + +#: src/bin/goto.c:137 +msgid "Go to Line" +msgstr "Vai alla riga" + +#: src/bin/goto.c:158 +#, c-format +msgid "Enter line number [1..%d]:" +msgstr "Inserire il numero della rigar [1..%d]:" + +#: src/bin/goto.c:182 src/bin/menu.c:154 +msgid "Ok" +msgstr "Ok" + +#: src/bin/goto.c:194 src/bin/search.c:443 +msgid "Failed to grab key - Escape" +msgstr "Non ho potuto acquisire il tasto - Escape" + +#: src/bin/live_edit.c:2020 src/bin/live_edit.c:2057 src/bin/live_edit.c:2059 +#: src/bin/main.c:870 src/lib/auto_comp.c:410 src/lib/ctxpopup.c:779 +#, c-format +msgid "Failed to grab key - %s" +msgstr "Non ho potuto acquisire il tasto -%s" + +#: src/bin/live_edit.c:2140 +msgid "" +"Double click part to confirm.(Esc = cancel, Direction Key = move item per " +"pixel,Ctrl = disable auto-aligning)" +msgstr "Doppio clic sulla parte per confermare. (Esc = annulla, tasti direzione = sposta un pixel per volta, Ctrl = disabilita allineamento automatico)" + +#: src/bin/live_edit.c:2160 +msgid "" +"Add a Rect part to the live view.
A Rect part is used as a solid " +"color
component or clipping other components." +msgstr "Aggiunge una parte Rect all'anteprima.
Una parte Rect viene usata come un componente
di colore pieno o per il clipping di altri componenti." + +#: src/bin/live_edit.c:2166 +msgid "" +"Add a Text part to the live view.
A Text part is used for plain text." +msgstr "§Aggiunge una parte Text all'anteprima.
Una parte Text viene usata per il testo semplice." + +#: src/bin/live_edit.c:2171 +msgid "" +"Add an Image part to the live view.
An Image part contains a single " +"image
resource, usually an image file." +msgstr "Aggiunge una parte Image all'anteprima.
Una parte Image contiene solo una risorsa immagine,
di solito un file" + +#: src/bin/live_edit.c:2177 +msgid "" +"Add a Swallow part to the live view.
A Swallow part is a placeholder " +"for
objects that you may want to
include in the layout later." +msgstr "Aggiunge una parte Swallow all'anteprima.
Una parte Swallow è un segnaposto per oggetti che
possono essere inclusi nel layout successivamente." + +#: src/bin/live_edit.c:2184 +msgid "" +"Add a Textblock part to the live view.
A Textblock part is a rich-text " +"part
that can show big chunks of text." +msgstr "Aggiunge una parte Textblok all'anteprima.
Una parte Textblock contiene testo formattato e
può visualizzare grossi spezzoni di testo." + +#: src/bin/live_edit.c:2190 +msgid "" +"Add a Spacer part to the live view.
A Spacer part is an anchor to locate " +"
other parts. It is invisible and
normally used for padding." +msgstr "Aggiunge una parte Spacer all'anteprima.
Una parte Spacer è un'ancora per altre parti.
È invisibile e viene usata normalmente per il padding." + +#: src/bin/live_edit.c:2350 +msgid "Faild to allocate Memory!" +msgstr "Non ho potuto allocare memoria!" + +#: src/bin/main.c:208 +#, c-format +msgid "Font Size: %1.1fx" +msgstr "Dimensione font: %1.1fx" + +#: src/bin/main.c:942 +#, c-format +msgid "Cannot create temporary diretory \"%s\"" +msgstr "Non ho potuto creare la directory temporanea \"%s\"" + +#: src/bin/menu.c:141 +msgid "New File: Choose a Template" +msgstr "Nuovo file: scegliere un modello" + +#: src/bin/menu.c:160 src/bin/menu.c:206 src/bin/setting.c:242 +msgid "Cancel" +msgstr "Annulla" + +#: src/bin/menu.c:179 +msgid "You have unsaved changes." +msgstr "Ci sono modifiche non salvate." + +#: src/bin/menu.c:181 +msgid "Do you want to save the changes?" +msgstr "Volete salvare le modifiche?" + +#: src/bin/menu.c:192 src/bin/menu.c:475 src/bin/menu.c:591 +msgid "Save" +msgstr "Salva" + +#: src/bin/menu.c:200 +msgid "Discard" +msgstr "Scarta" + +#: src/bin/menu.c:328 +msgid "Choose a file to save" +msgstr "Scegliere un file da salvare" + +#: src/bin/menu.c:365 +#, c-format +msgid "Failed to save: %s." +msgstr "Impossibile salvare: %s." + +#: src/bin/menu.c:419 +msgid "Support only .edc file." +msgstr "Solo i file .edc sono supportati." + +#: src/bin/menu.c:429 +msgid "Choose a file to load." +msgstr "Scegliere un file da aprire." + +#: src/bin/menu.c:440 +#, c-format +msgid "Failed to load: %s." +msgstr "Impossibile aprire: %s." + +#: src/bin/menu.c:467 +msgid "Save File: Choose a EDC" +msgstr "Salva file: scegliere un EDC" + +#: src/bin/menu.c:476 src/bin/menu.c:511 +msgid "Close" +msgstr "Chiudi" + +#: src/bin/menu.c:501 +msgid "Load File: Choose a EDC" +msgstr "Apri file: scegliere un EDC" + +#: src/bin/menu.c:510 src/bin/menu.c:595 +msgid "Load" +msgstr "Apri" + +#: src/bin/menu.c:586 +msgid "New" +msgstr "Nuovo" + +#: src/bin/menu.c:599 src/bin/setting.c:198 +msgid "Settings" +msgstr "Impostazioni" + +#: src/bin/menu.c:603 +msgid "Help" +msgstr "Aiuto" + +#: src/bin/menu.c:607 +msgid "Exit" +msgstr "Esci" + +#: src/bin/newfile.c:79 +#, c-format +msgid "Cannot find templates folder! \"%s\"" +msgstr "Non riesco a trovare la cartella dei modelli! \"%s\"" + +#: src/bin/newfile.c:124 src/bin/newfile.c:146 +#, c-format +msgid "Cannot find file! \"%s\"" +msgstr "Non riesco a trovare il file! \"%s\"" + +#: src/bin/search.c:96 +#, c-format +msgid "%d matches replaced" +msgstr "%d corrispondenze sostituite" + +#: src/bin/search.c:145 src/bin/search.c:205 +#, c-format +msgid "No \"%s\" in the text" +msgstr "Non esiste \"%s\" nel testo" + +#: src/bin/search.c:242 src/bin/search.c:407 +msgid "Previous" +msgstr "Precedente" + +#: src/bin/search.c:274 src/bin/search.c:414 +msgid "Next" +msgstr "Successivo" + +#: src/bin/search.c:358 +msgid "Enventor Search" +msgstr "Ricerca di Enventor" + +#: src/bin/search.c:361 +msgid "Find/Replace" +msgstr "Trova/Sostituisci" + +#: src/bin/search.c:428 +msgid "Replace All" +msgstr "Sostituisci tutto" + +#: src/bin/setting.c:210 +msgid "Preferences" +msgstr "Preferenze" + +#: src/bin/setting.c:212 +msgid "Text Editor" +msgstr "Editor di testo" + +#: src/bin/setting.c:214 +msgid "EDC Build" +msgstr "Compila EDC" + +#: src/bin/setting.c:228 +msgid "Apply" +msgstr "Applica" + +#: src/bin/setting.c:235 +msgid "Reset" +msgstr "Reimposta" + +#: src/bin/statusbar.c:319 +msgid "View zoom level (Ctrl + Mouse Wheel)
Zoom the live view in or out." +msgstr "Livello dello zoom (Ctrl + rotella mouse)
Ingrandisce e rimpicciolisce l'anteprima" + +#: src/bin/statusbar.c:325 +msgid "Resize the width and height of the live view." +msgstr "Ridimensiona larghezza e altezza dell'anteprima" + +#: src/bin/statusbar.c:330 +msgid "Swap the width and height of the live view." +msgstr "Scambia larghezza e altezza dell'anteprima" + +#: src/bin/statusbar.c:340 +msgid "" +"Mouse cursor position in live view.
Absolute coordinate | Relative " +"coordinate." +msgstr "Posizione puntatore nell'anteprima.
Coordinate assolute | Coordinate relative." + +#: src/bin/statusbar.c:351 +msgid "Name of the current editing group." +msgstr "Nome del gruppo attualmente in modifica" + +#: src/bin/statusbar.c:361 +msgid "Cursor line number : Max line number" +msgstr "Numero riga del cursore : numero massimo di righe" + +#: src/bin/text_setting.c:552 +#, c-format +msgid "Failed to open file \"%s\"" +msgstr "Non ho potuto aprire il file \"%s\"" + +#: src/bin/text_setting.c:909 +msgid "Double click a keyword to change its color :" +msgstr "Doppio clic su una keyword per cambiarne il colore" + +#: src/bin/text_setting.c:1004 +msgid "Font Name" +msgstr "Nome del font" + +#: src/bin/text_setting.c:1031 +msgid "Font Style" +msgstr "Stile del font" + +#: src/bin/tools.c:142 +msgid "Redo text." +msgstr "Ripeti testo." + +#: src/bin/tools.c:144 +msgid "No text to be redo." +msgstr "Nessun testo da ripetere." + +#: src/bin/tools.c:152 +msgid "Undo text." +msgstr "Annulla testo" + +#: src/bin/tools.c:154 +msgid "No text to be undo." +msgstr "Nessun testo da annullare" + +#: src/bin/tools.c:209 +msgid "" +"Part highlighting (Ctrl + H)
Show a highlight effect on the selected " +"part
in the live view." +msgstr "Evidenziazione parte (Ctrl + H)
Mostra un effetto evidenziazione sulla
parte selezionata nell'anteprima." + +#: src/bin/tools.c:220 +msgid "" +"Dummy parts (Ctrl + U)
Display virtual images for the swallow " +"and
spacer parts." +msgstr "Parti fittizie (Ctrl + U)
Mostra immagini virtuali per le parti
Swallow e Spacer." + +#: src/bin/tools.c:231 +msgid "" +"Wireframes (Ctrl + W)
Display wireframes to identify the " +"parts
boundaries." +msgstr "Incorniciamento (Ctrl + W)
Mostra una cornice che identifica i
confini della parte." + +#: src/bin/tools.c:242 +msgid "" +"Mirror mode (Ctrl + M)
Invert the layout horizontally and review
the " +"designed layout in RTL(right-to-left)
LTR(left-to-right) settings." +msgstr "Modalità specchio (§Ctrl + M)
Inverte orizzontalmente il layout e ne rivede le
impostazioni RTL (da destra a sinistra) e LTR
(da sinistra a destra)." + +#: src/bin/tools.c:280 +msgid "Save the file (Ctrl + S)
Save the current script to a file." +msgstr "Salva il file (Ctrl + S)
Salva l'attuale script in un file." + +#: src/bin/tools.c:288 +msgid "Undo text (Ctrl + Z)" +msgstr "Annulla testo (Ctrl + Z)" + +#: src/bin/tools.c:295 +msgid "Redo text (Ctrl + R)" +msgstr "Ripeti testo (Ctrl + R)" + +#: src/bin/tools.c:302 +msgid "Find/Replace (Ctrl + F)
Find or replace text." +msgstr "Trova/Sostituisci (Ctrl + F)
Trova o sostituisce il testo." + +#: src/bin/tools.c:311 +msgid "" +"Go to line (Ctrl + L)
Open the Go to window to move the cursor
line " +"position." +msgstr "Vai alla riga (Ctrl + L)
Apre la fienstre \"Vai a\" per spostare la
riga in cui è posizionato il cursore." + +#: src/bin/tools.c:321 +msgid "Line numbers
Display the script line numbers." +msgstr "Numeri di riga
Visualizza i numeri di riga dello script." + +#: src/bin/tools.c:330 +msgid "" +"Insert a code snippet (Ctrl + T)
Enventor chooses the best code with " +"regards
to the current editing context. For instance,
if the cursor is " +"inside a part section,
description code is generated." +msgstr "Inserisci codice (Ctrl + T)
Enventor sceglie il codice migliore sulla base del
contesto attuale. Ad esempio, se il cursore si trova
nella sezione \"part\" viene generato un codice
\"description\"." + +#: src/bin/tools.c:342 +msgid "" +"Console box (Alt + Down)
Display the console box, which shows the " +"EDC
build logs, such as error messages. It pops
up automatically when " +"compliation errors occur." +msgstr "Box console (Alt + Giù)
Visualizza il box console che mostra i messaggi del log
di compilazione dell'EDC, come quelli di errore. Viene
visualizzato automaticamente quando avviene un errore di
compilazione." + +#: src/bin/tools.c:353 +msgid "" +"File browser (F9)
Display the file browser, which shows a file list
in " +"current workspace." +msgstr "Navigatore file (F9)
Visualizza un navigatore di file che mostra una lista
dei file nell'attuale spazio di lavoro." + +#: src/bin/tools.c:363 +msgid "" +"EDC navigator (F10)
Display the EDC navigator, which shows the " +"current
group hierarchy tree that contains parts,
descriptions and " +"programs lists." +msgstr "Navigatore EDC (F10)
Visualizza un navigatore di EDC che mostra l'albero
gerarchico dell'attuale EDC che contiene l'elenco di
parti, descrizioni e programmi." + +#: src/bin/tools.c:375 +msgid "" +"File tab (F11)
Display the file tab in the bottom area
It shows an " +"opened file list to switch
files quickly. to switch files quickly." +msgstr "Etichette file (F11)
Visualizza le etichette dei file nell'area in fondo per
passare rapidamente da un file aperto all'altro." + +#: src/bin/tools.c:386 +msgid "Enventor menu (Esc)
Open the Enventor main menu." +msgstr "Menù di Enventor (Esc)
Apre il menù principale di Enventor." + +#: src/bin/tools.c:432 +msgid "Part highlighting enabled." +msgstr "Evidenziazione parte abilitata." + +#: src/bin/tools.c:434 +msgid "Part highlighting disabled." +msgstr "Evidenziazione parte disabilitata." + +#: src/bin/tools.c:519 +msgid "Dummy parts enabled." +msgstr "Parti fittizie abilitate." + +#: src/bin/tools.c:521 +msgid "Dummy parts disabled." +msgstr "Parti fittizie disabilitate." + +#: src/bin/tools.c:543 +msgid "Wireframes enabled." +msgstr "Incorniciamenti abilitati." + +#: src/bin/tools.c:545 +msgid "Wireframes disabled." +msgstr "Incorniciamenti disabilitati." + +#: src/bin/tools.c:568 +msgid "Mirror mode enabled." +msgstr "Modalità specchio abilitata." + +#: src/bin/tools.c:570 +msgid "Mirror mode disabled." +msgstr "Modalità specchio disabilitata." + +#: src/bin/tools.c:624 +msgid "Insertion of template code is disabled while in Live Edit mode" +msgstr "L'inserimento di modelli di codice è disabilitata in modalità Live Edit" + +#: src/bin/tools.c:635 +#, c-format +msgid "Template code inserted, (%s)" +msgstr "Modello di codice inserito, (%s)" + +#: src/bin/tools.c:641 +msgid "" +"Can't insert template code here. Move the cursor inside the \"Collections," +"Images,Parts,Part,Programs\" scope." +msgstr "Impossibile inserire modelli di codice qui. Spostare il cursore in \"Collections,Images,Parts,Part,Programs\\\"" diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..484cd53 --- /dev/null +++ b/po/sl.po @@ -0,0 +1,423 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Enventor development team +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: enventor 0.9.0\n" +"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n" +"POT-Creation-Date: 2016-09-19 14:56+0200\n" +"PO-Revision-Date: 2016-09-21 17:09+0200\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.8.9\n" +"Last-Translator: Renato Rener \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 " +"|| n%100==4 ? 2 : 3);\n" +"Language: sl_SI\n" + +#: src/bin/base_gui.c:67 +#, c-format +msgid "%s - Enventor" +msgstr "%s - Enventor" + +#: src/bin/config_data.c:72 +msgid "Failed to generate tmp folder!" +msgstr "Neuspeh pri ustvarjanju začasne mape!" + +#: src/bin/config_data.c:91 src/bin/config_data.c:104 +#, c-format +msgid "Cannot create a config folder \"%s\"" +msgstr "Ne morem ustvariti nastavitvene mape \"%s\"" + +#: src/bin/config_data.c:115 +#, c-format +msgid "Cannot save a config file \"%s\"" +msgstr "Ne morem shraniti nastavitvene datoteke \"%s\"" + +#: src/bin/config_data.c:157 +#, c-format +msgid "Cannot load a config file \"%s\"" +msgstr "Ne morem naložiti nastavitvene datoteke \"%s\"" + +#: src/bin/config_data.c:165 src/bin/file_mgr.c:193 src/bin/goto.c:136 +#: src/bin/menu.c:613 src/bin/newfile.c:144 src/bin/panes.c:321 +#: src/bin/search.c:337 src/bin/setting.c:187 src/bin/statusbar.c:312 +#: src/bin/text_setting.c:405 src/bin/text_setting.c:456 +#: src/bin/text_setting.c:487 src/bin/text_setting.c:956 src/bin/tools.c:186 +msgid "Failed to allocate Memory!" +msgstr "Dodeljevanje spomina spodletelo!" + +#: src/bin/file_mgr.c:71 +msgid "EDC has been changed on the file system." +msgstr "EDC je bil spremenjen na datotečnem sistemu." + +#: src/bin/file_mgr.c:73 +msgid "Do you want to replace the contents?" +msgstr "Ali želite zamenjati vsebino?" + +#: src/bin/file_mgr.c:84 +msgid "Save As" +msgstr "Shrani kot" + +#: src/bin/file_mgr.c:92 src/bin/search.c:407 +msgid "Replace" +msgstr "Zamenjaj" + +#: src/bin/file_mgr.c:98 +msgid "Ignore" +msgstr "Spreglej" + +#: src/bin/file_mgr.c:157 +#, c-format +msgid "File saved. \"%s\"" +msgstr "Datoteka shranjena. \"%s\"" + +#: src/bin/file_mgr.c:159 +#, c-format +msgid "Already saved. \"%s\"" +msgstr "Že shranjeno. \"%s\"" + +#: src/bin/goto.c:93 +msgid "Invalid line number" +msgstr "Napačno število vrstice" + +#: src/bin/goto.c:142 +msgid "Enventor Goto Line" +msgstr "Enventor Skoči na vrstico" + +#: src/bin/goto.c:146 +msgid "Go to Line" +msgstr "Skoči na vrstico" + +#: src/bin/goto.c:168 +#, c-format +msgid "Enter line number [1..%d]:" +msgstr "Vnesi vrstico številka [1..%d]:" + +#: src/bin/goto.c:192 src/bin/menu.c:150 +msgid "Ok" +msgstr "V Redu" + +#: src/bin/goto.c:204 src/bin/search.c:429 +msgid "Failed to grab key - Escape" +msgstr "Zajetje tipke Esc spodletelo" + +#: src/bin/live_edit.c:1983 src/bin/live_edit.c:2028 src/bin/live_edit.c:2030 +#: src/bin/main.c:851 src/lib/auto_comp.c:369 src/lib/ctxpopup.c:766 +#, c-format +msgid "Failed to grab key - %s" +msgstr "Zajetje znaka spodletelo - %s" + +#: src/bin/live_edit.c:2091 +msgid "" +"Double click part to confirm. (Esc = cancel, Direction Key = move item per " +"pixel, Ctrl = disable auto-aligning)" +msgstr "" +"Dvoklikni del za potrditev. (Esc = preklic, Smerna tipka = premikanje en " +"predmet na piksel, Ctrl = onemogoči samodejno poravnavo)" + +#: src/bin/live_edit.c:2247 +msgid "Faild to allocate Memory!" +msgstr "Dodeljevanje spomina spodletelo!" + +#: src/bin/main.c:24 +msgid "Auto Completion Enabled." +msgstr "Samodokončanje omogočeno." + +#: src/bin/main.c:25 +msgid "Auto Completion Disabled." +msgstr "Samodokončanje onemogočeno." + +#: src/bin/main.c:34 +msgid "Auto Indentation Enabled." +msgstr "Samozamik omogočen." + +#: src/bin/main.c:35 +msgid "Auto Indentation Disabled." +msgstr "Samozamik onemogočen." + +#: src/bin/main.c:207 +#, c-format +msgid "Font Size: %1.1fx" +msgstr "Velikost pisave: %1.1fx" + +#: src/bin/menu.c:137 +msgid "New File: Choose a template" +msgstr "Nova datoteka: izberi predlogo" + +#: src/bin/menu.c:156 src/bin/menu.c:202 src/bin/setting.c:245 +msgid "Cancel" +msgstr "Prekliči" + +#: src/bin/menu.c:175 +msgid "Without save, you will lose last changes!" +msgstr "Brez shranitve boste izgubili zadnje spremembe!" + +#: src/bin/menu.c:177 +msgid "Will you save changes?" +msgstr "Ali boste shranili spremembe?" + +#: src/bin/menu.c:188 src/bin/menu.c:466 src/bin/menu.c:582 +msgid "Save" +msgstr "Shrani" + +#: src/bin/menu.c:196 +msgid "Discard" +msgstr "Zavrži" + +#: src/bin/menu.c:324 +msgid "Choose a file to save" +msgstr "Izberite datoteko za shranjevanje" + +#: src/bin/menu.c:351 +#, c-format +msgid "Failed to save: %s." +msgstr "Neuspeh pri shranjevanju: %s." + +#: src/bin/menu.c:406 +msgid "Support only .edc file." +msgstr "Podpora le za .edc datoteke." + +#: src/bin/menu.c:416 +msgid "Choose a file to load." +msgstr "Izberite datoteko za naložitev." + +#: src/bin/menu.c:427 +#, c-format +msgid "Failed to load: %s." +msgstr "Neuspeh pri nalaganju: %s." + +#: src/bin/menu.c:458 +msgid "Save File: Choose a EDC" +msgstr "Shrani datoteko: Izberi EDC" + +#: src/bin/menu.c:467 src/bin/menu.c:502 +msgid "Close" +msgstr "Zapri" + +#: src/bin/menu.c:492 +msgid "Load File: Choose a EDC" +msgstr "Naloži datoteko : Izberi EDC" + +#: src/bin/menu.c:501 src/bin/menu.c:586 +msgid "Load" +msgstr "Naloži" + +#: src/bin/menu.c:577 +msgid "New" +msgstr "Nov" + +#: src/bin/menu.c:590 src/bin/setting.c:201 +msgid "Settings" +msgstr "Nastavitve" + +#: src/bin/menu.c:594 +msgid "Help" +msgstr "Pomoč" + +#: src/bin/menu.c:598 +msgid "Exit" +msgstr "Izhod" + +#: src/bin/newfile.c:57 src/bin/newfile.c:82 +#, c-format +msgid "Cannot find file! \"%s\"" +msgstr "Ne najdem datoteke! \"%s\"" + +#: src/bin/newfile.c:128 +#, c-format +msgid "Cannot find templates folder! \"%s\"" +msgstr "Ne najdem mape predlog! \"%s\"" + +#: src/bin/search.c:82 +#, c-format +msgid "%d matches replaced" +msgstr "%d zadetki zamenjani" + +#: src/bin/search.c:132 src/bin/search.c:194 +#, c-format +msgid "No \"%s\" in the text" +msgstr "Ni \"%s\" v besedilu" + +#: src/bin/search.c:233 src/bin/search.c:399 +msgid "Backward" +msgstr "Nazaj" + +#: src/bin/search.c:265 src/bin/search.c:392 +msgid "Forward" +msgstr "Naprej" + +#: src/bin/search.c:343 +msgid "Enventor Search" +msgstr "Enventor Iskanje" + +#: src/bin/search.c:346 +msgid "Find/Replace" +msgstr "Najdi/Zamenjaj" + +#: src/bin/search.c:414 +msgid "Replace All" +msgstr "Zamenjaj vse" + +#: src/bin/setting.c:213 +msgid "Preferences" +msgstr "Prednostne nastavitve" + +#: src/bin/setting.c:215 +msgid "Text Editor" +msgstr "Urejevalnik besedil" + +#: src/bin/setting.c:217 +msgid "EDC Build" +msgstr "EDC izgradnja" + +#: src/bin/setting.c:231 +msgid "Apply" +msgstr "Uveljavi" + +#: src/bin/setting.c:238 +msgid "Reset" +msgstr "Obnovi" + +#: src/bin/text_setting.c:438 +#, c-format +msgid "Failed to open file \"%s\"" +msgstr "Neuspeh pri odpiranju datoteke \"%s\"" + +#: src/bin/text_setting.c:759 +msgid "Double click a keyword to change its color :" +msgstr "Dvoklikni ključno besedo za spremembo njene barve :" + +#: src/bin/text_setting.c:796 +msgid "Font Size " +msgstr "Velikost pisave:" + +#: src/bin/text_setting.c:829 +msgid "Font Name" +msgstr "Ime pisave" + +#: src/bin/text_setting.c:856 +msgid "Font Style" +msgstr "Slog pisave:" + +#: src/bin/tools.c:134 +msgid "Redo text." +msgstr "Ponovno uveljavi besedilo." + +#: src/bin/tools.c:136 +msgid "No text to be redo." +msgstr "Ni besedila za ponovno uveljavitev." + +#: src/bin/tools.c:144 +msgid "Undo text." +msgstr "Razveljavi besedilo." + +#: src/bin/tools.c:146 +msgid "No text to be undo." +msgstr "Ni besedila za razveljavitev." + +#: src/bin/tools.c:201 +msgid "Part Highlighting (Ctrl + H)" +msgstr "Poudarjanje dela (Ctrl + H)" + +#: src/bin/tools.c:208 +msgid "Dummy Parts (Ctrl + W)" +msgstr "Butasti deli (Ctrl + W)" + +#: src/bin/tools.c:217 +msgid "Mirror Mode (Ctrl + M)" +msgstr "Način ogledala (Ctrl + M)" + +#: src/bin/tools.c:251 +msgid "Save File (Ctrl + S)" +msgstr "Shrani datoteko (Ctrl + S)" + +#: src/bin/tools.c:257 +msgid "Undo Text (Ctrl + Z)" +msgstr "Razveljavi besedilo (Ctrl + Z)" + +#: src/bin/tools.c:263 +msgid "Redo Text (Ctrl + R)" +msgstr "Ponovno uveljavi besedilo (Ctrl + R)" + +#: src/bin/tools.c:269 +msgid "Find/Replace (Ctrl + F)" +msgstr "Najdi/Zamenjaj (Ctrl + F)" + +#: src/bin/tools.c:276 +msgid "Goto Lines (Ctrl + L)" +msgstr "Pojdi na vrstice (Ctrl + L)" + +#: src/bin/tools.c:283 +msgid "Line Numbers (F5)" +msgstr "Številke vrstic (F5)" + +#: src/bin/tools.c:291 +msgid "Insert Template (Ctrl + T)" +msgstr "Vstavi predlogo (Ctrl + T)" + +#: src/bin/tools.c:298 +msgid "Console Box (Alt + Down)" +msgstr "Konzolna škatla (Alt + Down)" + +#: src/bin/tools.c:305 +msgid "File Browser (F9)" +msgstr "Brskalnik datotek (F9)" + +#: src/bin/tools.c:312 +msgid "EDC Navigator (F10)" +msgstr "EDC Navigator (F10)" + +#: src/bin/tools.c:319 +msgid "Status (F11)" +msgstr "Stanje (F11)" + +#: src/bin/tools.c:326 +msgid "Enventor Menu (Esc)" +msgstr "Enventor Meni (Esc)" + +#: src/bin/tools.c:371 +msgid "Part Highlighting Enabled." +msgstr "Omogočeno poudarjanje delov." + +#: src/bin/tools.c:373 +msgid "Part Highlighting Disabled." +msgstr "Onemogočeno poudarjanje delov." + +#: src/bin/tools.c:458 +msgid "Dummy Parts Enabled." +msgstr "Omogočeni butasti deli." + +#: src/bin/tools.c:460 +msgid "Dummy Parts Disabled." +msgstr "Onemogočeni butasti deli." + +#: src/bin/tools.c:483 +msgid "Mirror Mode Enabled." +msgstr "Omogočen način ogledala." + +#: src/bin/tools.c:485 +msgid "Mirror Mode Disabled." +msgstr "Onemogočen način ogledala." + +#: src/bin/tools.c:539 +msgid "Insertion of template code is disabled while in Live Edit mode" +msgstr "" +"Med načinom urejanja v živo, je vstavljanje kode predloge onemogočeno" + +#: src/bin/tools.c:548 +#, c-format +msgid "Template code inserted, (%s)" +msgstr "Vstavljena koda predloge, (%s)" + +#: src/bin/tools.c:554 +msgid "" +"Can't insert template code here. Move the cursor inside the \"Collections," +"Images,Parts,Part,Programs\" scope." +msgstr "" +"Tukaj ne morem vstaviti kode predloge. Premaknite kurzor znotraj okvirja " +"\"Zbirke,Slike,Deli,Del,Programi\"." diff --git a/src/bin/base_gui.c b/src/bin/base_gui.c index 4f69433..3d419cb 100644 --- a/src/bin/base_gui.c +++ b/src/bin/base_gui.c @@ -105,7 +105,20 @@ base_file_tab_toggle(Eina_Bool toggle) } } -void base_file_browser_toggle(Eina_Bool toggle) +static void +file_browser_hide_done(void *data, Evas_Object *obj EINA_UNUSED, + const char *emission EINA_UNUSED, + const char *source EINA_UNUSED) +{ + base_data *bd = data; + elm_object_signal_callback_del(bd->layout, + "elm,state,file_browser_hide,done", "", + file_browser_hide_done); + file_browser_hide(); +} + +void +base_file_browser_toggle(Eina_Bool toggle) { base_data *bd = g_bd; EINA_SAFETY_ON_NULL_RETURN(bd); @@ -113,17 +126,38 @@ void base_file_browser_toggle(Eina_Bool toggle) if (toggle) config_file_browser_set(!config_file_browser_get()); if (config_file_browser_get()) - elm_object_signal_emit(bd->layout, "elm,state,file_browser,show", ""); + { + elm_object_signal_emit(bd->layout, "elm,state,file_browser,show", ""); + file_browser_show(); + } else - elm_object_signal_emit(bd->layout, "elm,state,file_browser,hide", ""); + { + elm_object_signal_callback_add(bd->layout, + "elm,state,file_browser_hide,done", "", + file_browser_hide_done, bd); + elm_object_signal_emit(bd->layout, "elm,state,file_browser,hide", ""); + } } -void base_edc_navigator_deselect(void) +void +base_edc_navigator_deselect(void) { if (config_edc_navigator_get()) edc_navigator_deselect(); } +static void +edc_navigator_hide_done(void *data, Evas_Object *obj EINA_UNUSED, + const char *emission EINA_UNUSED, + const char *source EINA_UNUSED) +{ + base_data *bd = data; + elm_object_signal_callback_del(bd->layout, + "elm,state,edc_navigator_hide,done", "", + edc_navigator_hide_done); + edc_navigator_hide(); +} + void base_edc_navigator_toggle(Eina_Bool toggle) { base_data *bd = g_bd; @@ -135,9 +169,13 @@ void base_edc_navigator_toggle(Eina_Bool toggle) { base_edc_navigator_group_update(); elm_object_signal_emit(bd->layout, "elm,state,edc_navigator,show", ""); + edc_navigator_show(); } else { + elm_object_signal_callback_add(bd->layout, + "elm,state,edc_navigator_hide,done", "", + edc_navigator_hide_done, bd); elm_object_signal_emit(bd->layout, "elm,state,edc_navigator,hide", ""); edc_navigator_deselect(); } diff --git a/src/bin/config_data.c b/src/bin/config_data.c index 658ef28..c619340 100644 --- a/src/bin/config_data.c +++ b/src/bin/config_data.c @@ -23,6 +23,8 @@ typedef struct config_s float font_scale; double editor_size; double console_size; + double file_browser_size; + double edc_navigator_size; void (*update_cb)(void *data); void *update_cb_data; @@ -184,6 +186,8 @@ config_load(void) cd->win_size_h = WIN_DEFAULT_H; cd->editor_size = DEFAULT_EDITOR_SIZE; cd->console_size = DEFAULT_CONSOLE_SIZE; + cd->file_browser_size = DEFAULT_FILE_BROWSER_SIZE; + cd->edc_navigator_size = DEFAULT_EDC_NAVIGATOR_SIZE; cd->stats_bar = EINA_TRUE; cd->linenumber = EINA_TRUE; cd->part_highlight = EINA_TRUE; @@ -287,6 +291,10 @@ eddc_init(void) editor_size, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(edd_base, config_data, "console_size", console_size, EET_T_DOUBLE); + EET_DATA_DESCRIPTOR_ADD_BASIC(edd_base, config_data, "file_browser_size", + file_browser_size, EET_T_DOUBLE); + EET_DATA_DESCRIPTOR_ADD_BASIC(edd_base, config_data, "edc_navigator_size", + edc_navigator_size, EET_T_DOUBLE); EET_DATA_DESCRIPTOR_ADD_BASIC(edd_base, config_data, "view_size_w", view_size_w, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(edd_base, config_data, "view_size_h", @@ -1060,6 +1068,24 @@ config_file_browser_get(void) return cd->file_browser; } +void +config_file_browser_size_set(double size) +{ + config_data *cd = g_cd; + EINA_SAFETY_ON_NULL_RETURN(cd); + + cd->file_browser_size = size; +} + +double +config_file_browser_size_get(void) +{ + config_data *cd = g_cd; + EINA_SAFETY_ON_NULL_RETURN_VAL(cd, 0.0); + + return cd->file_browser_size; +} + void config_edc_navigator_set(Eina_Bool enabled) { @@ -1077,3 +1103,21 @@ config_edc_navigator_get(void) return cd->edc_navigator; } + +void +config_edc_navigator_size_set(double size) +{ + config_data *cd = g_cd; + EINA_SAFETY_ON_NULL_RETURN(cd); + + cd->edc_navigator_size = size; +} + +double +config_edc_navigator_size_get(void) +{ + config_data *cd = g_cd; + EINA_SAFETY_ON_NULL_RETURN_VAL(cd, 0.0); + + return cd->edc_navigator_size; +} diff --git a/src/bin/console.c b/src/bin/console.c index 03514d1..b33b35a 100644 --- a/src/bin/console.c +++ b/src/bin/console.c @@ -25,6 +25,8 @@ error_word_select(Evas_Object *console) return; } + if (elm_entry_is_empty(console)) return; + //Convert console text including markup text to the plain text const char *markup_text = elm_entry_entry_get(console); if (!markup_text) return; @@ -79,6 +81,12 @@ end: static void set_console_error_msg(Evas_Object *console, const char *src) { + if (!src || !strcmp(src, "")) + { + elm_entry_entry_set(console, NULL); + return; + } + /* We cut error messages since it contains unnecessary information. Most of the time, first one line has a practical information. */ const char *new_line = "
"; diff --git a/src/bin/edc_navigator.c b/src/bin/edc_navigator.c index e327eae..440f030 100644 --- a/src/bin/edc_navigator.c +++ b/src/bin/edc_navigator.c @@ -937,7 +937,7 @@ programs_update(navi_data *nd, group_it *git) Enventor_Object *enventor = base_enventor_get(); Eina_List *program_list = enventor_object_programs_list_get(enventor); - //oh, no programs.. + //oh, no programs.. if (!program_list) { navigator_programs_clear(git); @@ -1351,6 +1351,44 @@ gl_contract_request_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, } } +static void +dragable_bar_mouse_up_cb(void *data, Evas *e EINA_UNUSED, + Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *main_layout = data; + if (!main_layout) return; + + double w; + edje_object_part_drag_value_get + (elm_layout_edje_get(main_layout), "elm.bar.right", &w, NULL); + if (w > 0.99) + { + config_edc_navigator_set(EINA_FALSE); + tools_edc_navigator_update(EINA_FALSE); + config_edc_navigator_size_set(0.0); + } + else + config_edc_navigator_size_set(w); +} + +static void +dragable_bar_mouse_down_cb(void *data, Evas *e EINA_UNUSED, + Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *main_layout = data; + if (!main_layout) return; + + double w; + edje_object_part_drag_value_get + (elm_layout_edje_get(main_layout), "elm.bar.right", &w, NULL); + if (w > 0.99) + { + config_edc_navigator_set(EINA_TRUE); + tools_edc_navigator_update(EINA_FALSE); + } +} /*****************************************************************************/ /* Externally accessible calls */ /*****************************************************************************/ @@ -1372,7 +1410,7 @@ edc_navigator_group_update(const char *cur_group) //FIXME: This function is unnecessarily called... why? - //Cancel item selection if group was not indicated. + //Cancel item selection if group was not indicated. if (!cur_group) navigator_item_deselect(nd); Eina_List *group_list = enventor_item_group_list_get(file_mgr_focused_item_get()); @@ -1536,9 +1574,21 @@ edc_navigator_init(Evas_Object *parent) nd->program_itc = itc; + //Dragable Bar + Evas_Object *bar = evas_object_rectangle_add(evas_object_evas_get(parent)); + evas_object_color_set(bar, 0, 0, 0, 0); + evas_object_event_callback_add(bar, EVAS_CALLBACK_MOUSE_DOWN, + dragable_bar_mouse_down_cb, parent); + evas_object_event_callback_add(bar, EVAS_CALLBACK_MOUSE_UP, + dragable_bar_mouse_up_cb, parent); + elm_object_part_content_set(parent, "bar_right", bar); + nd->base_layout = base_layout; nd->genlist = genlist; + if (config_edc_navigator_get()) + config_edc_navigator_size_set(config_edc_navigator_size_get()); + return base_layout; } @@ -1585,3 +1635,28 @@ edc_navigator_tools_visible_set(Eina_Bool visible) else elm_object_signal_emit(nd->base_layout, "elm,state,tools,hide", ""); } + +void +edc_navigator_show() +{ + navi_data *nd = g_nd; + if (!nd) return; + + Evas_Object *main_layout = evas_object_smart_parent_get(nd->base_layout); + if (!main_layout) return; + + double w = config_edc_navigator_size_get(); + edje_object_part_drag_value_set(main_layout, "elm.bar.right", w, 0.0); +} + +void +edc_navigator_hide() +{ + navi_data *nd = g_nd; + if (!nd) return; + + Evas_Object *main_layout = evas_object_smart_parent_get(nd->base_layout); + if (!main_layout) return; + + edje_object_part_drag_value_set(main_layout, "elm.bar.right", 1.0, 0.0); +} diff --git a/src/bin/file_browser.c b/src/bin/file_browser.c index eb65bb2..58ceaf2 100644 --- a/src/bin/file_browser.c +++ b/src/bin/file_browser.c @@ -624,6 +624,44 @@ show_all_check_changed_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, } } +static void +dragable_bar_mouse_up_cb(void *data, Evas *e EINA_UNUSED, + Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *main_layout = data; + if (!main_layout) return; + + double w; + edje_object_part_drag_value_get + (elm_layout_edje_get(main_layout), "elm.bar.left", &w, NULL); + if (w < 0.01) + { + config_file_browser_set(EINA_FALSE); + tools_file_browser_update(EINA_FALSE); + config_file_browser_size_set(0.0); + } + else + config_file_browser_size_set(w); +} + +static void +dragable_bar_mouse_down_cb(void *data, Evas *e EINA_UNUSED, + Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *main_layout = data; + if (!main_layout) return; + + double w; + edje_object_part_drag_value_get + (elm_layout_edje_get(main_layout), "elm.bar.left", &w, NULL); + if (w < 0.01) + { + config_file_browser_set(EINA_TRUE); + tools_file_browser_update(EINA_FALSE); + } +} /*****************************************************************************/ /* Externally accessible calls */ /*****************************************************************************/ @@ -772,11 +810,23 @@ file_browser_init(Evas_Object *parent) search_itc->func.content_get = gl_search_content_get_cb; bd->search_itc = search_itc; + //Dragable Bar + Evas_Object *bar = evas_object_rectangle_add(evas_object_evas_get(parent)); + evas_object_color_set(bar, 0, 0, 0, 0); + evas_object_event_callback_add(bar, EVAS_CALLBACK_MOUSE_DOWN, + dragable_bar_mouse_down_cb, parent); + evas_object_event_callback_add(bar, EVAS_CALLBACK_MOUSE_UP, + dragable_bar_mouse_up_cb, parent); + elm_object_part_content_set(parent, "bar_left", bar); + bd->base_layout = base_layout; bd->search_entry = search_entry; bd->genlist = genlist; bd->show_all_check = show_all_check; + if (config_file_browser_get()) + config_file_browser_size_set(config_file_browser_size_get()); + elm_object_disabled_set(base_layout, EINA_TRUE); return base_layout; @@ -923,3 +973,28 @@ file_browser_selected_file_main_set(void) config_input_path_set(file->path); elm_genlist_realized_items_update(bd->genlist); } + +void +file_browser_show() +{ + brows_data *bd = g_bd; + if (!bd) return; + + Evas_Object *main_layout = evas_object_smart_parent_get(bd->base_layout); + if (!main_layout) return; + + double w = config_file_browser_size_get(); + edje_object_part_drag_value_set(main_layout, "elm.bar.left", w, 0.0); +} + +void +file_browser_hide() +{ + brows_data *bd = g_bd; + if (!bd) return; + + Evas_Object *main_layout = evas_object_smart_parent_get(bd->base_layout); + if (!main_layout) return; + + edje_object_part_drag_value_set(main_layout, "elm.bar.left", 0.0, 0.0); +} diff --git a/src/bin/file_mgr.c b/src/bin/file_mgr.c index 4f65386..39d1506 100644 --- a/src/bin/file_mgr.c +++ b/src/bin/file_mgr.c @@ -140,7 +140,7 @@ enventor_edc_modified_cb(void *data, Evas_Object *obj EINA_UNUSED, fmd->edc_modified = EINA_TRUE; - /* FIXME: Here ignore edc changes, if any menu is closed, + /* FIXME: Here ignore edc changes, if any menu is closed, then we need to open warning box. */ if (menu_activated_get()) return; diff --git a/src/bin/main.c b/src/bin/main.c index c7d4201..d3b52a6 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -631,8 +631,7 @@ enventor_setup(app_data *ad) static Eina_Bool alt_func(Evas_Event_Key_Down *event) { - if (evas_key_modifier_is_set(event->modifiers, "Shift") || - evas_key_modifier_is_set(event->modifiers, "Ctrl")) + if (!evas_key_modifier_is_set(event->modifiers, "Alt")) return EINA_FALSE; //Full Edit View @@ -666,8 +665,7 @@ alt_func(Evas_Event_Key_Down *event) static Eina_Bool ctrl_func(Evas_Event_Key_Down *event) { - if (evas_key_modifier_is_set(event->modifiers, "Shift") || - evas_key_modifier_is_set(event->modifiers, "Alt")) + if (!evas_key_modifier_is_set(event->modifiers, "Control")) return EINA_FALSE; //Save @@ -862,7 +860,7 @@ static void keygrabber_init(app_data *ad) { Evas *e = evas_object_evas_get(base_enventor_get()); - ad->keygrabber = evas_object_rectangle_add(e); + ad->keygrabber = base_enventor_get(); evas_object_event_callback_add(ad->keygrabber, EVAS_CALLBACK_KEY_DOWN, keygrabber_key_down_cb, NULL); #define GRAB_ADD(key, modifier) \ @@ -934,7 +932,7 @@ enventor_lock_create(void) //Exception 2 //Create temp directory if it doesn't exist. - if (!ecore_file_path_dir_exists(tmpdir)) + if (!ecore_file_is_dir(tmpdir)) { Eina_Bool success = ecore_file_mkdir(tmpdir); if (!success) @@ -1015,7 +1013,7 @@ enventor_lock_remove() return; } - if (!ecore_file_path_dir_exists(tmpdir)) + if (!ecore_file_is_dir(tmpdir)) { EINA_LOG_ERR("Cannot access to temporary directory?! = %s", tmpdir); return; diff --git a/src/bin/menu.c b/src/bin/menu.c index de9734e..660d8c1 100644 --- a/src/bin/menu.c +++ b/src/bin/menu.c @@ -700,7 +700,7 @@ menu_toggle(void) return; } - //Main Menu + //Main Menu if (md->active_request) menu_close(md); else { diff --git a/src/bin/newfile.c b/src/bin/newfile.c index 3ef4dbe..4b2c0bc 100644 --- a/src/bin/newfile.c +++ b/src/bin/newfile.c @@ -74,7 +74,7 @@ templates_get(new_data *nd) char buf[PATH_MAX]; snprintf(buf, sizeof(buf), "%s/templates", elm_app_data_dir_get()); - if (!ecore_file_path_dir_exists(buf)) + if (!ecore_file_is_dir(buf)) { EINA_LOG_ERR(_("Cannot find templates folder! \"%s\""), buf); return; diff --git a/src/bin/panes.c b/src/bin/panes.c index 0d632ce..f0a66e5 100644 --- a/src/bin/panes.c +++ b/src/bin/panes.c @@ -21,8 +21,8 @@ typedef struct _pane_data typedef struct _panes_data { - pane_data horiz; //horizontal pane data (live view, text editor) - pane_data vert; //vertical pane data (editors, console) + pane_data horiz; //horizontal pane data (editors, console) + pane_data vert; //vertical pane data (live view, text editor) Evas_Object *text_tool_layout; Evas_Object *live_tool_layout; } panes_data; @@ -54,45 +54,45 @@ transit_op_h(void *data, Elm_Transit *transit EINA_UNUSED, double progress) static void v_press_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { - panes_data *pd = data; - pd->vert.last_size[0] = elm_panes_content_right_size_get(obj); + panes_data *pd = data; + pd->vert.last_size[0] = elm_panes_content_right_size_get(obj); } static void v_unpress_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { - panes_data *pd = data; - double size = elm_panes_content_right_size_get(obj); - if (pd->vert.last_size[0] != size) pd->vert.last_size[1] = size; - config_console_size_set(size); - - double origin = elm_panes_content_right_size_get(pd->vert.obj); - if (origin == 0.0) - { - pd->vert.state = PANES_EDITORS_EXPAND; - tools_console_update(EINA_FALSE); - } - else - { - pd->vert.state = PANES_SPLIT_VIEW; - tools_console_update(EINA_TRUE); - } + panes_data *pd = data; + double size = elm_panes_content_right_size_get(obj); + if (pd->vert.last_size[0] != size) pd->vert.last_size[1] = size; + config_editor_size_set(size); } static void h_press_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { - panes_data *pd = data; - pd->horiz.last_size[0] = elm_panes_content_right_size_get(obj); + panes_data *pd = data; + pd->horiz.last_size[0] = elm_panes_content_right_size_get(obj); } static void h_unpress_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { - panes_data *pd = data; - double size = elm_panes_content_right_size_get(obj); - if (pd->horiz.last_size[0] != size) pd->horiz.last_size[1] = size; - config_editor_size_set(size); + panes_data *pd = data; + double size = elm_panes_content_right_size_get(obj); + if (pd->horiz.last_size[0] != size) pd->horiz.last_size[1] = size; + config_console_size_set(size); + + double origin = elm_panes_content_right_size_get(pd->horiz.obj); + if (origin == 0.0) + { + pd->horiz.state = PANES_EDITORS_EXPAND; + tools_console_update(EINA_FALSE); + } + else + { + pd->horiz.state = PANES_SPLIT_VIEW; + tools_console_update(EINA_TRUE); + } } static void @@ -115,6 +115,13 @@ panes_h_full_view_cancel(panes_data *pd) pd->horiz.origin = elm_panes_content_right_size_get(pd->horiz.obj); pd->horiz.delta = pd->horiz.last_size[1] - pd->horiz.origin; + //init console size to default + if (pd->horiz.delta == 0.0) + { + pd->horiz.delta = DEFAULT_CONSOLE_SIZE; + config_console_size_set(DEFAULT_CONSOLE_SIZE); + } + elm_transit_del(pd->horiz.transit); Elm_Transit *transit = elm_transit_add(); @@ -134,20 +141,13 @@ panes_v_full_view_cancel(panes_data *pd) pd->vert.origin = elm_panes_content_right_size_get(pd->vert.obj); pd->vert.delta = pd->vert.last_size[1] - pd->vert.origin; - //init console size to default - if (pd->vert.delta == 0.0) - { - pd->vert.delta = DEFAULT_CONSOLE_SIZE; - config_console_size_set(DEFAULT_CONSOLE_SIZE); - } - elm_transit_del(pd->vert.transit); Elm_Transit *transit = elm_transit_add(); - elm_transit_del_cb_set(transit, vert_transit_del_cb, pd); elm_transit_effect_add(transit, transit_op_v, pd, NULL); elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); elm_transit_duration_set(transit, TRANSIT_TIME); + elm_transit_del_cb_set(transit, vert_transit_del_cb, pd); elm_transit_go(transit); pd->vert.transit = transit; @@ -165,29 +165,29 @@ panes_text_editor_full_view(void) EINA_SAFETY_ON_NULL_RETURN(pd); //Revert state if the current state is full view right already. - if (pd->horiz.state == PANES_TEXT_EDITOR_EXPAND) + if (pd->vert.state == PANES_TEXT_EDITOR_EXPAND) { - panes_h_full_view_cancel(pd); + panes_v_full_view_cancel(pd); return; } - double origin = elm_panes_content_right_size_get(pd->horiz.obj); + double origin = elm_panes_content_right_size_get(pd->vert.obj); if (origin == 0.0) return; - pd->horiz.origin = origin; - pd->horiz.delta = 0.0 - pd->horiz.origin; + pd->vert.origin = origin; + pd->vert.delta = 0.0 - pd->vert.origin; - elm_transit_del(pd->horiz.transit); + elm_transit_del(pd->vert.transit); Elm_Transit *transit = elm_transit_add(); - elm_transit_effect_add(transit, transit_op_h, pd, NULL); + elm_transit_effect_add(transit, transit_op_v, pd, NULL); elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); elm_transit_duration_set(transit, TRANSIT_TIME); - elm_transit_del_cb_set(transit, horiz_transit_del_cb, pd); + elm_transit_del_cb_set(transit, vert_transit_del_cb, pd); elm_transit_go(transit); - pd->horiz.transit = transit; - pd->horiz.state = PANES_TEXT_EDITOR_EXPAND; + pd->vert.transit = transit; + pd->vert.state = PANES_TEXT_EDITOR_EXPAND; } void @@ -197,29 +197,29 @@ panes_live_view_full_view(void) EINA_SAFETY_ON_NULL_RETURN(pd); //Revert state if the current state is full view left already. - if (pd->horiz.state == PANES_LIVE_VIEW_EXPAND) + if (pd->vert.state == PANES_LIVE_VIEW_EXPAND) { - panes_h_full_view_cancel(pd); + panes_v_full_view_cancel(pd); return; } - double origin = elm_panes_content_right_size_get(pd->horiz.obj); + double origin = elm_panes_content_right_size_get(pd->vert.obj); if (origin == 1.0) return; - pd->horiz.origin = origin; - pd->horiz.delta = 1.0 - pd->horiz.origin; + pd->vert.origin = origin; + pd->vert.delta = 1.0 - pd->vert.origin; - elm_transit_del(pd->horiz.transit); + elm_transit_del(pd->vert.transit); Elm_Transit *transit = elm_transit_add(); - elm_transit_effect_add(transit, transit_op_h, pd, NULL); + elm_transit_effect_add(transit, transit_op_v, pd, NULL); elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); elm_transit_duration_set(transit, TRANSIT_TIME); - elm_transit_del_cb_set(transit, horiz_transit_del_cb, pd); + elm_transit_del_cb_set(transit, vert_transit_del_cb, pd); elm_transit_go(transit); - pd->horiz.transit = transit; - pd->horiz.state = PANES_LIVE_VIEW_EXPAND; + pd->vert.transit = transit; + pd->vert.state = PANES_LIVE_VIEW_EXPAND; } Eina_Bool @@ -228,7 +228,7 @@ panes_editors_full_view_get(void) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN_VAL(pd, EINA_FALSE); - if (pd->vert.state == PANES_EDITORS_EXPAND) return EINA_TRUE; + if (pd->horiz.state == PANES_EDITORS_EXPAND) return EINA_TRUE; else return EINA_FALSE; } @@ -240,26 +240,26 @@ panes_editors_full_view(Eina_Bool full_view) if (full_view) { - if (pd->vert.state == PANES_EDITORS_EXPAND) return; - pd->vert.origin = elm_panes_content_right_size_get(pd->vert.obj); - pd->vert.delta = 0.0 - pd->vert.origin; + if (pd->horiz.state == PANES_EDITORS_EXPAND) return; + pd->horiz.origin = elm_panes_content_right_size_get(pd->horiz.obj); + pd->horiz.delta = 0.0 - pd->horiz.origin; - elm_transit_del(pd->vert.transit); + elm_transit_del(pd->horiz.transit); Elm_Transit *transit = elm_transit_add(); - elm_transit_effect_add(transit, transit_op_v, pd, NULL); + elm_transit_effect_add(transit, transit_op_h, pd, NULL); elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); elm_transit_duration_set(transit, TRANSIT_TIME); - elm_transit_del_cb_set(transit, vert_transit_del_cb, pd); + elm_transit_del_cb_set(transit, horiz_transit_del_cb, pd); elm_transit_go(transit); - pd->vert.transit = transit; - pd->vert.state = PANES_EDITORS_EXPAND; + pd->horiz.transit = transit; + pd->horiz.state = PANES_EDITORS_EXPAND; } else { //Revert state if the current state is full view bottom already. - if (pd->vert.state == PANES_SPLIT_VIEW) return; - panes_v_full_view_cancel(pd); + if (pd->horiz.state == PANES_SPLIT_VIEW) return; + panes_h_full_view_cancel(pd); } } @@ -270,29 +270,29 @@ panes_console_full_view(void) EINA_SAFETY_ON_NULL_RETURN(pd); //Revert state if the current state is full view top already. - if (pd->vert.state == PANES_CONSOLE_EXPAND) + if (pd->horiz.state == PANES_CONSOLE_EXPAND) { - panes_v_full_view_cancel(pd); + panes_h_full_view_cancel(pd); return; } - double origin = elm_panes_content_right_size_get(pd->vert.obj); + double origin = elm_panes_content_right_size_get(pd->horiz.obj); if (origin == 1.0) return; - pd->vert.origin = origin; - pd->vert.delta = 1.0 - pd->vert.origin; + pd->horiz.origin = origin; + pd->horiz.delta = 1.0 - pd->horiz.origin; - elm_transit_del(pd->vert.transit); + elm_transit_del(pd->horiz.transit); Elm_Transit *transit = elm_transit_add(); - elm_transit_effect_add(transit, transit_op_v, pd, NULL); + elm_transit_effect_add(transit, transit_op_h, pd, NULL); elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE); elm_transit_duration_set(transit, TRANSIT_TIME); - elm_transit_del_cb_set(transit, vert_transit_del_cb, pd); + elm_transit_del_cb_set(transit, horiz_transit_del_cb, pd); elm_transit_go(transit); - pd->vert.transit = transit; - pd->vert.state = PANES_CONSOLE_EXPAND; + pd->horiz.transit = transit; + pd->horiz.state = PANES_CONSOLE_EXPAND; } void @@ -319,7 +319,7 @@ panes_console_set(Evas_Object *console) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - elm_object_part_content_set(pd->vert.obj, "bottom", console); + elm_object_part_content_set(pd->horiz.obj, "bottom", console); } void @@ -328,9 +328,9 @@ panes_term(void) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - evas_object_del(pd->vert.obj); - elm_transit_del(pd->vert.transit); + evas_object_del(pd->horiz.obj); elm_transit_del(pd->horiz.transit); + elm_transit_del(pd->vert.transit); free(pd); } @@ -345,64 +345,64 @@ panes_init(Evas_Object *parent) } g_pd = pd; + //Panes Horizontal + Evas_Object *panes_h = elm_panes_add(parent); + elm_object_style_set(panes_h, "flush"); + elm_panes_horizontal_set(panes_h, EINA_TRUE); + evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_smart_callback_add(panes_h, "press", h_press_cb, pd); + evas_object_smart_callback_add(panes_h, "unpress", h_unpress_cb, pd); + + pd->horiz.obj = panes_h; + pd->horiz.state = PANES_SPLIT_VIEW; + pd->horiz.last_size[0] = config_console_size_get(); + pd->horiz.last_size[1] = config_console_size_get(); + pd->horiz.transit = NULL; + //Panes Vertical Evas_Object *panes_v = elm_panes_add(parent); - elm_object_style_set(panes_v, "flush"); + elm_object_style_set(panes_v, ENVENTOR_NAME); elm_panes_horizontal_set(panes_v, EINA_FALSE); evas_object_size_hint_weight_set(panes_v, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_smart_callback_add(panes_v, "press", v_press_cb, pd); evas_object_smart_callback_add(panes_v, "unpress", v_unpress_cb, pd); + elm_object_part_content_set(panes_h, "top", panes_v); + pd->vert.obj = panes_v; pd->vert.state = PANES_SPLIT_VIEW; - pd->vert.last_size[0] = config_console_size_get(); - pd->vert.last_size[1] = config_console_size_get(); + pd->vert.last_size[0] = config_editor_size_get(); + pd->vert.last_size[1] = config_editor_size_get(); pd->vert.transit = NULL; - //Panes Horizontal - Evas_Object *panes_h = elm_panes_add(parent); - elm_object_style_set(panes_h, ENVENTOR_NAME); - elm_panes_horizontal_set(panes_v, EINA_TRUE); - evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - evas_object_smart_callback_add(panes_h, "press", h_press_cb, pd); - evas_object_smart_callback_add(panes_h, "unpress", h_unpress_cb, pd); - - elm_object_part_content_set(panes_v, "top", panes_h); - - pd->horiz.obj = panes_h; - pd->horiz.state = PANES_SPLIT_VIEW; - pd->horiz.last_size[0] = config_editor_size_get(); - pd->horiz.last_size[1] = config_editor_size_get(); - pd->horiz.transit = NULL; - - elm_panes_content_right_size_set(panes_h, config_editor_size_get()); - elm_panes_content_right_size_set(panes_v, config_console_size_get()); + elm_panes_content_right_size_set(panes_h, config_console_size_get()); + elm_panes_content_right_size_set(panes_v, config_editor_size_get()); //Text Tools - Evas_Object *text_tool_layout = elm_layout_add(pd->horiz.obj); + Evas_Object *text_tool_layout = elm_layout_add(pd->vert.obj); elm_layout_file_set(text_tool_layout, EDJE_PATH, "tools_layout"); evas_object_size_hint_weight_set(text_tool_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(text_tool_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(pd->horiz.obj, "right", text_tool_layout); + elm_object_part_content_set(pd->vert.obj, "right", text_tool_layout); pd->text_tool_layout = text_tool_layout; //Live Edit Tools - Evas_Object *live_tool_layout = elm_layout_add(pd->horiz.obj); + Evas_Object *live_tool_layout = elm_layout_add(pd->vert.obj); elm_layout_file_set(live_tool_layout, EDJE_PATH, "tools_layout"); evas_object_size_hint_weight_set(live_tool_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(live_tool_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(pd->horiz.obj, "left", live_tool_layout); + elm_object_part_content_set(pd->vert.obj, "left", live_tool_layout); pd->live_tool_layout = live_tool_layout; - return panes_v; + return panes_h; } void @@ -411,7 +411,7 @@ panes_live_view_tools_set(Evas_Object *tools) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - Evas_Object *live_view = elm_object_part_content_get(pd->horiz.obj, "left"); + Evas_Object *live_view = elm_object_part_content_get(pd->vert.obj, "left"); elm_object_part_content_set(live_view, "elm.swallow.tools", tools); } @@ -421,7 +421,7 @@ panes_live_edit_fixed_bar_set(Evas_Object *fixed_bar) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - Evas_Object *live_view = elm_object_part_content_get(pd->horiz.obj, "left"); + Evas_Object *live_view = elm_object_part_content_get(pd->vert.obj, "left"); elm_object_part_content_set(live_view, "elm.swallow.fixed_bar", fixed_bar); } @@ -431,7 +431,7 @@ panes_text_editor_tools_set(Evas_Object *tools) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - Evas_Object *text_editor = elm_object_part_content_get(pd->horiz.obj, + Evas_Object *text_editor = elm_object_part_content_get(pd->vert.obj, "right"); elm_object_part_content_set(text_editor, "elm.swallow.tools", tools); } @@ -442,7 +442,7 @@ panes_live_view_tools_visible_set(Eina_Bool visible) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - Evas_Object *live_view = elm_object_part_content_get(pd->horiz.obj, "left"); + Evas_Object *live_view = elm_object_part_content_get(pd->vert.obj, "left"); if (visible) elm_object_signal_emit(live_view, "elm,state,tools,show", ""); @@ -456,7 +456,7 @@ panes_live_edit_fixed_bar_visible_set(Eina_Bool visible) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - Evas_Object *live_view = elm_object_part_content_get(pd->horiz.obj, "left"); + Evas_Object *live_view = elm_object_part_content_get(pd->vert.obj, "left"); if (visible) elm_object_signal_emit(live_view, "elm,state,fixed_bar,show", ""); @@ -471,7 +471,7 @@ panes_text_editor_tools_visible_set(Eina_Bool visible) panes_data *pd = g_pd; EINA_SAFETY_ON_NULL_RETURN(pd); - Evas_Object *text_editor = elm_object_part_content_get(pd->horiz.obj, + Evas_Object *text_editor = elm_object_part_content_get(pd->vert.obj, "right"); if (visible) diff --git a/src/bin/preference_setting.c b/src/bin/preference_setting.c index 72a91b0..0cb6624 100644 --- a/src/bin/preference_setting.c +++ b/src/bin/preference_setting.c @@ -239,8 +239,7 @@ preference_setting_content_get(preference_setting_data *psd, toggle_create(box, _("Status"), config_stats_bar_get(), _("Status (F8)
" "Display Status bar, which shows subsidiary
" - "information for editing in the bottom area." - "editing.")); + "information for editing in the bottom area.")); elm_box_pack_end(box, toggle_status); //Toggle (Console) @@ -255,8 +254,7 @@ preference_setting_content_get(preference_setting_data *psd, //Toggle (Auto Indentation) Evas_Object *toggle_indent = toggle_create(box, _("Auto Indentation"), config_auto_indent_get(), - _("Auto indentation (Ctrl + I)
" - "Apply automatic indentation for text editing.
" + _("Apply automatic indentation for text editing.
" "When wrapping the text around, Enventor
" "inserts the line indentation automatically.")); elm_box_pack_end(box, toggle_indent); @@ -264,9 +262,8 @@ preference_setting_content_get(preference_setting_data *psd, //Toggle (Auto Completion) Evas_Object *toggle_autocomp = toggle_create(box, _("Auto Completion"), config_auto_complete_get(), - _("Auto completion (Ctrl + O)
" - "Display the candidate keyword popup with
" - "regards to the current editing contxt.
" + _("Display the candidate keyword popup with
" + "regards to the current editing context.
" "When you type texts in the editor, the candidate
" "popup appears. You can choose an item
" "from the list, and a code template is inserted.")); diff --git a/src/bin/search.c b/src/bin/search.c index 12a7453..b66f5d9 100644 --- a/src/bin/search.c +++ b/src/bin/search.c @@ -107,6 +107,11 @@ selection_region_anim_cb(void *data) search_data *sd = data; enventor_item_select_region_set(sd->it, sd->pos, (sd->pos + sd->len)); + + //Move search position to the end of the word if search type is forward + if (sd->forward) + sd->pos += sd->len; + return ECORE_CALLBACK_CANCEL; } @@ -228,6 +233,7 @@ replace_proc(search_data *sd) if (strcmp(find, utf8)) return EINA_FALSE; const char *replace = elm_entry_entry_get(sd->en_replace); enventor_item_text_insert(sd->it, replace); + enventor_item_select_none(sd->it); free(utf8); return EINA_TRUE; } diff --git a/src/bin/text_setting.c b/src/bin/text_setting.c index 324f48c..c0800da 100644 --- a/src/bin/text_setting.c +++ b/src/bin/text_setting.c @@ -112,7 +112,7 @@ static int color_type_list[COLOR_KEYWORD_MAX_CNT] = ENVENTOR_SYNTAX_COLOR_SYMBOL, ENVENTOR_SYNTAX_COLOR_SYMBOL, //set_int(... ENVENTOR_SYNTAX_COLOR_SCRIPT_FUNC, ENVENTOR_SYNTAX_COLOR_SYMBOL, - //flag, 1);... + //flag, 1);... ENVENTOR_SYNTAX_COLOR_SYMBOL, ENVENTOR_SYNTAX_COLOR_SYMBOL, //} } ENVENTOR_SYNTAX_COLOR_SYMBOL, ENVENTOR_SYNTAX_COLOR_SYMBOL @@ -778,7 +778,10 @@ font_name_selected_cb(void *data, Evas_Object *obj, config_font_get(&font_name, &font_style); + //Initialize font style elm_list_clear(tsd->list_font_style); + eina_stringshare_del(tsd->font_style); + tsd->font_style = NULL; //Append Items of Font Style List Elm_Font_Properties *efp; @@ -802,6 +805,7 @@ font_name_selected_cb(void *data, Evas_Object *obj, NULL, NULL, font_style_selected_cb, tsd); + if (font_name && !strcmp(font_name, efp->name) && font_style && !strcmp(font_style, style)) font_style_it = it; @@ -811,10 +815,12 @@ font_name_selected_cb(void *data, Evas_Object *obj, } } elm_list_go(tsd->list_font_style); - if (font_style_it) elm_list_item_selected_set(font_style_it, EINA_TRUE); + + if (!font_style_it) + font_style_it = elm_list_first_item_get(tsd->list_font_style); + elm_list_item_selected_set(font_style_it, EINA_TRUE); eina_stringshare_replace(&tsd->font_name, sel_font_name); - eina_stringshare_replace(&tsd->font_style, NULL); text_setting_font_apply(tsd); } diff --git a/src/bin/tools.c b/src/bin/tools.c index 08fcdd3..783c0b8 100644 --- a/src/bin/tools.c +++ b/src/bin/tools.c @@ -154,6 +154,30 @@ undo_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, stats_info_msg_update(_("No text to be undo.")); } +static void +tools_separator_insert(Evas_Object *box) +{ + Evas_Object *separator = evas_object_rectangle_add(evas_object_evas_get(box)); + evas_object_color_set(separator, 48, 48, 48, 255); + evas_object_size_hint_weight_set(separator, 0.0, 0.0); + evas_object_size_hint_align_set(separator, 0.0, 0.5); + evas_object_size_hint_min_set(separator, 1, 20); + elm_box_pack_end(box, separator); + evas_object_show(separator); +} + +static void +tools_space_insert(Evas_Object *box, int size) +{ + Evas_Object *space = evas_object_rectangle_add(evas_object_evas_get(box)); + evas_object_color_set(space, 0, 0, 0, 0); + evas_object_size_hint_weight_set(space, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(space, 0.0, EVAS_HINT_FILL); + evas_object_size_hint_min_set(space, size, 0); + elm_box_pack_end(box, space); + evas_object_show(space); +} + static Evas_Object * tools_btn_create(Evas_Object *parent, const char *icon, const char *tooltip_msg, Evas_Smart_Cb func) @@ -197,136 +221,186 @@ tools_init(Evas_Object *parent) g_td = td; //Live view tools - Evas_Object *live_view_ly = elm_layout_add(parent); - elm_layout_file_set(live_view_ly, EDJE_PATH, "live_view_tools_layout"); - evas_object_size_hint_weight_set(live_view_ly, EVAS_HINT_EXPAND, + Evas_Object *live_view_scr = elm_scroller_add(parent); + evas_object_size_hint_weight_set(live_view_scr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(live_view_ly, EVAS_HINT_FILL, + evas_object_size_hint_align_set(live_view_scr, EVAS_HINT_FILL, EVAS_HINT_FILL); - + elm_scroller_bounce_set(live_view_scr, EINA_FALSE, EINA_FALSE); + elm_scroller_policy_set(live_view_scr, ELM_SCROLLER_POLICY_OFF, + ELM_SCROLLER_POLICY_OFF); + evas_object_show(live_view_scr); + + Evas_Object *box = elm_box_add(live_view_scr); + elm_box_horizontal_set(box, EINA_TRUE); + evas_object_size_hint_weight_set(box, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(box, 0.0, EVAS_HINT_FILL); + elm_object_content_set(live_view_scr, box); + evas_object_show(box); + + tools_space_insert(box, 14); Evas_Object *btn; - btn = tools_btn_create(live_view_ly, "highlight", + btn = tools_btn_create(box, "highlight", _("Part highlighting (Ctrl + H)
" "Show a highlight effect on the selected part
" "in the live view."), highlight_cb); elm_object_tooltip_orient_set(btn, ELM_TOOLTIP_ORIENT_BOTTOM_RIGHT); - evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(live_view_ly, "elm.swallow.highlight", btn); + evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL); + elm_box_pack_end(box, btn); td->highlight_btn = btn; - btn = tools_btn_create(live_view_ly, "dummy", + tools_space_insert(box, 8); + btn = tools_btn_create(box, "dummy", _("Dummy parts (Ctrl + U)
" "Display virtual images for the swallow and
" "spacer parts."), dummy_cb); elm_object_tooltip_orient_set(btn, ELM_TOOLTIP_ORIENT_BOTTOM_RIGHT); - evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(live_view_ly, "elm.swallow.dummy", btn); + evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL); + elm_box_pack_end(box, btn); td->swallow_btn = btn; - btn = tools_btn_create(live_view_ly, "wireframes_icon", + tools_space_insert(box, 8); + btn = tools_btn_create(box, "wireframes_icon", _("Wireframes (Ctrl + W)
" "Display wireframes to identify the parts
" "boundaries."), wireframes_cb); elm_object_tooltip_orient_set(btn, ELM_TOOLTIP_ORIENT_BOTTOM_RIGHT); - evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(live_view_ly, "elm.swallow.wireframes", btn); + evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL); + elm_box_pack_end(box, btn); td->wireframes_btn = btn; - btn = tools_btn_create(live_view_ly, "mirror", + tools_space_insert(box, 8); + btn = tools_btn_create(box, "mirror", _("Mirror mode (Ctrl + M)
" "Invert the layout horizontally and review
" "the designed layout in RTL(right-to-left)
" "LTR(left-to-right) settings."), mirror_cb); - evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(live_view_ly, "elm.swallow.mirror", btn); + evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(btn, 0.0, EVAS_HINT_FILL); + elm_box_pack_end(box, btn); td->mirror_btn = btn; + tools_space_insert(box, 14); + tools_separator_insert(box); + tools_space_insert(box, 14); //Live edit tools - Eina_List *btn_list = live_edit_tools_create(live_view_ly); + Eina_List *btn_list = live_edit_tools_create(box); Eina_List *l = NULL; int i = 1; EINA_LIST_FOREACH(btn_list, l, btn) { - evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(btn, 0.0, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(btn, 1.0, EVAS_HINT_FILL); char swallow_part[32]; snprintf(swallow_part, sizeof(swallow_part), "elm.swallow.live_edit%d", i); - elm_object_part_content_set(live_view_ly, swallow_part, btn); + elm_box_pack_end(box, btn); + tools_space_insert(box, 8); i++; } eina_list_free(btn_list); - td->live_view_ly = live_view_ly; + td->live_view_ly = live_view_scr; //Text editor tools - Evas_Object *text_editor_ly = elm_layout_add(parent); - elm_layout_file_set(text_editor_ly, EDJE_PATH, "text_editor_tools_layout"); - evas_object_size_hint_weight_set(text_editor_ly, EVAS_HINT_EXPAND, + Evas_Object *text_editor_scr = elm_scroller_add(parent); + evas_object_size_hint_weight_set(text_editor_scr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(text_editor_ly, EVAS_HINT_FILL, + evas_object_size_hint_align_set(text_editor_scr, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_scroller_bounce_set(text_editor_scr, EINA_FALSE, EINA_FALSE); + elm_scroller_policy_set(text_editor_scr, ELM_SCROLLER_POLICY_OFF, + ELM_SCROLLER_POLICY_OFF); + evas_object_show(text_editor_scr); + + box = elm_box_add(text_editor_scr); + elm_box_horizontal_set(box, EINA_TRUE); + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_object_content_set(text_editor_scr, box); + + Evas_Object *box_left = elm_box_add(box); + elm_box_horizontal_set(box_left, EINA_TRUE); + evas_object_size_hint_weight_set(box_left, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(box_left, 0.0, EVAS_HINT_FILL); + elm_box_pack_end(box, box_left); + evas_object_show(box_left); + + Evas_Object *box_right = elm_box_add(box); + elm_box_horizontal_set(box_right, EINA_TRUE); + evas_object_size_hint_weight_set(box_right, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(box_right, 1.0, EVAS_HINT_FILL); + elm_box_pack_end(box, box_right); + evas_object_show(box_right); - btn = tools_btn_create(text_editor_ly, "save", + tools_space_insert(box_left, 14); + btn = tools_btn_create(box_left, "save", _("Save the file (Ctrl + S)
" "Save the current script to a file."), save_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.save", btn); + elm_box_pack_end(box_left, btn); - btn = tools_btn_create(text_editor_ly, "undo", + tools_space_insert(box_left, 8); + btn = tools_btn_create(box_left, "undo", _("Undo text (Ctrl + Z)"), undo_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.undo", btn); + elm_box_pack_end(box_left, btn); - btn = tools_btn_create(text_editor_ly, "redo", + tools_space_insert(box_left, 8); + btn = tools_btn_create(box_left, "redo", _("Redo text (Ctrl + R)"), redo_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.redo", btn); + elm_box_pack_end(box_left, btn); - btn = tools_btn_create(text_editor_ly, "find", + tools_space_insert(box_left, 8); + btn = tools_btn_create(box_left, "find", _("Find/Replace (Ctrl + F)
" "Find or replace text."), find_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.find", btn); + elm_box_pack_end(box_left, btn); td->find_btn = btn; - btn = tools_btn_create(text_editor_ly, "goto", + tools_space_insert(box_left, 8); + btn = tools_btn_create(box_left, "goto", _("Go to line (Ctrl + L)
" "Open the Go to window to move the cursor
" "line position."), goto_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.goto", btn); + elm_box_pack_end(box_left, btn); td->goto_btn = btn; - btn = tools_btn_create(text_editor_ly, "lines", + tools_space_insert(box_left, 8); + btn = tools_btn_create(box_left, "lines", _("Line numbers
" "Display the script line numbers."), lines_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.lines", btn); + elm_box_pack_end(box_left, btn); td->lines_btn = btn; - btn = tools_btn_create(text_editor_ly, "template", + tools_space_insert(box_left, 8); + btn = tools_btn_create(box_left, "template", _("Insert a code snippet (Ctrl + T)
" "Enventor chooses the best code with regards
" "to the current editing context. For instance,
" @@ -335,31 +409,35 @@ tools_init(Evas_Object *parent) template_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.template", btn); + elm_box_pack_end(box_left, btn); td->template_btn = btn; - btn = tools_btn_create(text_editor_ly, "console", + tools_separator_insert(box_right); + tools_space_insert(box_right, 8); + btn = tools_btn_create(box_right, "console", _("Console box (Alt + Down)
" "Display the console box, which shows the EDC
" "build logs, such as error messages. It pops
" - "up automatically when compliation errors occur."), + "up automatically when compilation errors occur."), console_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.console", btn); + elm_box_pack_end(box_right, btn); td->console_btn = btn; - btn = tools_btn_create(text_editor_ly, "file_browser", + tools_space_insert(box_right, 8); + btn = tools_btn_create(box_right, "file_browser", _("File browser (F9)
" "Display the file browser, which shows a file list
" "in current workspace."), file_browser_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.file_browser", btn); + elm_box_pack_end(box_right, btn); td->file_browser_btn = btn; - btn = tools_btn_create(text_editor_ly, "edc_navigator", + tools_space_insert(box_right, 8); + btn = tools_btn_create(box_right, "edc_navigator", _("EDC navigator (F10)
" "Display the EDC navigator, which shows the current
" "group hierarchy tree that contains parts,
" @@ -367,32 +445,36 @@ tools_init(Evas_Object *parent) edc_navigator_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.edc_navigator", - btn); + elm_box_pack_end(box_right, btn); td->edc_navigator_btn = btn; - btn = tools_btn_create(text_editor_ly, "filetab", + tools_space_insert(box_right, 8); + btn = tools_btn_create(box_right, "filetab", _("File tab (F11)
" "Display the file tab in the bottom area
" "It shows an opened file list to switch
" - "files quickly. to switch files quickly."), + "files quickly."), file_tab_cb); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.file_tab", btn); + elm_box_pack_end(box_right, btn); td->file_tab = btn; - btn = tools_btn_create(text_editor_ly, "menu", + tools_space_insert(box_right, 8); + tools_separator_insert(box_right); + tools_space_insert(box_right, 14); + btn = tools_btn_create(box_right, "menu", _("Enventor menu (Esc)
" "Open the Enventor main menu."), menu_cb); elm_object_tooltip_orient_set(btn, ELM_TOOLTIP_ORIENT_BOTTOM_LEFT); evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_part_content_set(text_editor_ly, "elm.swallow.menu", btn); + elm_box_pack_end(box_right, btn); td->menu_btn = btn; - td->text_editor_ly = text_editor_ly; + tools_space_insert(box_right, 14); + td->text_editor_ly = text_editor_scr; //Turn on if console is valid size. if (!config_console_get() && (config_console_size_get() > 0)) diff --git a/src/bin/utils.c b/src/bin/utils.c index 8695c16..9a0c194 100644 --- a/src/bin/utils.c +++ b/src/bin/utils.c @@ -9,7 +9,8 @@ char EDJE_PATH[PATH_MAX]; const char *ENVENTOR_NAME = "enventor"; Enventor_Item *active_item = NULL; -void mem_fail_msg(void) +void +mem_fail_msg(void) { EINA_LOG_ERR("Failed to allocate Memory!"); } diff --git a/src/include/common.h b/src/include/common.h index 613f8f3..50f4c1e 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -59,7 +59,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" #define ROUNDING(x, dig) (floor((x) * pow(10, dig) + 0.5) / pow(10, dig)) -#define ENVENTOR_CONFIG_VERSION 13 +#define ENVENTOR_CONFIG_VERSION 15 #define EVENT_KEY_MODIFIER_CHECK(NAME, MASK) \ ((MASK & ECORE_EVENT_MODIFIER_##NAME) && \ diff --git a/src/include/config_data.h b/src/include/config_data.h index 31b902a..b87aa74 100644 --- a/src/include/config_data.h +++ b/src/include/config_data.h @@ -63,8 +63,12 @@ void config_smart_undo_redo_set(Eina_Bool smart_undo_redo); Eina_Bool config_smart_undo_redo_get(void); void config_file_browser_set(Eina_Bool enabled); Eina_Bool config_file_browser_get(void); +void config_file_browser_size_set(double size); +double config_file_browser_size_get(void); void config_edc_navigator_set(Eina_Bool enabled); Eina_Bool config_edc_navigator_get(void); +void config_edc_navigator_size_set(double size); +double config_edc_navigator_size_get(void); Eina_Bool config_mirror_mode_get(void); void config_mirror_mode_set(Eina_Bool mirror_mode); void config_red_alert_set(Eina_Bool enabled); diff --git a/src/include/edc_navigator.h b/src/include/edc_navigator.h index d48ff90..1c1ac00 100644 --- a/src/include/edc_navigator.h +++ b/src/include/edc_navigator.h @@ -1,6 +1,10 @@ +#define DEFAULT_EDC_NAVIGATOR_SIZE 0.3 + Evas_Object *edc_navigator_init(Evas_Object *parent); void edc_navigator_term(void); void edc_navigator_group_update(const char *cur_group); void edc_navigator_deselect(void); void edc_navigator_tools_set(void); void edc_navigator_tools_visible_set(Eina_Bool visible); +void edc_navigator_show(); +void edc_navigator_hide(); diff --git a/src/include/file_browser.h b/src/include/file_browser.h index e341d51..852095f 100644 --- a/src/include/file_browser.h +++ b/src/include/file_browser.h @@ -1,3 +1,5 @@ +#define DEFAULT_FILE_BROWSER_SIZE 0.3 + Evas_Object *file_browser_init(Evas_Object *parent); void file_browser_term(void); void file_browser_workspace_set(const char *workspace_dir); @@ -7,3 +9,5 @@ void file_browser_refresh(void); void file_browser_selected_file_main_set(void); void file_brwser_refresh(void); void file_browser_main_file_unset(void); +void file_browser_show(); +void file_browser_hide(); diff --git a/src/lib/build.c b/src/lib/build.c index 105ffce..1700931 100644 --- a/src/lib/build.c +++ b/src/lib/build.c @@ -61,7 +61,9 @@ strbuf_path_get(build_data *bd, Enventor_Path_Type type, const char *syntax) EINA_LIST_FOREACH(bd->pathes_list[type], l, path) { eina_strbuf_append(strbuf, syntax); + eina_strbuf_append(strbuf, "\""); eina_strbuf_append(strbuf, path); + eina_strbuf_append(strbuf, "\""); } return strbuf; } @@ -99,7 +101,7 @@ build_cmd_set(build_data *bd) } eina_strbuf_append_printf(strbuf, - "edje_cc -fastcomp %s %s -id %s/images -sd %s/sounds -fd %s/fonts -dd %s/data %s %s %s %s -beta", + "edje_cc -fastcomp \"%s\" \"%s\" -id \"%s/images\" -sd \"%s/sounds\" -fd \"%s/fonts\" -dd \"%s/data\" %s %s %s %s -beta", bd->edc_path, (char *) eina_list_data_get(bd->pathes_list[ENVENTOR_PATH_TYPE_EDJ]), elm_app_data_dir_get(), diff --git a/src/lib/ctxpopup.c b/src/lib/ctxpopup.c index 44a7aeb..a95d9e6 100644 --- a/src/lib/ctxpopup.c +++ b/src/lib/ctxpopup.c @@ -91,15 +91,49 @@ update_preset_colors(Eina_Bool update) } } +static int +array_data_idx(const Eina_Array *array, void *data) +{ + Eina_Stringshare *array_data; + Eina_Array_Iterator itr; + int idx; + + if (!array) return -1; + + EINA_ARRAY_ITER_NEXT(array, idx, array_data, itr) + { + if (array_data == data) + return idx; + } + + return -1; +} + static void ctxpopup_it_cb(void *data, Evas_Object *obj, void *event_info) { ctxpopup_data *ctxdata = data; Elm_Object_Item *it = event_info; const char *text = elm_object_item_text_get(it); + const Eina_Stringshare *append_str = NULL; + //Append different string to each candidate list. + if (ctxdata->attr->use_append_str_array) + { + int idx = array_data_idx(ctxdata->attr->strs, (void *)text); + if (idx != -1) + { + append_str = (const Eina_Stringshare *) + eina_array_data_get(ctxdata->attr->append_str_array, idx); + } + } + //Append same string to all candidate lists. + else + { + append_str = ctxdata->attr->append_str; + } snprintf(ctxdata->candidate, sizeof(ctxdata->candidate), "%s %s%s", - ctxdata->attr->prepend_str, text, ctxdata->attr->append_str); + ctxdata->attr->prepend_str, text, append_str); ctxdata->changed_cb(ctxdata->data, obj, ctxdata->candidate); elm_ctxpopup_dismiss(obj); diff --git a/src/lib/dummy_obj.c b/src/lib/dummy_obj.c index c30685b..3a29817 100644 --- a/src/lib/dummy_obj.c +++ b/src/lib/dummy_obj.c @@ -199,6 +199,7 @@ layout_geom_changed_cb(void *data, Evas *evas EINA_UNUSED, evas_object_move(po->obj, lx + x, ly + y); } } + static Eina_Bool animator_cb(void *data) { diff --git a/src/lib/edc_editor.c b/src/lib/edc_editor.c index 585c64c..7481bf8 100644 --- a/src/lib/edc_editor.c +++ b/src/lib/edc_editor.c @@ -41,6 +41,7 @@ struct editor_s int error_line; int syntax_color_lock; int cursor_pos; + int ctxpopup_cursor_pos; Evas_Coord scroller_h; struct { @@ -522,7 +523,9 @@ ctxpopup_candidate_changed_cb(void *data, Evas_Object *obj EINA_UNUSED, char *ch = NULL; int cur_pos, end_pos; int i; - cur_pos = elm_entry_cursor_pos_get(ed->en_edit); + + cur_pos = ed->ctxpopup_cursor_pos; + elm_entry_cursor_pos_set(ed->en_edit, cur_pos); elm_entry_cursor_line_end_set(ed->en_edit); end_pos = elm_entry_cursor_pos_get(ed->en_edit); @@ -718,6 +721,8 @@ candidate_list_show(edit_data *ed, char *text, char *cur, char *selected) parser_attribute_value_set(attr, cur); + ed->ctxpopup_cursor_pos = elm_entry_cursor_pos_get(ed->en_edit); + //Show up the list of the types Enventor_Ctxpopup_Type type; Evas_Object *ctxpopup = @@ -1147,11 +1152,20 @@ err: } static void -edit_focused_cb(void *data, Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) +edit_focused_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) { edit_data *ed = data; evas_object_smart_callback_call(ed->enventor, SIG_FOCUSED, NULL); + + //Prevent auto-scrolling by scroller + elm_object_focus_allow_set(obj, EINA_FALSE); +} + +static void +edit_unfocused_cb(void *data EINA_UNUSED, Evas_Object *obj, + void *event_info EINA_UNUSED) +{ + elm_object_focus_allow_set(obj, EINA_TRUE); } /*****************************************************************************/ @@ -1508,6 +1522,8 @@ edit_init(Enventor_Object *enventor, Enventor_Item *it) elm_entry_context_menu_disabled_set(en_edit, EINA_TRUE); elm_entry_line_wrap_set(en_edit, ELM_WRAP_NONE); evas_object_smart_callback_add(en_edit, "focused", edit_focused_cb, ed); + evas_object_smart_callback_add(en_edit, "unfocused", + edit_unfocused_cb, NULL); evas_object_smart_callback_add(en_edit, "changed,user", edit_changed_cb, ed); evas_object_smart_callback_add(en_edit, "cursor,changed", edit_cursor_changed_cb, ed); @@ -1654,10 +1670,14 @@ edit_max_line_get(edit_data *ed) void edit_goto(edit_data *ed, int line) { + int cursor_y; + elm_entry_select_none(ed->en_edit); Evas_Object *tb = elm_entry_textblock_get(ed->en_edit); Evas_Textblock_Cursor *cur = evas_object_textblock_cursor_get(tb); evas_textblock_cursor_line_set(cur, (line - 1)); + elm_entry_cursor_geometry_get(ed->en_edit, NULL, &cursor_y, NULL, NULL); + elm_scroller_region_show(ed->scroller, 0, cursor_y, 0, 0); elm_entry_calc_force(ed->en_edit); elm_object_focus_set(ed->en_edit, EINA_TRUE); } diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c index 83ae574..975ed7a 100644 --- a/src/lib/edc_parser.c +++ b/src/lib/edc_parser.c @@ -9,6 +9,9 @@ const char ATTR_PREPEND_COLON[] = ":"; const char ATTR_PREPEND_NONE[] = ""; const char ATTR_APPEND_SEMICOLON[] = ";"; const char ATTR_APPEND_TRANSITION_TIME[] = " 1.0;"; +const char ATTR_APPEND_TRANSITION_TIME_FACTOR[] = " 1.0 0.0;"; +const char ATTR_APPEND_TRANSITION_TIME_FACTOR2[] = " 1.0 0.0 0.0;"; +const char ATTR_APPEND_TRANSITION_TIME_FACTOR4[] = " 1.0 0.0 0.0 0.0 0.0;"; typedef struct parser_attr_s { @@ -560,12 +563,26 @@ type_init_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) eina_array_push(trans, eina_stringshare_add("SPRING")); eina_array_push(trans, eina_stringshare_add("CUBIC_BEZIER")); + Eina_Array *trans_append_str = eina_array_new(11); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR2)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR2)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR2)); + eina_array_push(trans_append_str, eina_stringshare_add(ATTR_APPEND_TRANSITION_TIME_FACTOR4)); + memset(&attr, 0x00, sizeof(parser_attr)); attr.keyword = eina_stringshare_add("transition"); attr.value.strs = trans; attr.value.type = ATTR_VALUE_CONSTANT; attr.value.prepend_str = ATTR_PREPEND_COLON; - attr.value.append_str = ATTR_APPEND_TRANSITION_TIME; + attr.value.append_str_array = trans_append_str; + attr.value.use_append_str_array = EINA_TRUE; eina_inarray_push(td->attrs, &attr); Eina_Array *aspect_mode = eina_array_new(5); @@ -889,8 +906,8 @@ type_init_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) eina_inarray_push(td->attrs, &attr); wh = eina_array_new(2); - eina_array_push(wh, eina_stringshare_add("W:")); - eina_array_push(wh, eina_stringshare_add("H:")); + eina_array_push(wh, eina_stringshare_add("Min:")); + eina_array_push(wh, eina_stringshare_add("Max:")); memset(&attr, 0x00, sizeof(parser_attr)); attr.keyword = eina_stringshare_add("aspect"); diff --git a/src/lib/enventor_object.eo b/src/lib/enventor_object.eo index 3c9b993..14a176f 100644 --- a/src/lib/enventor_object.eo +++ b/src/lib/enventor_object.eo @@ -119,26 +119,26 @@ class Enventor.Object (Elm.Widget, Efl.File) { return: bool; params { @in type: Enventor_Path_Type; - @in pathes: own(const(list)); + @in pathes: own(const(list)); } } path_get { - return: const(list); + return: const(list); params { @in type: Enventor_Path_Type; } } programs_list_get { - return: list; + return: list; } part_states_list_get { - return: list; + return: list; params { - @in type: const(char) *; + @in type: string; } } parts_list_get { - return: list; + return: list; } live_view_get { return: Efl.Canvas.Object; @@ -147,17 +147,17 @@ class Enventor.Object (Elm.Widget, Efl.File) { } program_run { params { - @in program: const(char) *; + @in program: string; } } syntax_color_set { params { @in color_type: Enventor_Syntax_Color_Type; - @in val: const(char) *; + @in val: string; } } syntax_color_get { - return: const(char) *; + return: string; params { @in color_type: Enventor_Syntax_Color_Type; } @@ -174,32 +174,32 @@ class Enventor.Object (Elm.Widget, Efl.File) { } live_view_size_set { params { - @in w: Evas.Coord; - @in h: Evas.Coord; + @in w: int; + @in h: int; } } live_view_size_get { params { - @in w: Evas.Coord *; - @in h: Evas.Coord *; + @in w: ptr(int); + @in h: ptr(int); } } part_type_get { return: Edje_Part_Type; params { - @in part_name: const(char) *; + @in part_name: string; } } font_set { params { - @in font_name: const(char) *; - @in font_style: const(char) *; + @in font_name: string; + @in font_style: string; } } font_get { params { - @in font_name: const(char) **; - @in font_style: const(char) **; + @out font_name: string; + @out font_style: string; } } auto_complete_list_show { @@ -212,17 +212,14 @@ class Enventor.Object (Elm.Widget, Efl.File) { } implements { class.constructor; - Eo.Base.constructor; - Efl.Canvas.Group.group_add; - Efl.Canvas.Group.group_del; - Efl.Canvas.Group.group_move; - Efl.Canvas.Group.group_resize; - Efl.Canvas.Group.group_show; - Efl.Canvas.Group.group_hide; - Efl.Canvas.Group.group_clip.set; - Efl.Canvas.Group.group_clip_unset; + Efl.Object.constructor; + Efl.Object.destructor; + Efl.Gfx.visible {set;} + Efl.Gfx.position {set;} + Efl.Gfx.size {set;} + Efl.Canvas.Object.clip {set;} Efl.Canvas.Group.group_member_add; - Efl.File.file.set; + Efl.File.file {set;} } events { cursor,line,changed; diff --git a/src/lib/enventor_private.h b/src/lib/enventor_private.h index dbce81c..00b4c64 100644 --- a/src/lib/enventor_private.h +++ b/src/lib/enventor_private.h @@ -69,6 +69,8 @@ struct attr_value_s attr_value_type type; const char *prepend_str; const char *append_str; + Eina_Array *append_str_array; + Eina_Bool use_append_str_array : 1; Eina_Bool program : 1; }; diff --git a/src/lib/enventor_smart.c b/src/lib/enventor_smart.c index 12d2ffc..6372783 100644 --- a/src/lib/enventor_smart.c +++ b/src/lib/enventor_smart.c @@ -4,6 +4,8 @@ #define ELM_INTERNAL_API_ARGESFSDFEFC 1 #define EFL_CANVAS_OBJECT_PROTECTED 1 +#define EFL_CANVAS_GROUP_PROTECTED +#define EFL_CANVAS_GROUP_BETA #include #include @@ -252,72 +254,18 @@ _enventor_part_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *ei) /* Internal Eo object required routines */ /*****************************************************************************/ EOLIAN static void -_enventor_object_class_constructor(Eo_Class *klass) +_enventor_object_class_constructor(Efl_Class *klass) { evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); } -EOLIAN static void -_enventor_object_efl_canvas_group_group_add(Eo *obj, Enventor_Object_Data *pd) -{ - pd->obj = obj; - - efl_canvas_group_add(eo_super(obj, MY_CLASS)); - elm_widget_sub_object_parent_add(obj); - - build_init(); - autocomp_init(); - ref_init(); - edj_mgr_init(obj); - build_err_noti_cb_set(build_err_noti_cb, pd); - - elm_widget_can_focus_set(obj, EINA_FALSE); - - pd->key_down_handler = - ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_down_cb, pd); - pd->key_up_handler = - ecore_event_handler_add(ECORE_EVENT_KEY_UP, key_up_cb, pd); - - evas_object_smart_callback_add(pd->obj, "part,clicked", - _enventor_part_clicked_cb, pd); - - pd->font_scale = DEFAULT_FONT_SCALE; - pd->linenumber = DEFAULT_LINENUMBER; - pd->auto_indent = DEFAULT_AUTO_INDENT; - pd->part_highlight = DEFAULT_PART_HIGHLIGHT; - pd->smart_undo_redo = DEFAULT_SMART_UNDO_REDO; - pd->ctxpopup = DEFAULT_CTXPOPUP; -} - -EOLIAN static void -_enventor_object_efl_canvas_group_group_del(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd) -{ - int i; - for (i = ENVENTOR_SYNTAX_COLOR_STRING; i < ENVENTOR_SYNTAX_COLOR_LAST; i++) - eina_stringshare_del(pd->text_color_val[i]); - - eina_stringshare_del(pd->font_name); - eina_stringshare_del(pd->font_style); - eina_stringshare_del(pd->group_name); - autocomp_term(); - ref_term(); - ecore_event_handler_del(pd->key_down_handler); - ecore_event_handler_del(pd->key_up_handler); - - _enventor_sub_items_free(pd); - _enventor_main_item_free(pd); - - edj_mgr_term(); - build_term(); -} - EOLIAN static void _enventor_object_efl_canvas_group_group_member_add(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Object *child) { //Don't go through elm_widget to avoid color set. evas_object_data_set(child, "_elm_leaveme", (void*)1); - efl_canvas_group_member_add(eo_super(obj, MY_CLASS), child); + efl_canvas_group_member_add(efl_super(obj, MY_CLASS), child); Evas_Coord x, y, w, h; evas_object_geometry_get(obj, &x, &y, &w, &h); @@ -327,8 +275,10 @@ _enventor_object_efl_canvas_group_group_member_add(Eo *obj, Enventor_Object_Data } EOLIAN static void -_enventor_object_efl_canvas_group_group_move(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Coord x, Evas_Coord y) +_enventor_object_efl_gfx_position_set(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Coord x, Evas_Coord y) { + efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y); + Eina_Iterator *it = evas_object_smart_iterator_new(obj); Evas_Object *o; EINA_ITERATOR_FOREACH(it, o) @@ -337,8 +287,10 @@ _enventor_object_efl_canvas_group_group_move(Eo *obj, Enventor_Object_Data *pd E } EOLIAN static void -_enventor_object_efl_canvas_group_group_resize(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Coord w, Evas_Coord h) +_enventor_object_efl_gfx_size_set(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Coord w, Evas_Coord h) { + efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h); + Eina_Iterator *it = evas_object_smart_iterator_new(obj); Evas_Object *o; EINA_ITERATOR_FOREACH(it, o) @@ -347,52 +299,91 @@ _enventor_object_efl_canvas_group_group_resize(Eo *obj, Enventor_Object_Data *pd } EOLIAN static void -_enventor_object_efl_canvas_group_group_show(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd) +_enventor_object_efl_gfx_visible_set(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd, Eina_Bool vis) { - if (!pd->focused_it) return; - Evas_Object *o = edit_obj_get(pd->focused_it->ed); - evas_object_show(o); -} + efl_gfx_visible_set(efl_super(obj, MY_CLASS), vis); -EOLIAN static void -_enventor_object_efl_canvas_group_group_hide(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd) -{ if (!pd->focused_it) return; Evas_Object *o = edit_obj_get(pd->focused_it->ed); - evas_object_hide(o); + if (vis) + evas_object_show(o); + else + evas_object_hide(o); } EOLIAN static void -_enventor_object_efl_canvas_group_group_clip_set(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Object *clip) +_enventor_object_efl_canvas_object_clip_set(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED, Evas_Object *clip) { - Eina_Iterator *it = evas_object_smart_iterator_new(obj); - Evas_Object *o; - EINA_ITERATOR_FOREACH(it, o) - evas_object_clip_set(o, clip); - eina_iterator_free(it); -} + efl_canvas_object_clip_set(efl_super(obj, MY_CLASS), clip); -EOLIAN static void -_enventor_object_efl_canvas_group_group_clip_unset(Eo *obj, Enventor_Object_Data *pd EINA_UNUSED) -{ Eina_Iterator *it = evas_object_smart_iterator_new(obj); Evas_Object *o; EINA_ITERATOR_FOREACH(it, o) - evas_object_clip_unset(o); + evas_object_clip_set(o, clip); eina_iterator_free(it); } EOLIAN static Eo * -_enventor_object_eo_base_constructor(Eo *obj, - Enventor_Object_Data *pd EINA_UNUSED) +_enventor_object_efl_object_constructor(Eo *obj, Enventor_Object_Data *pd) { - obj = eo_constructor(eo_super(obj, MY_CLASS)); - efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); + obj = efl_constructor(efl_super(obj, MY_CLASS)); + + pd->obj = obj; + + elm_widget_sub_object_parent_add(obj); + + build_init(); + autocomp_init(); + ref_init(); + edj_mgr_init(obj); + build_err_noti_cb_set(build_err_noti_cb, pd); + + elm_widget_can_focus_set(obj, EINA_FALSE); + + pd->key_down_handler = + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_down_cb, pd); + pd->key_up_handler = + ecore_event_handler_add(ECORE_EVENT_KEY_UP, key_up_cb, pd); + + evas_object_smart_callback_add(pd->obj, "part,clicked", + _enventor_part_clicked_cb, pd); + + pd->font_scale = DEFAULT_FONT_SCALE; + pd->linenumber = DEFAULT_LINENUMBER; + pd->auto_indent = DEFAULT_AUTO_INDENT; + pd->part_highlight = DEFAULT_PART_HIGHLIGHT; + pd->smart_undo_redo = DEFAULT_SMART_UNDO_REDO; + pd->ctxpopup = DEFAULT_CTXPOPUP; + evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); return obj; } +EOLIAN static void +_enventor_object_efl_object_destructor(Eo *obj, Enventor_Object_Data *pd) +{ + int i; + for (i = ENVENTOR_SYNTAX_COLOR_STRING; i < ENVENTOR_SYNTAX_COLOR_LAST; i++) + eina_stringshare_del(pd->text_color_val[i]); + + eina_stringshare_del(pd->font_name); + eina_stringshare_del(pd->font_style); + eina_stringshare_del(pd->group_name); + autocomp_term(); + ref_term(); + ecore_event_handler_del(pd->key_down_handler); + ecore_event_handler_del(pd->key_up_handler); + + _enventor_sub_items_free(pd); + _enventor_main_item_free(pd); + + edj_mgr_term(); + build_term(); + + efl_destructor(efl_super(obj, MY_CLASS)); +} + EOLIAN static Eina_Bool _enventor_object_efl_file_file_set(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd, @@ -451,6 +442,8 @@ _enventor_object_linenumber_set(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd, if (pd->linenumber == linenumber) return; + if (!pd->focused_it) return; + //Main Item edit_linenumber_set(pd->focused_it->ed, linenumber); @@ -638,8 +631,10 @@ _enventor_object_part_highlight_set(Eo *obj EINA_UNUSED, if (pd->part_highlight == part_highlight) return; pd->part_highlight = part_highlight; + if (!pd->focused_it) return; + //Main Item - if (part_highlight && pd->focused_it) edit_view_sync(pd->focused_it->ed); + if (part_highlight) edit_view_sync(pd->focused_it->ed); else view_part_highlight_set(VIEW_DATA, NULL); } @@ -788,6 +783,7 @@ _enventor_object_disabled_set(Eo *obj EINA_UNUSED, disabled = !!disabled; if (pd->disabled == disabled) return; + if (!pd->focused_it) return; edit_disabled_set(pd->focused_it->ed, disabled); pd->disabled = !!disabled; @@ -812,6 +808,7 @@ EOLIAN static void _enventor_object_keyword_reference_show(Eo *obj EINA_UNUSED, Enventor_Object_Data *pd) { + if (!pd->focused_it) return; ref_show(pd->focused_it->ed); } @@ -829,14 +826,14 @@ EAPI Enventor_Object * enventor_object_add(Enventor_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - Evas_Object *obj = eo_add(MY_CLASS, parent); + Evas_Object *obj = efl_add(MY_CLASS, parent); return obj; } EAPI Enventor_Item * enventor_object_sub_item_add(Enventor_Object *obj, const char *file) { - Enventor_Object_Data *pd = eo_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); + Enventor_Object_Data *pd = efl_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); if (!file) { @@ -880,7 +877,7 @@ enventor_object_sub_item_add(Enventor_Object *obj, const char *file) EAPI Enventor_Item * enventor_object_main_item_set(Enventor_Object *obj, const char *file) { - Enventor_Object_Data *pd = eo_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); + Enventor_Object_Data *pd = efl_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); edj_mgr_clear(); _enventor_main_item_free(pd); @@ -911,21 +908,21 @@ enventor_object_main_item_set(Enventor_Object *obj, const char *file) EAPI Enventor_Item * enventor_object_main_item_get(const Enventor_Object *obj) { - Enventor_Object_Data *pd = eo_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); + Enventor_Object_Data *pd = efl_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); return pd->main_it; } EAPI const Eina_List * enventor_object_sub_items_get(const Enventor_Object *obj) { - Enventor_Object_Data *pd = eo_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); + Enventor_Object_Data *pd = efl_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); return pd->sub_its; } EAPI Enventor_Item * enventor_object_focused_item_get(const Enventor_Object *obj) { - Enventor_Object_Data *pd = eo_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); + Enventor_Object_Data *pd = efl_data_scope_get(obj, ENVENTOR_OBJECT_CLASS); return pd->focused_it; } diff --git a/src/lib/redoundo.c b/src/lib/redoundo.c index 3762452..94c866b 100644 --- a/src/lib/redoundo.c +++ b/src/lib/redoundo.c @@ -63,6 +63,7 @@ _input_timer_cb(void *data) static diff_data * smart_analyser(redoundo_data *rd, diff_data *diff) { + Eina_Bool is_continues_text = EINA_FALSE; if (!enventor_obj_smart_undo_redo_get(rd->enventor)) return diff; if (rd->smart.timer) @@ -73,21 +74,43 @@ smart_analyser(redoundo_data *rd, diff_data *diff) if (!diff) return diff; + if (!rd->last_diff || (rd->last_diff->action != diff->action)) + { + rd->smart.continues_input = EINA_TRUE; + return diff; + } + if (diff->length == 1 && enventor_obj_auto_indent_get(rd->enventor)) { if (strstr(diff->text, "
")) diff->relative = EINA_TRUE; else diff->relative = EINA_FALSE; } + // Determine the text of diff is continuous + if (diff->action ? + ((rd->last_diff->cursor_pos + rd->last_diff->length) == diff->cursor_pos) : + ((diff->cursor_pos + diff->length) == rd->last_diff->cursor_pos) || + (diff->cursor_pos == rd->last_diff->cursor_pos)) + is_continues_text = EINA_TRUE; + // Analyse speed of text input and words separates if ((rd->smart.continues_input) && (!diff->relative) && - (isalpha(diff->text[0])) && (rd->last_diff && (isalpha(rd->last_diff->text[0])))) + (isalpha(diff->text[0])) && (isalpha(rd->last_diff->text[0])) && + (is_continues_text)) { diff_data *tmp = diff; const char *text; diff = rd->last_diff; diff->length += tmp->length; - text = eina_stringshare_printf("%s%s", diff->text, tmp->text); + + if (diff->action || (diff->cursor_pos == tmp->cursor_pos)) + text = eina_stringshare_printf("%s%s", diff->text, tmp->text); + else + { + diff->cursor_pos = tmp->cursor_pos; + text = eina_stringshare_printf("%s%s", tmp->text, diff->text); + } + eina_stringshare_replace(&diff->text, text); eina_stringshare_del(text); rd->last_diff = eina_list_data_get(eina_list_prev(rd->current_node)); diff --git a/src/lib/syntax_indent.c b/src/lib/syntax_indent.c index f040c43..176e643 100644 --- a/src/lib/syntax_indent.c +++ b/src/lib/syntax_indent.c @@ -94,6 +94,75 @@ indent_insert_br_case(indent_data *id) elm_entry_entry_insert(entry, p); } +static void +indent_insert_tab_case(indent_data *id) +{ + Evas_Object *entry = id->entry; + Evas_Object *tb = elm_entry_textblock_get(entry); + Evas_Textblock_Cursor *cur_orig = evas_object_textblock_cursor_get(tb); + Evas_Textblock_Cursor *cur = evas_object_textblock_cursor_new(tb); + char *utf8 = NULL; + int utf8_len = 0; + char *p = NULL; + Eina_Bool insert_indent_space = EINA_FALSE; + + //Remove inserted "". + evas_textblock_cursor_pos_set(cur, evas_textblock_cursor_pos_get(cur_orig)); + evas_textblock_cursor_char_prev(cur); + if (!strncmp(evas_textblock_cursor_content_get(cur), TAB, TAB_LEN)) + { + //Cancel added "" from redoundo. + redoundo_n_diff_cancel(id->rd, 1); + evas_textblock_cursor_char_delete(cur); + } + evas_textblock_cursor_pos_set(cur, evas_textblock_cursor_pos_get(cur_orig)); + + /* Spaces for indent are not required. + Insert spaces for tab. */ + int space = indent_space_get(id); + if (space <= 0) goto end; + + evas_textblock_cursor_paragraph_prev(cur); + evas_textblock_cursor_paragraph_next(cur); + utf8 = evas_textblock_cursor_range_text_get(cur, cur_orig, + EVAS_TEXTBLOCK_TEXT_PLAIN); + /* There is no paragraph. + Insert spaces for indent. */ + if (!utf8) + { + insert_indent_space = EINA_TRUE; + goto end; + } + + utf8_len = strlen(utf8); + /* Paragraph is shorter than spaces for indent. + Insert spaces for indent. */ + if (utf8_len < space) + insert_indent_space = EINA_TRUE; + +end: + if (insert_indent_space) + { + //Allocate spaces for indent. + p = alloca(space - utf8_len + 1); + memset(p, ' ', space - utf8_len); + p[space - utf8_len] = '\0'; + } + else + { + //Allocate spaces for tab. + p = alloca(TAB_SPACE + 1); + memset(p, ' ', TAB_SPACE); + p[TAB_SPACE] = '\0'; + } + + redoundo_text_push(id->rd, p, elm_entry_cursor_pos_get(entry), 0, EINA_TRUE); + elm_entry_entry_insert(entry, p); + + if (utf8) free(utf8); + evas_textblock_cursor_free(cur); +} + static void indent_insert_bracket_case(indent_data *id, int cur_line) { @@ -941,6 +1010,11 @@ indent_insert_apply(indent_data *id, const char *insert, int cur_line) indent_insert_br_case(id); return 1; } + else if (!strcmp(insert, TAB)) + { + indent_insert_tab_case(id); + return 0; + } else if (!strcmp(insert, QUOT)) return 0; else if (!strcmp(insert, LESS)) diff --git a/src/lib/template.c b/src/lib/template.c index 59c636a..4b8c79f 100644 --- a/src/lib/template.c +++ b/src/lib/template.c @@ -334,7 +334,7 @@ template_part_insert(edit_data *ed, Edje_Part_Type part_type, line_cnt += 2; } - //If there are some relative_to part then insert relative_to + //If there are some relative_to part then insert relative_to if (rel1_x_to) { elm_entry_entry_insert(edit_entry, p); diff --git a/src/lib/util.c b/src/lib/util.c index 43b2358..3ae1fde 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -5,7 +5,8 @@ #include #include "enventor_private.h" -void mem_fail_msg(void) +void +mem_fail_msg(void) { EINA_LOG_ERR("Failed to allocate Memory!"); }