[EGIT] [core/elementary] master 01/01: Entry: Context Menu is now configurable

2015-12-10 Thread Vaibhav Gupta
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=cafda5928f9bf8116564219dc03d12c3a6e131b3

commit cafda5928f9bf8116564219dc03d12c3a6e131b3
Author: Vaibhav Gupta <g.vaibh...@samsung.com>
Date:   Fri Dec 11 15:49:27 2015 +0900

Entry: Context Menu is now configurable

Summary:
Added a config variable Context_Menu_Disabled to make the appearance
of the context menu configurable.

@feature

Signed-off-by: Vaibhav Gupta <g.vaibh...@samsung.com>

Reviewers: Hermet, SanghyeonLee, raster, singh.amitesh

Subscribers: stefan_schmidt, alok25, cedric, thiepha, sachin.dev

Differential Revision: https://phab.enlightenment.org/D2463
---
 config/default/base.src.in  |  1 +
 config/mobile/base.src.in   |  1 +
 config/standard/base.src.in |  1 +
 src/bin/test_entry.c| 17 -
 src/lib/elm_config.c| 17 +
 src/lib/elm_config.h| 20 
 src/lib/elm_entry.c | 39 +--
 src/lib/elm_priv.h  |  1 +
 8 files changed, 86 insertions(+), 11 deletions(-)

diff --git a/config/default/base.src.in b/config/default/base.src.in
index 188f41f..7bf7713 100644
--- a/config/default/base.src.in
+++ b/config/default/base.src.in
@@ -54,6 +54,7 @@ group "Elm_Config" struct {
   value "longpress_timeout" double: 1.0;
   value "effect_enable" uchar: 1;
   value "desktop_entry" uchar: 0;
+  value "context_menu_disabled" uchar: 0;
   value "password_show_last" uchar: 0;
   value "password_show_last_timeout" double: 2.0;
   value "glayer_zoom_finger_enable" uchar: 1;
diff --git a/config/mobile/base.src.in b/config/mobile/base.src.in
index aea7ae2..44bfd67 100644
--- a/config/mobile/base.src.in
+++ b/config/mobile/base.src.in
@@ -54,6 +54,7 @@ group "Elm_Config" struct {
   value "longpress_timeout" double: 1.0;
   value "effect_enable" uchar: 1;
   value "desktop_entry" uchar: 0;
+  value "context_menu_disabled" uchar: 0;
   value "password_show_last" uchar: 1;
   value "password_show_last_timeout" double: 2.0;
   value "glayer_zoom_finger_enable" uchar: 1;
diff --git a/config/standard/base.src.in b/config/standard/base.src.in
index 2d87884..fd60d6a 100644
--- a/config/standard/base.src.in
+++ b/config/standard/base.src.in
@@ -55,6 +55,7 @@ group "Elm_Config" struct {
   value "longpress_timeout" double: 1.0;
   value "effect_enable" uchar: 1;
   value "desktop_entry" uchar: 1;
+  value "context_menu_disabled" uchar: 1;
   value "password_show_last" uchar: 0;
   value "password_show_last_timeout" double: 2.0;
   value "glayer_zoom_finger_enable" uchar: 1;
diff --git a/src/bin/test_entry.c b/src/bin/test_entry.c
index edc20ff..b679f3a 100644
--- a/src/bin/test_entry.c
+++ b/src/bin/test_entry.c
@@ -82,10 +82,19 @@ my_entry_bt_7(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UN
elm_entry_editable_set(en, !elm_entry_editable_get(en));
 }
 
+static void
+changed_cb1(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+{
+   Evas_Object *ck = data;
+   printf("ck %p to %i\n", obj, elm_check_state_get(obj));
+   elm_config_context_menu_disabled_set(elm_check_state_get(obj));
+   printf("ck2 %p is now %i\n", ck, elm_check_state_get(ck));
+}
+
 void
 test_entry(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
-   Evas_Object *win, *bx, *bx2, *bt, *en;
+   Evas_Object *win, *bx, *bx2, *bt, *en, *ck;
char buf[4096];
 
win = elm_win_util_standard_add("entry", "Entry");
@@ -204,6 +213,12 @@ test_entry(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_inf
elm_object_focus_allow_set(bt, EINA_FALSE);
evas_object_show(bt);
 
+   ck = elm_check_add(win);
+   elm_object_text_set(ck, "Context Menu Disable");
+   evas_object_smart_callback_add(ck, "changed", changed_cb1, ck);
+   elm_box_pack_end(bx, ck);
+   evas_object_show(ck);
+
elm_box_pack_end(bx, bx2);
evas_object_show(bx2);
 
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 8e5320c..3c89162 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -375,6 +375,7 @@ _desc_init(void)
ELM_CONFIG_VAL(D, T, focus_highlight_clip_disable, T_UCHAR);
ELM_CONFIG_VAL(D, T, focus_move_policy, T_UCHAR);
ELM_CONFIG_VAL(D, T, focus_autoscroll_mode, T_UCHAR);
+   ELM_CONFIG_VAL(D, T, context_menu_disabled, T_UCHAR);
ELM_CONFIG_VAL(D, T, slider_indicator_visible_mode, T_INT);
ELM_CONFIG_VAL(D, T, item_select_on_focus_disable, T_UCHAR);
ELM_CONFIG_VAL(D, T, first_item_focus_on_first_focus_in, T_UCHAR);
@@ -1416,6 +1417,7 @@ _config_load(voi

[EGIT] [core/elementary] elementary-1.15 01/01: Genlist: Dont select first item if its DISPLAY_ONLY

2015-08-28 Thread Vaibhav Gupta
hermet pushed a commit to branch elementary-1.15.

http://git.enlightenment.org/core/elementary.git/commit/?id=9a47aa46bdfb844860189a0af3814e26eaa8ed35

commit 9a47aa46bdfb844860189a0af3814e26eaa8ed35
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Fri Aug 28 20:03:35 2015 +0900

Genlist: Dont select first item if its DISPLAY_ONLY

Summary:
Updated genlist to select first item which is not in
DISPLAY_ONLY mode

@fix

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Test Plan:
Following is the test to verify:
1. Create a genlist
2. Make 1st item as ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
3. Now bring the focus to genlist by key down
4. It should bring focus on 2nd item and not 1st.

Reviewers: raster, Hermet, SanghyeonLee, singh.amitesh

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D2957
---
 src/lib/elm_genlist.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 97e5576..48f5554 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -3200,6 +3200,14 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, 
Elm_Genlist_Data *sd)
  eo_it = elm_genlist_first_item_get(obj);
  is_sel = EINA_TRUE;
   }
+  
+while (eo_it)
+{
+   ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
+   if ((!_is_no_select(it))  (!elm_object_item_disabled_get(eo_it)))
+ break;
+   eo_it = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)-next));
+}
 
 if (eo_it)
   {

-- 




[EGIT] [core/elementary] master 01/01: Genlist: Dont select first item if its DISPLAY_ONLY

2015-08-28 Thread Vaibhav Gupta
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b75c194e6a08ca5d9e66d41bf801269526686b74

commit b75c194e6a08ca5d9e66d41bf801269526686b74
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Fri Aug 28 20:03:35 2015 +0900

Genlist: Dont select first item if its DISPLAY_ONLY

Summary:
Updated genlist to select first item which is not in
DISPLAY_ONLY mode

@fix

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Test Plan:
Following is the test to verify:
1. Create a genlist
2. Make 1st item as ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
3. Now bring the focus to genlist by key down
4. It should bring focus on 2nd item and not 1st.

Reviewers: raster, Hermet, SanghyeonLee, singh.amitesh

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D2957
---
 src/lib/elm_genlist.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 49afbd8..c27f429 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -3204,6 +3204,14 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, 
Elm_Genlist_Data *sd)
  eo_it = elm_genlist_first_item_get(obj);
  is_sel = EINA_TRUE;
   }
+  
+while (eo_it)
+{
+   ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
+   if ((!_is_no_select(it))  (!elm_object_item_disabled_get(eo_it)))
+ break;
+   eo_it = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)-next));
+}
 
 if (eo_it)
   {

-- 




[EGIT] [core/elementary] elementary-1.15 03/03: Gengrid: Fix wrong focus movement in _item_single_select_down

2015-08-28 Thread Vaibhav Gupta
ami pushed a commit to branch elementary-1.15.

http://git.enlightenment.org/core/elementary.git/commit/?id=e06b2a7ef2439c66889efe6190b9f41dcc3f8dee

commit e06b2a7ef2439c66889efe6190b9f41dcc3f8dee
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Fri Aug 28 12:04:49 2015 +0530

Gengrid: Fix wrong focus movement in _item_single_select_down

Summary:
The focus movement is wrong when down key press
is done of first item of last row, intsead of
taking the focus out, it moves the focus to next
item (right).

@fix

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Test Plan:
1. Launch elementary_test - Gengrid 2 sample
2. Add a few items such that there are 2 items in last row
3. Do a down key press on 1st item of last row
4. Observe focus movement

Reviewers: raster, Hermet, SanghyeonLee, singh.amitesh

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D3001
---
 src/lib/elm_gengrid.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 0d850d0..cca3a0e 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -2334,7 +2334,9 @@ _item_single_select_down(Elm_Gengrid_Data *sd)
if (!eo_next)
  {
 idx = elm_gengrid_item_index_get(eo_orig);
-if ((idx == sd-item_count) || ((sd-item_count) % (sd-nmax) == 0))
+if (idx  sd-item_count -
+((sd-item_count % sd-nmax) == 0 ?
+ sd-nmax : (sd-item_count % sd-nmax)))
return EINA_FALSE;
 else
eo_next = elm_gengrid_last_item_get(sd-obj);

-- 




[EGIT] [core/elementary] elementary-1.15 01/01: test_scroller: Fix item count variable

2015-08-19 Thread Vaibhav Gupta
ami pushed a commit to branch elementary-1.15.

http://git.enlightenment.org/core/elementary.git/commit/?id=5d15087b4ef1300941df93bc1b059e6803264ee1

commit 5d15087b4ef1300941df93bc1b059e6803264ee1
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Wed Aug 19 12:05:49 2015 +0530

test_scroller: Fix item count variable

Summary:
Since the _count variable is static, the buttons which are added
to scroller, get text value ahead of previously added count, instead
of starting from 1 every time a new window is opened for the example.

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Test Plan:
Following is the test:
1. Open Scroller 3 sample
2. Add some items and note the Item count value of added buttons
3. Close the sample
4. Re-open Scroller 3 sample, and again add some items
5. Observe the Item count text of added buttons.

Reviewers: raster, Hermet, singh.amitesh

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D2959
---
 src/bin/test_scroller.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/test_scroller.c b/src/bin/test_scroller.c
index 4c01508..75ddfb7 100644
--- a/src/bin/test_scroller.c
+++ b/src/bin/test_scroller.c
@@ -572,6 +572,7 @@ void
 test_scroller3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
Evas_Object *win, *bt, *bt2, *bt3, *bx, *bx2, *bx3, *bx4, *sc;
+   _count = 0;
 
win = elm_win_util_standard_add(scroller3, Scroller 3);
elm_win_autodel_set(win, EINA_TRUE);

-- 




[EGIT] [core/elementary] master 01/01: test_scroller: Fix item count variable

2015-08-19 Thread Vaibhav Gupta
ami pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b645e8c3bf66d43882e9d2952991d61cefa00e53

commit b645e8c3bf66d43882e9d2952991d61cefa00e53
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Wed Aug 19 12:05:49 2015 +0530

test_scroller: Fix item count variable

Summary:
Since the _count variable is static, the buttons which are added
to scroller, get text value ahead of previously added count, instead
of starting from 1 every time a new window is opened for the example.

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Test Plan:
Following is the test:
1. Open Scroller 3 sample
2. Add some items and note the Item count value of added buttons
3. Close the sample
4. Re-open Scroller 3 sample, and again add some items
5. Observe the Item count text of added buttons.

Reviewers: raster, Hermet, singh.amitesh

Subscribers: sachin.dev

Differential Revision: https://phab.enlightenment.org/D2959
---
 src/bin/test_scroller.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/test_scroller.c b/src/bin/test_scroller.c
index 4c01508..75ddfb7 100644
--- a/src/bin/test_scroller.c
+++ b/src/bin/test_scroller.c
@@ -572,6 +572,7 @@ void
 test_scroller3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
Evas_Object *win, *bt, *bt2, *bt3, *bx, *bx2, *bx3, *bx4, *sc;
+   _count = 0;
 
win = elm_win_util_standard_add(scroller3, Scroller 3);
elm_win_autodel_set(win, EINA_TRUE);

-- 




[EGIT] [core/elementary] master 01/01: Entry: Add chunked append in case of _elm_entry_entry_append

2015-07-03 Thread Vaibhav Gupta
tasn pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=28e6878f7cce36efae1438b5e032eb9c0878016a

commit 28e6878f7cce36efae1438b5e032eb9c0878016a
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Fri Jul 3 11:08:23 2015 +0100

Entry: Add chunked append in case of _elm_entry_entry_append

Summary:
Summary
Fixed FIXME: Add chunked appending here (like in entry_set)

@fix

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Reviewers: raster, Hermet, herdsman, singh.amitesh, tasn

Subscribers: thiepha, sachin.dev, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D2732
---
 src/lib/elm_entry.c | 92 +
 1 file changed, 51 insertions(+), 41 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 9334604..e436157 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -2857,6 +2857,53 @@ _elm_entry_elm_container_content_unset(Eo *obj, 
Elm_Entry_Data *_pd EINA_UNUSED,
return ret;
 }
 
+static void
+_entry_text_append(Evas_Object* obj, const char* entry)
+{
+   int len = 0;
+   if (!entry) return;
+
+   ELM_ENTRY_DATA_GET(obj, sd);
+   len = strlen(entry);
+
+   if (sd-append_text_left)
+ {
+char *tmpbuf;
+
+tmpbuf = realloc(sd-append_text_left, sd-append_text_len + len + 1);
+if (!tmpbuf)
+  {
+ /* Do something */
+ return;
+  }
+sd-append_text_left = tmpbuf;
+memcpy(sd-append_text_left + sd-append_text_len, entry, len + 1);
+sd-append_text_len += len;
+ }
+   else
+ {
+if (len  ELM_ENTRY_CHUNK_SIZE)
+  {
+ sd-append_text_left = (char *)malloc(len + 1);
+  }
+
+if (sd-append_text_left)
+  {
+ memcpy(sd-append_text_left, entry, len + 1);
+ sd-append_text_position = 0;
+ sd-append_text_len = len;
+ sd-append_text_idler = ecore_idler_add(_text_append_idler, obj);
+  }
+else
+  {
+ /* For the case of text set, append will have similar behaviour
+  * as entry text is cleared first */
+ edje_object_part_text_append(sd-entry_edje, elm.text, entry);
+ evas_object_smart_callback_call(obj, SIG_TEXT_SET_DONE, NULL);
+  }
+ }
+}
+
 EOLIAN static Eina_Bool
 _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data *sd, const char *part, 
const char *entry)
 {
@@ -2891,27 +2938,10 @@ _elm_entry_elm_layout_text_set(Eo *obj, Elm_Entry_Data 
*sd, const char *part, co
 free(sd-append_text_left);
 sd-append_text_left = NULL;
  }
-   /* Split to ~ ELM_ENTRY_CHUNK_SIZE chunks */
-   if (len  ELM_ENTRY_CHUNK_SIZE)
- {
-sd-append_text_left = (char *)malloc(len + 1);
- }
 
-   /* If we decided to use the idler */
-   if (sd-append_text_left)
- {
-/* Need to clear the entry first */
-edje_object_part_text_set(sd-entry_edje, elm.text, );
-memcpy(sd-append_text_left, entry, len + 1);
-sd-append_text_position = 0;
-sd-append_text_len = len;
-sd-append_text_idler = ecore_idler_add(_text_append_idler, obj);
- }
-   else
- {
-edje_object_part_text_set(sd-entry_edje, elm.text, entry);
-evas_object_smart_callback_call(obj, SIG_TEXT_SET_DONE, NULL);
- }
+   /* Need to clear the entry first */
+   edje_object_part_text_set(sd-entry_edje, elm.text, );
+   _entry_text_append(obj, entry);
 
if (len  0)
  _elm_entry_guide_update(obj, EINA_TRUE);
@@ -3818,27 +3848,7 @@ _elm_entry_entry_append(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd, const char *ent
if (!entry) entry = ;
 
sd-changed = EINA_TRUE;
-
-   len = strlen(entry);
-   if (sd-append_text_left)
- {
-char *tmpbuf;
-
-tmpbuf = realloc(sd-append_text_left, sd-append_text_len + len + 1);
-if (!tmpbuf)
-  {
- /* Do something */
- return;
-  }
-sd-append_text_left = tmpbuf;
-memcpy(sd-append_text_left + sd-append_text_len, entry, len + 1);
-sd-append_text_len += len;
- }
-   else
- {
-/* FIXME: Add chunked appending here (like in entry_set) */
-edje_object_part_text_append(sd-entry_edje, elm.text, entry);
- }
+   _entry_text_append(obj, entry);
 }
 
 EOLIAN static Eina_Bool

-- 




[EGIT] [core/elementary] master 01/11: focus: fix typo in API Documentation.

2015-06-25 Thread Vaibhav Gupta
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b116f8a3614150b550a655215a925414639a55de

commit b116f8a3614150b550a655215a925414639a55de
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Thu Jun 25 15:54:39 2015 +0200

focus: fix typo in API Documentation.

Summary: Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: sachin.dev, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D2767

Signed-off-by: Cedric BAIL ced...@osg.samsung.com
---
 src/lib/elm_focus.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_focus.h b/src/lib/elm_focus.h
index 29883f7..2b3801d 100644
--- a/src/lib/elm_focus.h
+++ b/src/lib/elm_focus.h
@@ -356,7 +356,7 @@ EAPI void 
elm_object_focus_move_policy_set(Evas_Object *obj, Elm
  * @param obj The Elementary widget to get the information from
  * @return The focus movement policy
  *
- * Get how the focus is moved to the give Elemenray object. It can be
+ * Get how the focus is moved to the give Elementary object. It can be
  * #ELM_FOCUS_MOVE_POLICY_CLICK, #ELM_FOCUS_MOVE_POLICY_IN,
  * or #ELM_FOCUS_MOVE_POLICY_KEY_ONLY.
  * The first means elementary focus is moved on elementary object click.

-- 




[EGIT] [core/elementary] master 01/01: Gengrid: Fix typo in API Documentation.

2015-06-03 Thread Vaibhav Gupta
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=70acf0642ea00e68264c4c7034b43616456e117f

commit 70acf0642ea00e68264c4c7034b43616456e117f
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Wed Jun 3 21:19:32 2015 +0900

Gengrid: Fix typo in API Documentation.

Summary: Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Reviewers: raster, Hermet

Reviewed By: Hermet

Subscribers: sachin.dev, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D2619
---
 src/lib/elm_gengrid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_gengrid.h b/src/lib/elm_gengrid.h
index 6def65c..f0c9800 100644
--- a/src/lib/elm_gengrid.h
+++ b/src/lib/elm_gengrid.h
@@ -58,7 +58,7 @@
  * than one part is provided, they must have names listed separated
  * by spaces in the data fields. For the default gengrid item
  * theme, we have @b one text part (@c elm.text), @b two content
- * parts (@c elm.swalllow.icon and @c elm.swallow.end) and @b
+ * parts (@c elm.swallow.icon and @c elm.swallow.end) and @b
  * no state parts.
  *
  * A gengrid item may be at one of several styles. Elementary

-- 




[EGIT] [core/elementary] master 01/01: Genlist: Fix typo in API Documentation

2015-06-03 Thread Vaibhav Gupta
hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=721d21c5391472f7191e93474bd8cb186f1ec99a

commit 721d21c5391472f7191e93474bd8cb186f1ec99a
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Wed Jun 3 21:17:49 2015 +0900

Genlist: Fix typo in API Documentation

Summary: Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Reviewers: raster, Hermet

Reviewed By: Hermet

Subscribers: sachin.dev, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D2620
---
 src/lib/elm_genlist.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elm_genlist.h b/src/lib/elm_genlist.h
index d8ee6c4..12f1b2a 100644
--- a/src/lib/elm_genlist.h
+++ b/src/lib/elm_genlist.h
@@ -132,7 +132,7 @@
  * states, respectively. For each of those properties, if more than one
  * part is provided, they must have names listed separated by spaces in the
  * data fields. For the default genlist item theme, we have @b one text
- * part (@c elm.text), @b two content parts (@c elm.swalllow.icon and @c
+ * part (@c elm.text), @b two content parts (@c elm.swallow.icon and @c
  * elm.swallow.end) and @b no state parts.
  *
  * A genlist item may be at one of several styles. Elementary provides one
@@ -218,7 +218,7 @@
  * fill the width of the viewport of the scroller. If it is
  * ELM_LIST_LIMIT, items will be expanded to the viewport width
  * if larger than the item, but genlist widget witdh is
- * limited to the largest item. Do not use ELM_LIST_LIMIT mode with homogenous
+ * limited to the largest item. Do not use ELM_LIST_LIMIT mode with homogeneous
  * mode turned on. ELM_LIST_COMPRESS can be combined with a different style
  * that uses edjes' ellipsis feature (cutting text off like this: tex...).
  *
@@ -380,7 +380,7 @@
  *   was unhighlighted.
  * - @c focused - When the genlist has received focus. (since 1.8)
  * - @c unfocused - When the genlist has lost focus. (since 1.8)
- * - @c item,focused - When the genlist item has recieved focus. (since 1.10)
+ * - @c item,focused - When the genlist item has received focus. (since 1.10)
  * - @c item,unfocused - When the genlist item has lost focus. (since 1.10)
  *
  *

-- 




[EGIT] [core/elementary] master 01/01: Gengrid: Updated gengrid to select the last item.

2015-05-21 Thread Vaibhav Gupta
raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=5099f9eeec52ae71746ede0fd3ff375dc0e83aef

commit 5099f9eeec52ae71746ede0fd3ff375dc0e83aef
Author: Vaibhav Gupta g.vaibh...@samsung.com
Date:   Thu May 21 18:02:00 2015 +0900

Gengrid: Updated gengrid to select the last item.

Summary:
Updated gengrid to move item selection in 'vertical' mode to the last
item, when currently selected item is not in the last row. As per the
original behaviour, on moving down from such an item, it takes the
focus out of the gengrid widget. Now it is updated to go to the last
item (in last row), and then on further pressing down, focus comes
out of gengrid.

This is something similar to what happens in other UI systems like in
Ubuntu and Windows, when pressing down on (n-1)th row, the last item
in the nth row gets focused.

Signed-off-by: Vaibhav Gupta g.vaibh...@samsung.com

Reviewers: Hermet, SanghyeonLee, raster

Reviewed By: raster

Subscribers: sachin.dev, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D2418
---
 src/lib/elm_gengrid.c | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index af7cec9..cb9aa78 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -1932,25 +1932,34 @@ static Eina_Bool
 _item_single_select_down(Elm_Gengrid_Data *sd)
 {
unsigned int i;
-   Elm_Object_Item *eo_next;
+   unsigned int idx;
+   Elm_Object_Item *eo_next, *eo_orig;
 
if (!sd-selected)
  eo_next = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(sd-items));
else
  eo_next = sd-last_selected_item;
+   eo_orig = eo_next;
 
while (eo_next)
  {
 for (i = 0; i  sd-nmax; i++)
   {
  eo_next = elm_gengrid_item_next_get(eo_next);
- if (!eo_next) return EINA_FALSE;
+ if (!eo_next) break;
   }
 
-if (!elm_object_item_disabled_get(eo_next)) break;
+if (eo_next  !elm_object_item_disabled_get(eo_next)) break;
  }
 
-   if (!eo_next) return EINA_FALSE;
+   if (!eo_next)
+ {
+idx = elm_gengrid_item_index_get(eo_orig);
+if ((idx == sd-item_count) || ((sd-item_count) % (sd-nmax) == 0))
+   return EINA_FALSE;
+else
+   eo_next = elm_gengrid_last_item_get(sd-obj);
+ }
 
_all_items_deselect(sd);
elm_gengrid_item_selected_set(eo_next, EINA_TRUE);

--